After update items tranfer with RS Bridge does no longer work
mcenderdragon opened this issue ยท 21 comments
Descripe
I updated to advancedperipherals-1.16.5-0.7.2r.jar and now the function exportItemToPeripheral no longer transfer items (alias it always return 0) te script worked before and after renamig the method since it was chest before it runns but transfers 0 items.
Steps to reproduce
try to extract any item from a RS system and it jsut doesnt work, in the server log is a NUllPointerException lsited for a CC script, but I dont know id it was this.
Multiplayer?
Yes
Version
0.7.1r (Latest)
Minecraft, Forge and maybe other related mods versions
36.2.4 1.16.5
Screenshots or Videos
No response
Crashlog/log
No response
i encountered this exact issue, no crash though. It appears that items get exported (swords, sticks, etc.), but not blocks. I'm playing on ATM6-1.8.18
Not sure what the issue is.
I'll mark it as high priority and try to reproduce it again.
ok nope found them again
[20:41:48] [Server thread/ERROR] [computercraft/]: Error running task
java.lang.NullPointerException: null
at de.srendi.advancedperipherals.common.addons.refinedstorage.RefinedStorageAddon.getItems(RefinedStorageAddon.java:125) ~[advancedperipherals:0.7.2r] {re:classloading}
the log:
[05Okt2021 17:14:27.756] [Server thread/ERROR] [computercraft/]: Error running task
java.lang.NullPointerException: null
[05Okt2021 17:14:38.057] [Server thread/ERROR] [computercraft/]: Error running task
java.lang.NullPointerException: null
[05Okt2021 17:14:42.013] [Server thread/DEBUG] [com.refinedmods.refinedstorage.apiimpl.network.Network/]: Network at position BlockPos{x=-1155, y=76, z=1799} changed running state to true, causing an invalidation of the node graph
[05Okt2021 17:14:42.015] [Server thread/DEBUG] [com.refinedmods.refinedstorage.apiimpl.network.node.ExternalStorageNetworkNode/]: Connectivity state of external storage at BlockPos{x=-513, y=72, z=36} changed to true due to GRAPH_CHANGE
[05Okt2021 17:14:42.015] [Server thread/DEBUG] [com.refinedmods.refinedstorage.apiimpl.network.node.ExternalStorageNetworkNode/]: Connectivity state of external storage at BlockPos{x=-516, y=66, z=44} changed to true due to GRAPH_CHANGE
[05Okt2021 17:14:42.015] [Server thread/DEBUG] [com.refinedmods.refinedstorage.apiimpl.network.node.ExternalStorageNetworkNode/]: Connectivity state of external storage at BlockPos{x=-515, y=67, z=42} changed to true due to GRAPH_CHANGE
[05Okt2021 17:14:42.015] [Server thread/DEBUG] [com.refinedmods.refinedstorage.apiimpl.network.node.ExternalStorageNetworkNode/]: Connectivity state of external storage at BlockPos{x=-516, y=67, z=45} changed to true due to GRAPH_CHANGE
[05Okt2021 17:14:42.015] [Server thread/DEBUG] [com.refinedmods.refinedstorage.apiimpl.storage.cache.ItemStorageCache/]: Invalidating item storage cache of network at position BlockPos{x=-1155, y=76, z=1799} due to CONNECTED_STATE_CHANGED
[05Okt2021 17:14:42.021] [Server thread/DEBUG] [com.refinedmods.refinedstorage.apiimpl.storage.cache.FluidStorageCache/]: Invalidating fluid storage cache of network at position BlockPos{x=-1155, y=76, z=1799} due to CONNECTED_STATE_CHANGED
[05Okt2021 17:14:42.021] [Server thread/DEBUG] [com.refinedmods.refinedstorage.apiimpl.storage.cache.ItemStorageCache/]: Invalidating item storage cache of network at position BlockPos{x=-1155, y=76, z=1799} due to CONNECTED_STATE_CHANGED
[05Okt2021 17:14:42.028] [Server thread/DEBUG] [com.refinedmods.refinedstorage.apiimpl.storage.cache.FluidStorageCache/]: Invalidating fluid storage cache of network at position BlockPos{x=-1155, y=76, z=1799} due to CONNECTED_STATE_CHANGED
[05Okt2021 17:14:42.028] [Server thread/DEBUG] [com.refinedmods.refinedstorage.apiimpl.storage.cache.ItemStorageCache/]: Invalidating item storage cache of network at position BlockPos{x=-1155, y=76, z=1799} due to CONNECTED_STATE_CHANGED
[05Okt2021 17:14:42.036] [Server thread/DEBUG] [com.refinedmods.refinedstorage.apiimpl.storage.cache.ItemStorageCache/]: Invalidating item storage cache of network at position BlockPos{x=-1155, y=76, z=1799} due to CONNECTED_STATE_CHANGED
[05Okt2021 17:14:42.042] [Server thread/DEBUG] [com.refinedmods.refinedstorage.apiimpl.storage.cache.FluidStorageCache/]: Invalidating fluid storage cache of network at position BlockPos{x=-1155, y=76, z=1799} due to CONNECTED_STATE_CHANGED
[05Okt2021 17:14:42.042] [Server thread/DEBUG] [com.refinedmods.refinedstorage.apiimpl.storage.cache.FluidStorageCache/]: Invalidating fluid storage cache of network at position BlockPos{x=-1155, y=76, z=1799} due to CONNECTED_STATE_CHANGED
The script:
settings.load("disk/settings")
meltable = settings.get("meltable", {})
n_chest = "ironchest:iron_chest_0"
n_rs = "rsBridge_1"
chest = peripheral.wrap(n_chest)
rsB = peripheral.wrap(n_rs)
const_ore = "forge:ores"
function contains(tlist, elem)
if tlist == nil then
return false
end
for _, value in pairs(tlist) do
if elem == value then
return true
end
end
end
function isMeltable(tags)
for _, v in pairs(tags) do
if v:find("^forge:ores/") ~= nil then
if meltable[v] == nil then
print("Is this smelt able? [Y/N]")
print(v)
r = read()
if r == "Y" then
meltable[v] = true
else
meltable[v] = false
end
settings.set("meltable", meltable)
settings.save("disk/settings")
end
if meltable[v] then
return true, v
end
end
end
return false
end
function isChestEmpty()
local list = chest.list()
if list == nil then
return true
elseif list[1] == nil then
return true
else
local l_ore = settings.get("ore", nil)
if l_ore == nil then
return false
else
for slot,item in pairs(list) do
if not contains(item.tags, l_ore) then
return false
end
end
return true
end
end
end
items = rsB.listItems()
function getNextOre()
o = settings.get("ore", nil)
if o ~= nil then
return o
end
for k,v in pairs(items) do
if contains(v.tags, const_ore) then
print(v.name)
bmeltable,ore = isMeltable(v.tags)
if bmeltable then
settings.set("ore", ore)
settings.save("disk/settings")
return ore
end
end
end
end
n_ore = getNextOre()
if n_ore == nil then
print("NO more Ores")
return
end
if isChestEmpty() then
transfer = 0
for k,v in pairs(items) do
if contains(v.tags, n_ore) then
print("Transfering", v.name)
################ the following line returns always 0 ##########
transfer = transfer + rsB.exportItemToPeripheral(v, n_chest)
end
end
if transfer == 0 then
print("Transfered no items, reset ore. was:", settings.get("ore", ""))
settings.unset("ore")
settings.save("disk/settings")
else
print("Transfered Ores:", transfer)
end
else
print("Already Items in Chest")
end
settings:
{
pos = "uplaod",
meltable = {
[ "forge:ores/cobalt" ] = true,
[ "forge:ores/pearl" ] = false,
[ "forge:ores/platinum" ] = true,
[ "forge:ores/iron" ] = true,
[ "forge:ores/coal" ] = false,
[ "forge:ores/copper" ] = true,
[ "forge:ores/sunstone" ] = false,
[ "forge:ores/gold" ] = true,
[ "forge:ores/nickel" ] = true,
[ "forge:ores/ammolite" ] = false,
[ "forge:ores/lead" ] = true,
[ "forge:ores/uranium" ] = true,
[ "forge:ores/rose_quartz" ] = false,
[ "forge:ores/bauxite" ] = false,
[ "forge:ores/magnetite" ] = false,
[ "forge:ores/kunzite" ] = false,
[ "forge:ores/silver" ] = true,
[ "forge:ores/lapis" ] = false,
[ "forge:ores/pyrope" ] = false,
[ "forge:ores/aluminum" ] = true,
[ "forge:ores/redstone" ] = false,
[ "forge:ores/bismuth" ] = false,
[ "forge:ores/sodalite" ] = false,
[ "forge:ores/zinc" ] = true,
[ "forge:ores/coral" ] = false,
[ "forge:ores/azure_silver" ] = false,
[ "forge:ores/tin" ] = true,
[ "forge:ores/inferium" ] = false,
},
}
Setup is a modem network and the rs bridge is directly near an iron chest from iron chest.
NUllPointerException lsited for a CC script,
Is there something in the client log(Or server log if you play on a server)?
jup, my setup looks like that, the only difference is chest & brige use the same modem block and the computer is connected via cable.
found this crash:
java.lang.NullPointerException: null
at de.srendi.advancedperipherals.common.addons.refinedstorage.RefinedStorage.getItems(RefinedStorage.java:151) ~[advancedperipherals:0.7.2r] {re:classloading}
at de.srendi.advancedperipherals.common.addons.refinedstorage.RefinedStorage.listItems(RefinedStorage.java:64) ~[advancedperipherals:0.7.2r] {re:classloading}
at de.srendi.advancedperipherals.common.addons.computercraft.peripheral.RsBridgePeripheral.listItems(RsBridgePeripheral.java:53) ~[advancedperipherals:0.7.2r] {re:classloading}
at de.srendi.advancedperipherals.common.addons.computercraft.peripheral.RsBridgePeripheral$cc$listItems43.apply(CC generated method) ~[?:?] {re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading}
at dan200.computercraft.core.asm.PeripheralMethod.lambda$null$0(PeripheralMethod.java:21) ~[computercraft:1.98.2] {re:classloading}
at dan200.computercraft.core.lua.LuaContext.lambda$issueMainThreadTask$0(LuaContext.java:36) ~[computercraft:1.98.2] {re:classloading}
at dan200.computercraft.core.computer.MainThreadExecutor.execute(MainThreadExecutor.java:143) ~[computercraft:1.98.2] {re:classloading}
at dan200.computercraft.core.computer.MainThread.executePendingTasks(MainThread.java:157) ~[computercraft:1.98.2] {re:classloading}
at dan200.computercraft.shared.CommonHooks.onServerTick(CommonHooks.java:59) ~[computercraft:1.98.2] {re:classloading}
at net.minecraftforge.eventbus.ASMEventHandler_269_CommonHooks_onServerTick_ServerTickEvent.invoke(.dynamic) ~[?:?] {}
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?] {}
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?] {}
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?] {}
at net.minecraftforge.fml.hooks.BasicEventHooks.onPreServerTick(BasicEventHooks.java:115) ~[forge:?] {re:classloading}
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:785) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone.mixins.json:entities.MinecraftServerMixin,pl:mixin:APP:imm_ptl_mixins.json:common.MixinMinecraftServer,pl:mixin:APP:imm_ptl_mixins.json:common.dimension.MixinMinecraftServer_D,pl:mixin:APP:imm_ptl_mixins.json:common.portal_generation.MixinMinecraftServer_P,pl:mixin:APP:imm_ptl_peripheral_mixins.json:common.altius_world.MixinMinecraftServer_A,pl:mixin:A,pl:runtimedistcleaner:A}
at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:642) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone.mixins.json:entities.MinecraftServerMixin,pl:mixin:APP:imm_ptl_mixins.json:common.MixinMinecraftServer,pl:mixin:APP:imm_ptl_mixins.json:common.dimension.MixinMinecraftServer_D,pl:mixin:APP:imm_ptl_mixins.json:common.portal_generation.MixinMinecraftServer_P,pl:mixin:APP:imm_ptl_peripheral_mixins.json:common.altius_world.MixinMinecraftServer_A,pl:mixin:A,pl:runtimedistcleaner:A}
at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone.mixins.json:entities.MinecraftServerMixin,pl:mixin:APP:imm_ptl_mixins.json:common.MixinMinecraftServer,pl:mixin:APP:imm_ptl_mixins.json:common.dimension.MixinMinecraftServer_D,pl:mixin:APP:imm_ptl_mixins.json:common.portal_generation.MixinMinecraftServer_P,pl:mixin:APP:imm_ptl_peripheral_mixins.json:common.altius_world.MixinMinecraftServer_A,pl:mixin:A,pl:runtimedistcleaner:A}
at java.lang.Thread.run(Unknown Source) [?:1.8.0_251] {}
[20:32:10] [Server thread/ERROR] [computercraft/]: Error running task
java.lang.NullPointerException: null
at de.srendi.advancedperipherals.common.addons.refinedstorage.RefinedStorage.getItems(RefinedStorage.java:151) ~[advancedperipherals:0.7.2r] {re:classloading}
at de.srendi.advancedperipherals.common.addons.refinedstorage.RefinedStorage.listItems(RefinedStorage.java:64) ~[advancedperipherals:0.7.2r] {re:classloading}
at de.srendi.advancedperipherals.common.addons.computercraft.peripheral.RsBridgePeripheral.listItems(RsBridgePeripheral.java:53) ~[advancedperipherals:0.7.2r] {re:classloading}
at de.srendi.advancedperipherals.common.addons.computercraft.peripheral.RsBridgePeripheral$cc$listItems43.apply(CC generated method) ~[?:?] {re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading,re:classloading}
at dan200.computercraft.core.asm.PeripheralMethod.lambda$null$0(PeripheralMethod.java:21) ~[computercraft:1.98.2] {re:classloading}
at dan200.computercraft.core.lua.LuaContext.lambda$issueMainThreadTask$0(LuaContext.java:36) ~[computercraft:1.98.2] {re:classloading}
at dan200.computercraft.core.computer.MainThreadExecutor.execute(MainThreadExecutor.java:143) ~[computercraft:1.98.2] {re:classloading}
at dan200.computercraft.core.computer.MainThread.executePendingTasks(MainThread.java:157) ~[computercraft:1.98.2] {re:classloading}
at dan200.computercraft.shared.CommonHooks.onServerTick(CommonHooks.java:59) ~[computercraft:1.98.2] {re:classloading}
at net.minecraftforge.eventbus.ASMEventHandler_269_CommonHooks_onServerTick_ServerTickEvent.invoke(.dynamic) ~[?:?] {}
at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?] {}
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?] {}
at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?] {}
at net.minecraftforge.fml.hooks.BasicEventHooks.onPreServerTick(BasicEventHooks.java:115) ~[forge:?] {re:classloading}
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:785) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone.mixins.json:entities.MinecraftServerMixin,pl:mixin:APP:imm_ptl_mixins.json:common.MixinMinecraftServer,pl:mixin:APP:imm_ptl_mixins.json:common.dimension.MixinMinecraftServer_D,pl:mixin:APP:imm_ptl_mixins.json:common.portal_generation.MixinMinecraftServer_P,pl:mixin:APP:imm_ptl_peripheral_mixins.json:common.altius_world.MixinMinecraftServer_A,pl:mixin:A,pl:runtimedistcleaner:A}
at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:642) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone.mixins.json:entities.MinecraftServerMixin,pl:mixin:APP:imm_ptl_mixins.json:common.MixinMinecraftServer,pl:mixin:APP:imm_ptl_mixins.json:common.dimension.MixinMinecraftServer_D,pl:mixin:APP:imm_ptl_mixins.json:common.portal_generation.MixinMinecraftServer_P,pl:mixin:APP:imm_ptl_peripheral_mixins.json:common.altius_world.MixinMinecraftServer_A,pl:mixin:A,pl:runtimedistcleaner:A}
at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:the_bumblezone.mixins.json:entities.MinecraftServerMixin,pl:mixin:APP:imm_ptl_mixins.json:common.MixinMinecraftServer,pl:mixin:APP:imm_ptl_mixins.json:common.dimension.MixinMinecraftServer_D,pl:mixin:APP:imm_ptl_mixins.json:common.portal_generation.MixinMinecraftServer_P,pl:mixin:APP:imm_ptl_peripheral_mixins.json:common.altius_world.MixinMinecraftServer_A,pl:mixin:A,pl:runtimedistcleaner:A}
at java.lang.Thread.run(Unknown Source) [?:1.8.0_251] {}
advancedperipherals-1.16.5-0.7.2r.zip
Could you try this version? Unzip the file before using it.
I can't reproduce this issue on my own
Do you want to try it with the new released 0.7.3?
I'm experiencing the same problem that OP reported. There's no crash, but exporting simply doesn't work.
I'm experiencing the same problem that OP reported. There's no crash, but exporting simply doesn't work.
Could you give me some information about your environment(Versions)?
Minecraft 1.16.5
Forge 36.2.26
CC: Tweaked 1.100.2
JEI 7.7.1.145
Advanced Peripherals 1.16.5-0.7.7.1r
advancedperipherals-1.16.5-0.7.7.1r.zip
If someone wanna test it, here is the build with the fix. Only using it on the server would be enough.
Unzip the file before using.