Refined Storage

Refined Storage

77M Downloads

getPatterns() returns nil in OpenComputers

fspijkerman opened this issue ยท 2 comments

commented

Issue description:

Trying to use the Refined Storage API via OpenComputers
when calling getPatterns() the function returns nil instead of a table

What happens

OC Lua script:

local component = require("component")
local rs = component.block_refinedstorage_cable

print(rs.isConnected())    -- bool (true)
print(rs.getEnergyUsage()) -- number
print(rs.getItems())       -- table
print(rs.getPatterns())    -- nil

Output:

true
190
table: 0x7f8ff5cc19d0
nil

What you expected to happen:

Expected rs.getPatterns() to return a table

Steps to reproduce:

  1. Make an OC computer case (with cpu, mem, eeprom, disk) , screen, keyboard and an adapter.
  2. Make a RS controller, crafting grid, crafter.
  3. Add some crafting patterns in the crafter.
  4. Connect a RS cable to the OC Adapter (also tried with an Interface).
  5. Run the script supplied above on OC.

Versions:

  • Minecraft: 1.12.2
  • Forge: 1.12.2-14.23.2.2611
  • Refined Storage: 1.5.33
  • OpenComputers: MC1.12.2-1.7.2.67

Does this issue occur on a server? [yes/no] Yes

If a (crash)log is relevant for this issue, link it here:

No logs

OC Setup:

image

commented

Tested locally, works as expected!

Been trying to find out why its not working on my server.
It seems to be very sensitive in how much memory there is available for OC.
Works better with a smaller network + more memory in OC (server)

commented

Did some more further testing and was able to track it down on the amount of patterns in the network. When I have ~ 266 patterns in the network its causing OC to run out of memory if you call getPatterns().