Closed superdumpling closed 3 years ago
I loaded mc with the mod removed and it didn't crash, reloaded with the mod reinstalled but when I copy and pasted the danks into my inventory from a previous backup using nbt editor, all my items that were in them are gone
Reviewing the source code and the error message above, it looks like inv
should be checked for null in the MixinHooks.onItemPickup
method.
Apparently, Utils.getInventory
can return null
, which causes a null reference exception later in the method. I don't know the best way to handle this, but a null check and exiting the method could prevent a crash (though it might be good to log the condition and other details...)
DankInventory inv = Utils.getInventory(dank,player.level);
(Note: I'm a .Net developer and my tools are not setup for Java, so I'll have difficulty submitting a runtime tested PR)
"inv" is no longer a thing in 1.17 as it was moved to be fully serverside in 1.17. Hence this bug report is invalid.
crash when picking up any item some context: dank was working mostly fine up until I had an unrelated crash with rswires ( now fixed ), however dank is still broken after that crash. I've crashed many times before that crash and dank was fine after reloading the game except the rswires crash. From what I can tell ( may be wrong ) somehow, the "inv" of the danks were removed by that specific rswires crash, but that doesn't really explain how the older backups where dank was working fine crash with the same log. No matter what I try I am unable to get back the items I had in them, also using nbt explorer I was able to see that there were multiple entries of level.dat and playerdata in my world, I'm not sure if that's to do with dank breaking because in the older backups there were only 2 of each, like level.dat and level.dat_old. If the bug is unfixable, Is there a way to view the contents of the danks in previous backups without loading in (and crashing)? I'll take anything at this point, I just want my items in the danks back. I don't rlly care about the items that were in the docks. sorry for the text wall
-----------------------------------------------
Description: Ticking player
also crashing on world join that was happening before removing the docks in a world editor
-----------------------------------------------
[22:39:46] [Server thread/ERROR]: Encountered an unexpected exception net.minecraft.class_148: Exception ticking world at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:895) ~[intermediary-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:831) ~[intermediary-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.class_1132.method_3748(class_1132.java:118) ~[intermediary-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697) ~[intermediary-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-fabric-loader-0.11.6-1.17.1.jar:?] at java.lang.Thread.run(Thread.java:831) [?:?] Caused by: java.lang.NullPointerException: Cannot invoke "tfar.dankstorage.world.DankInventory.method_5439()" because the return value of "tfar.dankstorage.blockentity.DockBlockEntity.getInventory()" is null at tfar.dankstorage.blockentity.DockBlockEntity.method_5439(DockBlockEntity.java:106) ~[dankstorage-2.1-1.17.1.jar:?] at alexiil.mc.lib.attributes.item.compat.FixedInventoryViewVanillaWrapper.getSlotCount(FixedInventoryViewVanillaWrapper.java:31) ~[1c69892f-626d-4a5d-80aa-693f511b9f9c.jar:?] at alexiil.mc.lib.attributes.item.impl.GroupedItemInvFixedWrapper.simpleDumbBadInsertionToBeRemoved(GroupedItemInvFixedWrapper.java:41) ~[1c69892f-626d-4a5d-80aa-693f511b9f9c.jar:?] at alexiil.mc.lib.attributes.item.impl.GroupedItemInvFixedWrapper.attemptInsertion(GroupedItemInvFixedWrapper.java:37) ~[1c69892f-626d-4a5d-80aa-693f511b9f9c.jar:?] at alexiil.mc.lib.attributes.item.filter.ItemInsertableFilter.matches(ItemInsertableFilter.java:32) ~[1c69892f-626d-4a5d-80aa-693f511b9f9c.jar:?] at alexiil.mc.lib.attributes.item.filter.AggregateItemFilter.matches(AggregateItemFilter.java:186) ~[1c69892f-626d-4a5d-80aa-693f511b9f9c.jar:?] at alexiil.mc.lib.attributes.item.FixedItemInv.extractStack(FixedItemInv.java:158) ~[1c69892f-626d-4a5d-80aa-693f511b9f9c.jar:?] at alexiil.mc.lib.attributes.item.impl.GroupedItemInvFixedWrapper.attemptExtraction(GroupedItemInvFixedWrapper.java:60) ~[1c69892f-626d-4a5d-80aa-693f511b9f9c.jar:?] at alexiil.mc.lib.attributes.item.ItemInvUtil.move(ItemInvUtil.java:110) ~[1c69892f-626d-4a5d-80aa-693f511b9f9c.jar:?] at alexiil.mc.lib.attributes.item.ItemInvUtil.move(ItemInvUtil.java:91) ~[1c69892f-626d-4a5d-80aa-693f511b9f9c.jar:?] at me.steven.indrev.networks.item.ItemNetwork.tickOutput$doMove(ItemNetwork.java:102) ~[indrev-1.10.0-alpha.11.jar:?] at me.steven.indrev.networks.item.ItemNetwork.tickOutput(ItemNetwork.java:108) ~[indrev-1.10.0-alpha.11.jar:?] at me.steven.indrev.networks.item.ItemNetwork.tick(ItemNetwork.java:58) ~[indrev-1.10.0-alpha.11.jar:?] at me.steven.indrev.networks.NetworkState.tick(NetworkState.java:61) ~[indrev-1.10.0-alpha.11.jar:?] at me.steven.indrev.networks.ServoNetworkState.tick(ServoNetworkState.java:31) ~[indrev-1.10.0-alpha.11.jar:?] at me.steven.indrev.networks.NetworkEvents.onEndTick(NetworkEvents.java:13) ~[indrev-1.10.0-alpha.11.jar:?] at net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents.lambda$static$6(ServerTickEvents.java:108) ~[42dbf5c1-e250-4699-8a87-604abd38bd5e.jar:?] at net.minecraft.class_1937.handler$cff000$tickWorldAfterBlockEntities(class_1937.java:4094) ~[intermediary-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.class_1937.method_18471(class_1937.java:479) ~[intermediary-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.class_3218.method_18765(class_3218.java:422) ~[intermediary-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:891) ~[intermediary-fabric-loader-0.11.6-1.17.1.jar:?]
-----------------------------------------------