diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java index 719938b5..b922c548 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityNatureAltar.java @@ -208,7 +208,7 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickable { public void writeNBT(NBTTagCompound compound, SaveType type) { super.writeNBT(compound, type); if (type != SaveType.BLOCK) { - compound.setTag("ingredients", this.items.serializeNBT()); + compound.setTag("items", this.items.serializeNBT()); compound.setBoolean("fine", this.structureFine); this.container.writeNBT(compound); } @@ -224,7 +224,7 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickable { public void readNBT(NBTTagCompound compound, SaveType type) { super.readNBT(compound, type); if (type != SaveType.BLOCK) { - this.items.deserializeNBT(compound.getCompoundTag("ingredients")); + this.items.deserializeNBT(compound.getCompoundTag("items")); this.structureFine = compound.getBoolean("fine"); this.container.readNBT(compound); } diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityOfferingTable.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityOfferingTable.java index 484f936d..624d7120 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityOfferingTable.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityOfferingTable.java @@ -12,7 +12,7 @@ public class TileEntityOfferingTable extends TileEntityImpl { public void writeNBT(NBTTagCompound compound, SaveType type) { super.writeNBT(compound, type); if (type != SaveType.BLOCK) { - compound.setTag("ingredients", this.items.serializeNBT()); + compound.setTag("items", this.items.serializeNBT()); } } @@ -20,7 +20,7 @@ public class TileEntityOfferingTable extends TileEntityImpl { public void readNBT(NBTTagCompound compound, SaveType type) { super.readNBT(compound, type); if (type != SaveType.BLOCK) { - this.items.deserializeNBT(compound.getCompoundTag("ingredients")); + this.items.deserializeNBT(compound.getCompoundTag("items")); } } diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPlacer.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPlacer.java index 005cc352..1643a3ef 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPlacer.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityPlacer.java @@ -12,7 +12,6 @@ import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; @@ -24,15 +23,12 @@ import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.common.util.FakePlayerFactory; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; -import net.minecraftforge.items.IItemHandlerModifiable; import java.util.ArrayList; import java.util.List; public class TileEntityPlacer extends TileEntityImpl implements ITickable { - private final ItemStackHandlerNA handler = new ItemStackHandlerNA(1, this, true); - @Override public void update() { if (!this.world.isRemote && this.world.getTotalWorldTime() % 15 == 0) { @@ -93,10 +89,10 @@ public class TileEntityPlacer extends TileEntityImpl implements ITickable { ItemStack frameStack = frame.getDisplayedItem(); if (frameStack.isEmpty()) continue; - if(Helper.areItemsEqual(stack, frameStack, false)) + if (Helper.areItemsEqual(stack, frameStack, false)) return true; - if(state.getBlock() == Blocks.FARMLAND && frameStack.getItem() == ModItems.FARMING_STENCIL) + if (state.getBlock() == Blocks.FARMLAND && frameStack.getItem() == ModItems.FARMING_STENCIL) return true; } return false; @@ -139,23 +135,4 @@ public class TileEntityPlacer extends TileEntityImpl implements ITickable { stack.shrink(1); return true; } - - @Override - public IItemHandlerModifiable getItemHandler(EnumFacing facing) { - return this.handler; - } - - @Override - public void readNBT(NBTTagCompound compound, SaveType type) { - super.readNBT(compound, type); - if (type != SaveType.BLOCK) - this.handler.deserializeNBT(compound.getCompoundTag("ingredients")); - } - - @Override - public void writeNBT(NBTTagCompound compound, SaveType type) { - super.writeNBT(compound, type); - if (type != SaveType.BLOCK) - compound.setTag("ingredients", this.handler.serializeNBT()); - } } diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityWoodStand.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityWoodStand.java index fc2d58a8..c20ee189 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityWoodStand.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityWoodStand.java @@ -173,7 +173,7 @@ public class TileEntityWoodStand extends TileEntityImpl implements ITickable { public void writeNBT(NBTTagCompound compound, SaveType type) { super.writeNBT(compound, type); if (type != SaveType.BLOCK) - compound.setTag("ingredients", this.items.serializeNBT()); + compound.setTag("items", this.items.serializeNBT()); if (type == SaveType.TILE) { if (this.ritualPos != null && this.recipe != null) { @@ -188,7 +188,7 @@ public class TileEntityWoodStand extends TileEntityImpl implements ITickable { public void readNBT(NBTTagCompound compound, SaveType type) { super.readNBT(compound, type); if (type != SaveType.BLOCK) - this.items.deserializeNBT(compound.getCompoundTag("ingredients")); + this.items.deserializeNBT(compound.getCompoundTag("items")); if (type == SaveType.TILE) { if (compound.hasKey("recipe")) { diff --git a/src/main/java/de/ellpeck/naturesaura/items/ItemShockwaveCreator.java b/src/main/java/de/ellpeck/naturesaura/items/ItemShockwaveCreator.java index 94aff282..59781ab8 100644 --- a/src/main/java/de/ellpeck/naturesaura/items/ItemShockwaveCreator.java +++ b/src/main/java/de/ellpeck/naturesaura/items/ItemShockwaveCreator.java @@ -37,7 +37,7 @@ import java.util.List; public class ItemShockwaveCreator extends ItemImpl implements ITrinketItem { - private static final ResourceLocation RES_WORN = new ResourceLocation(NaturesAura.MOD_ID, "textures/ingredients/shockwave_creator_player.png"); + private static final ResourceLocation RES_WORN = new ResourceLocation(NaturesAura.MOD_ID, "textures/items/shockwave_creator_player.png"); public ItemShockwaveCreator() { super("shockwave_creator");