From 0b26602190bb40b501c15b2e7672131b97f325b6 Mon Sep 17 00:00:00 2001 From: draknyte1 Date: Sat, 18 Feb 2017 09:43:48 +1000 Subject: % Changed NBT handling for the FishTrap Inventory and Tile entity. $ Fish Traps no longer work if they have more than 4 others directly beside them. (Fixes an issue where a FishTrap out of water with 4-6 other traps around it would still work). --- src/Java/gtPlusPlus/core/inventories/InventoryFishtrap.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Java/gtPlusPlus/core/inventories') diff --git a/src/Java/gtPlusPlus/core/inventories/InventoryFishtrap.java b/src/Java/gtPlusPlus/core/inventories/InventoryFishtrap.java index 9037de451f..7af1f08bd7 100644 --- a/src/Java/gtPlusPlus/core/inventories/InventoryFishtrap.java +++ b/src/Java/gtPlusPlus/core/inventories/InventoryFishtrap.java @@ -1,5 +1,6 @@ package gtPlusPlus.core.inventories; +import gtPlusPlus.core.util.Utils; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -34,6 +35,7 @@ public class InventoryFishTrap implements IInventory{ int slot = data.getInteger("Slot"); if(slot >= 0 && slot < INV_SIZE) { + Utils.LOG_INFO("Trying to read NBT data from inventory."); inventory[slot] = ItemStack.loadItemStackFromNBT(data); } } @@ -47,6 +49,7 @@ public class InventoryFishTrap implements IInventory{ ItemStack stack = inventory[i]; if(stack != null) { + Utils.LOG_INFO("Trying to write NBT data to inventory."); NBTTagCompound data = new NBTTagCompound(); stack.writeToNBT(data); data.setInteger("Slot", i); -- cgit