Skip to content

OpenComputers ​

What changed for OpenComputers programs: calls that were renamed or reordered, readings that come back in a different shape, and the new drivers.

Machine scanner readings changed shape ​

getSensorInformation() returns a different list than in 2.8.4. A line appears only when it applies, so a stopped or unformed machine hands back fewer entries and every index after a missing line moves up. On a multiblock the owner and Meta-ID lines come first.

Some lines arrive as a translation key followed by its arguments instead of finished text. A multiblock's efficiency line reads GT5U.multiblock.scanner.efficiency\\100 and its pollution line GT5U.multiblock.scanner.pollution\\100, and single-block machines send keys such as GT5U.infodata.progress. GregTech's scanner, the metrics cover and the Nuclear Control sensor card translate them; the Computronics gt_machine component passes them through as they are. The other lines are still coloured text.

Numbers use GTNHLib's formatter: the thousands separator follows the system locale instead of always being a comma, and from a trillion up a value is written as 1.23e12. For raw numbers, read getEUStored, getEUMaxStored, getWorkProgress and getWorkMaxProgress on the same component.

getSensorInformation() on a single-block machine

read before updating - GT5-Unofficial #5833. The steps are on the Before you update page.

Shipped in 13 pull requests

AE2 fluids and essentia through the StackAPI ​

OpenComputers' AE2 driver handles fluids and essentia the way it handles items, through a new StackAPI, and drives AE2 Fluid Crafting interfaces and buses. Repeated allItems() calls no longer crash the server or lock up the network.

Four calls changed for existing programs. setInterfacePatternInput and setInterfacePatternOutput take the pattern index second, as (slot, index, database, entry, size), where 2.8.4 took it last. A craftable from getCraftables() answers getStack() where it answered getItemStack(). getEssentiaInNetwork() lists essentia by aspect tag, such as aer, where 2.8.4 listed the gaseous essentia fluids. On a Thaumcraft aspect container, getAspects() returns the list of aspects itself instead of a table that holds it under aspects. storeInterfacePattern and clearInterfacePattern keep their arguments.

read before updating - OpenComputers #169

Shipped in: OpenComputers #169, OpenComputers #165

AE2 lookups by table, and NBT on the Data Card ​

AE2 network calls take a descriptor table: getItemInNetwork and the new getFluidInNetwork find one stack by table, and getCraftable finds one recipe the same way. getItemInNetwork also takes a numeric item id, request() takes amounts above two billion, and fluid amounts come back as 64-bit numbers instead of stopping at the int limit.

The Data Card reads and writes item NBT. decodeNBT and encodeNBT work on a table that keeps each tag's type, decodeNBTStr and encodeNBTStr on an SNBT string, and require("nbt").patch(component.data) returns a card whose decodeNBT result reads like a plain table.

Shipped in: OpenComputers #211, OpenComputers #194, OpenComputers #188, OpenComputers #183, OpenComputers #225, OpenComputers #167

LSC, geolyzer and Blood Altar readings ​

A Lapotronic Supercapacitor read through an Adapter reports its real stored and capacity figures. It still shows up as gt_machine. getStoredEU, getEUCapacity, getStoredEUString and getEUCapacityString now come from the bank itself, and the String calls hand back the full figure for a bank past the long limit.

geolyzer.analyze on a GregTech machine adds machineType (the unlocalized name), metaId (the class name) and gtMetaId (the machine ID), and reads sensorInformation from the GregTech machine itself. A block that is not a GregTech machine, such as the BartWorks Heated Water Pump, no longer returns sensorInformation.

getSacrificeMultiplier on a Blood Altar returns the sacrifice bonus from Runes of Sacrifice, 0 on a bare altar, where it returned the altar's capacity.

geolyzer.analyze on a GregTech machine

check your build - OpenComputers #179, OpenComputers #175. The steps are on the Before you update page.

Shipped in: OpenComputers #179, OpenComputers #175, OpenComputers #163

Longer pastes into a computer ​

maxSignalQueueSize in OpenComputers.cfg is 1024 in the 2.9.0 pack, up from 256, so a paste of up to 1024 lines arrives whole. A paste still sends one clipboard signal per line, up to 65536 characters.

enableClipboardBatching in the misc section of OpenComputers.cfg packs a paste into signals of clipboardBatchSize characters (256) instead, which lets far longer text through. It is off by default because a script that reads clipboard signals a line at a time gets the old shape only with it off.

Shipped in: OpenComputers #215, OpenComputers #212, OpenComputers #226

TecTech parameters are addressed by name ​

TecTech parameters are read and set by name. setParameter(name, value) writes one, and getParameters() returns a table of every parameter by name. Both are calls on the machine's gt_machine component; 2.8.4's tt_machine component and its setParameters(hatch, id, value) are gone, and getParameters(hatch, id) now returns the whole table instead of one number. The Space Elevator's Assembly, Pump and Mining modules, the Tesla Tower and the BEC machines carry these calls.

On the Space Miner the names are distance, parallel, cycle, cycleDistance, range and step. Its mode setting is now the on/off cycle, and overdrive cannot be set any more.

The other TecTech multiblocks, among them the Quantum Computer, Microwave Grinder, Network Switch, YOTTank, Compact Fusion Computers and Neutron Activator, have no parameter calls in 2.9.0, so a program cannot read or set their parameters.

Tesla Tower parameters by name

read before updating - GT5-Unofficial #6602

Shipped in: GT5-Unofficial #6602, Computronics #39

Stocking buses and hatches under computer control ​

OpenComputers drives the Stocking Input Bus (ME) and Stocking Input Hatch (ME) and their Advanced versions through an Adapter, as the me_inputbus and me_inputhatch components; in 2.8.4 they showed up as gt_machine. A program reads and sets each slot's configuration, auto-pull, the minimum amount for auto-pull, the refresh time in ticks and whether ME channels connect on every side.

A Data Stick copies an Output Hatch's mode and locked fluid as it already did an Output Bus's settings. The ME Output Bus takes ME Storage Cells pushed into its front, like the ME Output Hatch.

A Stocking Input Bus (ME) driven from Lua

Shipped in: GT5-Unofficial #8147, GT5-Unofficial #8174, OpenComputers #222

Contributors ​

Everyone who authored, reviewed or co-authored a change on this page, with how many of them:

@Dream-Master (16), @Eldrinn-Elantey (12), @hinyb (11), @Luca-Guettinger (11), @Azusfin (4), @guneykabel (3), @hxync (3), @Kogepan229 (2), @Nana-Sakura (2), @shironakoushi (2), @Algent (1), @AnsonYeung (1), @DreamYao520 (1), @Engineer12798 (1), @evgengoldwar (1), @FrostyFire1 (1), @Guvante (1), @koolkrafter5 (1), @Ktmi (1), @MarkinoTeck (1), @MassAnarchyy (1), @Nikolay-Sitnikov (1), @Ruling-0 (1), @TheYoingLad (1), @UltraProdigy (1), @Yoshy2002 (1), @zyf051520 (1)