summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java b/common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java
index 778d05b..600bc0f 100644
--- a/common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java
+++ b/common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java
@@ -12,15 +12,14 @@ public class TileEntityMolder extends TileEntity
{
public int cooling;
public boolean hasMoltenMetal, hasJewelBase, hasMold;
- public ItemStack mold, jewelBase, moltenMetal;
- public String ringMetal;
+ public ItemStack mold, jewelBase, moltenMetal, ringMetal;
public TileEntityMolder()
{
this.moltenMetal = new ItemStack(0, 0, 0);
this.jewelBase = new ItemStack(0, 0, 0);
this.mold = new ItemStack(0, 0, 0);
- this.ringMetal = "";
+ this.ringMetal = new ItemStack(0, 0, 0);
this.cooling = 0;
this.hasJewelBase = false;
this.hasMoltenMetal = false;
@@ -35,16 +34,18 @@ public class TileEntityMolder extends TileEntity
nbt.setBoolean("hasJewelBase", hasJewelBase);
nbt.setBoolean("hasMoltenMetal", hasMoltenMetal);
nbt.setBoolean("hasMold", hasMold);
- nbt.setString("ringMetal", ringMetal);
NBTTagCompound tag = new NBTTagCompound();
NBTTagCompound tag1 = new NBTTagCompound();
NBTTagCompound tag2 = new NBTTagCompound();
+ NBTTagCompound tag3 = new NBTTagCompound();
this.mold.writeToNBT(tag);
nbt.setCompoundTag("mold", tag);
this.jewelBase.writeToNBT(tag1);
nbt.setCompoundTag("jewelBase", tag1);
this.moltenMetal.writeToNBT(tag2);
nbt.setCompoundTag("moltenMetal", tag2);
+ this.ringMetal.writeToNBT(tag2);
+ nbt.setCompoundTag("ringMetal", tag3);
}
@Override
@@ -54,7 +55,6 @@ public class TileEntityMolder extends TileEntity
this.cooling = nbt.getInteger("cooling");
this.hasJewelBase = nbt.getBoolean("hasJewelBase");
this.hasMoltenMetal = nbt.getBoolean("hasMoltenMetal");
- this.ringMetal = nbt.getString("ringMetal");
this.hasMold = nbt.getBoolean("hasMold");
this.mold = new ItemStack(0, 0, 0);
this.mold.readFromNBT(nbt.getCompoundTag("mold"));
@@ -62,6 +62,8 @@ public class TileEntityMolder extends TileEntity
this.jewelBase.readFromNBT(nbt.getCompoundTag("jewelBase"));
this.moltenMetal = new ItemStack(0, 0, 0);
this.moltenMetal.readFromNBT(nbt.getCompoundTag("moltenMetal"));
+ this.ringMetal = new ItemStack(0, 0, 0);
+ this.ringMetal.readFromNBT(nbt.getCompoundTag("ringMetal"));
}
public void updateEntity()
@@ -78,7 +80,7 @@ public class TileEntityMolder extends TileEntity
}
if(this.hasMoltenMetal && !this.hasJewelBase)
{
- ringMetal = moltenMetal.getDisplayName();
+ ringMetal = moltenMetal;
if(cooling > 0) this.cooling--;
if(cooling == 0)
{