Create Slice & Dice

Create Slice & Dice

16M Downloads

Crash if a smart observer/threshold swith wants to read the item of a slicer

MrRedstoneToGo opened this issue ยท 2 comments

commented

What happened?

I have built a factory in which, among other things, a slicer should cut items. He always needs a tool for this. As this tool breaks over time, you always have to add new tools, for example by using a smart observer/threshold switch to check whether the tool is in the slicer and if the slicer is empty, that a new tool is produced. The problem: das Spiel crasht, if a smart observer or threshold switch reads the fill level of a slicer!

By the way: If you look at a slicer with Jade, you can't see which tool is in it. Maybe this has something to do with it.

Loader

fabric

Mod Version

3.2.1

Minecraft Version

1.20

Relevant log output

[19:07:56] [Server thread/ERROR]:
 Encountered an unexpected exception
net.minecraft.class_148: Ticking block entity
	at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:901) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:824) ~[client-intermediary.jar:?]
	at net.minecraft.class_1132.method_3748(class_1132.java:105) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:671) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:265) ~[client-intermediary.jar:?]
	at java.lang.Thread.run(Unknown Source) ~[?:?]
Caused by: java.lang.NullPointerException: Parameter specified as non-null is null: method com.possible_triangle.sliceanddice.block.slicer.SlicerTile.getItemStorage, parameter side
	at com.possible_triangle.sliceanddice.block.slicer.SlicerTile.getItemStorage(SlicerTile.kt) ~[sliceanddice-fabric-3.2.1.jar:?]
	at net.fabricmc.fabric.api.transfer.v1.item.ItemStorage.lambda$static$1(ItemStorage.java:98) ~[fabric-transfer-api-v1-3.3.5+8dd72ea377-394e3c6b4f860686.jar:?]
	at net.fabricmc.fabric.impl.lookup.block.BlockApiLookupImpl.find(BlockApiLookupImpl.java:99) ~[fabric-api-lookup-api-v1-1.6.36+1802ada577-ca85169d3962a9ef.jar:?]
	at io.github.fabricators_of_create.porting_lib.transfer.TransferUtil.getItemStorage(TransferUtil.java:130) ~[porting_lib_transfer-2.3.4+1.20.1-249a31b60fbe884c.jar:?]
	at io.github.fabricators_of_create.porting_lib.transfer.TransferUtil.getItemStorage(TransferUtil.java:80) ~[porting_lib_transfer-2.3.4+1.20.1-249a31b60fbe884c.jar:?]
	at io.github.fabricators_of_create.porting_lib.transfer.TransferUtil.getItemStorage(TransferUtil.java:85) ~[porting_lib_transfer-2.3.4+1.20.1-249a31b60fbe884c.jar:?]
	at com.simibubi.create.foundation.blockEntity.behaviour.inventory.InvManipulationBehaviour$UnsidedItemStorageProvider.get(InvManipulationBehaviour.java:123) ~[create-fabric-0.5.1-f-build.1417+mc1.20.1.jar:?]
	at com.simibubi.create.foundation.blockEntity.behaviour.inventory.CapManipulationBehaviourBase$UnsidedStorageProvider.get(CapManipulationBehaviourBase.java:123) ~[create-fabric-0.5.1-f-build.1417+mc1.20.1.jar:?]
	at com.simibubi.create.foundation.blockEntity.behaviour.inventory.CapManipulationBehaviourBase.getInventory(CapManipulationBehaviourBase.java:65) ~[create-fabric-0.5.1-f-build.1417+mc1.20.1.jar:?]
	at com.simibubi.create.foundation.blockEntity.behaviour.inventory.CapManipulationBehaviourBase.hasInventory(CapManipulationBehaviourBase.java:58) ~[create-fabric-0.5.1-f-build.1417+mc1.20.1.jar:?]
	at com.simibubi.create.content.redstone.smartObserver.SmartObserverBlockEntity.tick(SmartObserverBlockEntity.java:115) ~[create-fabric-0.5.1-f-build.1417+mc1.20.1.jar:?]
	at com.simibubi.create.foundation.blockEntity.SmartBlockEntityTicker.tick(SmartBlockEntityTicker.java:15) ~[create-fabric-0.5.1-f-build.1417+mc1.20.1.jar:?]
	at net.minecraft.class_2818$class_5563.method_31703(class_2818.java:662) ~[client-intermediary.jar:?]
	at net.minecraft.class_2818$class_5564.method_31703(class_2818.java:716) ~[client-intermediary.jar:?]
	at net.minecraft.class_1937.method_18471(class_1937.java:470) ~[client-intermediary.jar:?]
	at net.minecraft.class_3218.method_18765(class_3218.java:390) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:897) ~[client-intermediary.jar:?]
	... 5 more
commented

caused by the same bug as #148

commented

There is another problem: If a Slicer cuts an item in a Basin, the tool only loses Durability when it is removed. On a depot or belt, the tool does not lose durability.

Strangely enough, the tool in the slicer is broken at some point (slicer no longer cuts), but is still unused in the slicer's inventory and can easily be taken out again with a funnel, but not by hand.