diff --git a/src/main/java/jds/bibliocraft/ClientProxy.java b/src/main/java/jds/bibliocraft/ClientProxy.java index 0df8557..890fd6c 100644 --- a/src/main/java/jds/bibliocraft/ClientProxy.java +++ b/src/main/java/jds/bibliocraft/ClientProxy.java @@ -175,6 +175,7 @@ public class ClientProxy extends CommonProxy { + @SuppressWarnings("unchecked") public void registerRenderers() { MinecraftForge.EVENT_BUS.register(TextureStichHandler.instance); diff --git a/src/main/java/jds/bibliocraft/network/packet/server/BiblioUpdateInv.java b/src/main/java/jds/bibliocraft/network/packet/server/BiblioUpdateInv.java index f9c460b..67c9514 100644 --- a/src/main/java/jds/bibliocraft/network/packet/server/BiblioUpdateInv.java +++ b/src/main/java/jds/bibliocraft/network/packet/server/BiblioUpdateInv.java @@ -12,6 +12,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumHand; import net.minecraftforge.common.util.Constants; import net.minecraftforge.fml.common.network.ByteBufUtils; @@ -62,8 +63,10 @@ public IMessage onMessage(BiblioUpdateInv message, MessageContext ctx) { for (int i = 0; i <= list.tagCount(); i++) { - Item testItem = new ItemStack(list.getCompoundTagAt(i)).getItem(); - if (!(testItem instanceof ItemEmptyMap || testItem instanceof ItemMap || testItem instanceof ItemWaypointCompass)) + ItemStack testStack = new ItemStack(list.getCompoundTagAt(i)); + Item testItem = testStack.getItem(); + System.out.println(testItem.getUnlocalizedName()); + if (!testStack.isEmpty() && !(testItem instanceof ItemEmptyMap || testItem instanceof ItemMap || testItem instanceof ItemWaypointCompass)) { safe = false; }