Skip to content

RS Bridge return incorrect item "amount" and "isCraftable" #754

@Urkaz

Description

@Urkaz

Describe

Calling getItem with RS Bridge to a craftable item with 0 units in the system, it returns an incorrect amount of stored items and an invalid "craftable" status (check repro steps and screenshots below).

Steps to reproduce

  1. Using RS, connect to the same network: "Creative Controller", "Grid", "Pattern Grid", "Crafting Monitor", "Crafter Manager", "Crafter", a couple of Chests with "External storage"s.
  2. Put inside the chests 64 "Oak Planks".
  3. Create a Pattern to craft an "Oak Door" and place the pattern in the Crafter.
  4. Connect the RS Bridge to the network and to a computer.
  5. Run this script:
function dump(o)
   if type(o) == 'table' then
      local s = '{ '
      for k,v in pairs(o) do
         if type(k) ~= 'number' then k = '"'..k..'"' end
         s = s .. '['..k..'] = ' .. dump(v) .. ','
      end
      return s .. '} '
   else
      return tostring(o)
   end
end

local rsBridge = peripheral.find("rsBridge") or peripheral.find("rs_bridge")
local itemData = rsBridge.getItem({ name = "minecraft:oak_door" })
print(dump(itemData))
  1. Notice that it says "amount" = 3, and "isCraftable" = false, but you have 0 "Oak Doors" in the system and they can can be crafted.

Image

Image

Multiplayer?

Yes

Version

1.20.4-0.7.43a (Latest 1.20.4)

Minecraft, Forge and maybe other related mods versions

Forge 47.4.0 - Minecraft 1.20.1

Screenshots or Videos

No response

Crashlog/log

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds reviewNeeds review from an Contributor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions