Pam's HarvestCraft

Pam's HarvestCraft

87M Downloads

Markets not writing data to getUpdateTag.

covers1624 opened this issue ยท 3 comments

commented


As you can see from the attached screenshot, the market doesn't override and write data to getUpdateTag, there for when readFromNBT is called both "StockNum" and "Items" don't extist on the tag causing the item handler to throw an npe due to the passed in tag being null.

Caused by: java.lang.NullPointerException
	at net.minecraftforge.items.ItemStackHandler.deserializeNBT(ItemStackHandler.java:192) ~[ItemStackHandler.class:?]
	at com.pam.harvestcraft.tileentities.TileEntityMarket.readFromNBT(TileEntityMarket.java:44) ~[TileEntityMarket.class:?]
	at net.minecraft.tileentity.TileEntity.handleUpdateTag(TileEntity.java:331) ~[TileEntity.class:?]
	at net.minecraft.client.network.NetHandlerPlayClient.handleChunkData(NetHandlerPlayClient.java:758) ~[NetHandlerPlayClient.class:?]
	at net.minecraft.network.play.server.SPacketChunkData.processPacket(SPacketChunkData.java:101) ~[SPacketChunkData.class:?]
	at net.minecraft.network.play.server.SPacketChunkData.processPacket(SPacketChunkData.java:1) ~[SPacketChunkData.class:?]
	at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:15) ~[PacketThreadUtil$1.class:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_101]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_101]
	at net.minecraft.util.Util.runTask(Util.java:50) ~[Util.class:?]
	... 15 more

I shall submit a pr fix for this if you wish.

commented

this also happen in 1.11.2

commented

Also i should add, due to the npe thrown by the Market's readFromNBT method, this causes all other tiles in the chunk on the client to not be loaded, this causes all the issues with mods and their rendering.

commented

Fixed in 1.12.1b