Storage Drawers: Forestry Pack

Storage Drawers: Forestry Pack

6M Downloads

Crash when drawers are placed by Create's schematic cannon

segabl opened this issue ยท 2 comments

commented

When Create's schematic cannon attempts to place a drawer, the server crashes with the following exception:

net.minecraft.crash.ReportedException: Ticking block entity
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:854) ~[?:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:291) ~[?:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:786) ~[?:?]
        at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:641) ~[?:?]
        at net.minecraft.server.MinecraftServer.lambda$startServer$0(MinecraftServer.java:232) ~[?:?]
        at java.lang.Thread.run(Thread.java:832) [?:?]
Caused by: java.lang.NullPointerException
        at com.jaquadro.minecraft.storagedrawers.block.BlockDrawers.func_180633_a(BlockDrawers.java:219) ~[storagedrawers:1.16.3-8.2.1]
        at com.simibubi.create.content.schematics.block.LaunchedItem$ForBlockState.place(LaunchedItem.java:171) ~[create:mc1.16.3_v0.3e]
        at com.simibubi.create.content.schematics.block.LaunchedItem.update(LaunchedItem.java:66) ~[create:mc1.16.3_v0.3e]
        at com.simibubi.create.content.schematics.block.SchematicannonTileEntity.tickFlyingBlocks(SchematicannonTileEntity.java:773) ~[create:mc1.16.3_v0.3e]
        at com.simibubi.create.content.schematics.block.SchematicannonTileEntity.func_73660_a(SchematicannonTileEntity.java:295) ~[create:mc1.16.3_v0.3e]
        at net.minecraft.world.World.func_217391_K(World.java:491) ~[?:?]
        at net.minecraft.world.server.ServerWorld.func_72835_b(ServerWorld.java:371) ~[?:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:850) ~[?:?]
        ... 5 more
commented

The issue is caused by onBlockPlacedBy method inside BlockDrawers lacking null check for placer entity.

if (entity.getHeldItemOffhand().getItem() == ModItems.DRAWER_KEY) {

commented

PR #786 is a fix for this, it just hasn't been merged for some reason. I just encountered the same thing.