From 5864de83288340f543965004526f849fae65ebd3 Mon Sep 17 00:00:00 2001 From: Robert S Date: Mon, 14 Apr 2014 06:47:57 -0400 Subject: [PATCH] Forgot to have crate save its filter --- .../main/scala/resonantinduction/archaic/crate/TileCrate.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/archaic/src/main/scala/resonantinduction/archaic/crate/TileCrate.java b/archaic/src/main/scala/resonantinduction/archaic/crate/TileCrate.java index f5a271a43..09bbb6eb0 100644 --- a/archaic/src/main/scala/resonantinduction/archaic/crate/TileCrate.java +++ b/archaic/src/main/scala/resonantinduction/archaic/crate/TileCrate.java @@ -242,6 +242,8 @@ public class TileCrate extends TileExternalInventory implements IPacketReceiver, this.getInventory().buildInventory(this.sampleStack); } this.oreFilterEnabled = nbt.getBoolean("oreFilter"); + if(nbt.hasKey("filter")) + filterStack = ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("filter")); } @@ -259,6 +261,8 @@ public class TileCrate extends TileExternalInventory implements IPacketReceiver, nbt.setCompoundTag("stack", stack.writeToNBT(new NBTTagCompound())); } nbt.setBoolean("oreFilter", this.oreFilterEnabled); + if (this.filterStack != null) + nbt.setCompoundTag("filter", filterStack.writeToNBT(new NBTTagCompound())); } @Override