Forgot to have crate save its filter

This commit is contained in:
Robert S 2014-04-14 06:47:57 -04:00
parent f9dbf0c71d
commit 5864de8328

View file

@ -242,6 +242,8 @@ public class TileCrate extends TileExternalInventory implements IPacketReceiver,
this.getInventory().buildInventory(this.sampleStack); this.getInventory().buildInventory(this.sampleStack);
} }
this.oreFilterEnabled = nbt.getBoolean("oreFilter"); 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.setCompoundTag("stack", stack.writeToNBT(new NBTTagCompound()));
} }
nbt.setBoolean("oreFilter", this.oreFilterEnabled); nbt.setBoolean("oreFilter", this.oreFilterEnabled);
if (this.filterStack != null)
nbt.setCompoundTag("filter", filterStack.writeToNBT(new NBTTagCompound()));
} }
@Override @Override