MeatWheeze / NeepMeat

A Minecraft technology mod for the Fabric mod loader
GNU Lesser General Public License v3.0
13 stars 5 forks source link

Crash on world load after pump destroyed #12

Closed Derpford closed 3 months ago

Derpford commented 3 months ago

I was working on a large mincer when a creeper exploded near it. The creeper blew up a redstone pump, as well as many other things. I exited the world in frustration. When I re-entered the world, the game crashed with the following error:

Caused by: java.lang.NullPointerException: Cannot invoke "com.neep.neepmeat.api.FluidPump.getMode()" because the return value of "com.neep.neepmeat.transport.fluid_network.node.FluidNode.getPump()" is null
    at com.neep.neepmeat.transport.fluid_network.node.FluidNode.getPressureHeight(FluidNode.java:197) ~[neepmeat-0.2.22-beta+1.19.2.jar:?]
    at com.neep.neepmeat.transport.fluid_network.node.BlockPipeVertex.stepHeight(BlockPipeVertex.java:261) ~[neepmeat-0.2.22-beta+1.19.2.jar:?]
    at com.neep.neepmeat.transport.fluid_network.node.BlockPipeVertex.preTick(BlockPipeVertex.java:115) ~[neepmeat-0.2.22-beta+1.19.2.jar:?]
    at com.neep.neepmeat.transport.machine.fluid.FluidPipeBlockEntity.tick(FluidPipeBlockEntity.java:319) ~[neepmeat-0.2.22-beta+1.19.2.jar:?]
    at com.neep.neepmeat.transport.block.fluid_transport.FluidPipeBlock.lambda$getTicker$4(FluidPipeBlock.java:251) ~[neepmeat-0.2.22-beta+1.19.2.jar:?]
    at net.minecraft.class_2818$class_5563.method_31703(class_2818.java:660) ~[client-intermediary.jar:?]
    at net.minecraft.class_2818$class_5564.method_31703(class_2818.java:714) ~[client-intermediary.jar:?]
    at net.minecraft.class_1937.method_18471(class_1937.java:456) ~[client-intermediary.jar:?]
    at net.minecraft.class_3218.method_18765(class_3218.java:376) ~[client-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:875) ~[client-intermediary.jar:?]
    ... 5 more

I suspect something is storing the pump somewhere, then forgetting to check whether the pump exists later. On that note, I'm going to go scream into a pillow, because I was really enjoying this mod and having to start all over right before I was able to get a vascular network running is really frustrating.

MeatWheeze commented 3 months ago

I'm not sure how this happened. I can only reproduce this state by manually changing variables. Anyhow, but I have made FluidNodes with missing pumps fail silently.

Derpford commented 3 months ago

It might be something to do with blocks being broken specifically by explosions? It's worth noting that most of my setup got blown up--there was at least one tank, a mincer, a trommel, and a couple of stop valves that were broken as well as the pump.

Thanks for getting on this so fast, though.