summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-16 20:27:39 +0200
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2013-12-16 20:27:39 +0200
commit611c030450614adcb87d5e2af784712e504eeae4 (patch)
tree9c1193f6012c8d9182ff9029a61d32ef433ad9a6 /common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java
parentd548c65cf67e9f9605093eade74bef62028b7cf6 (diff)
Ring ring ring
Diffstat (limited to 'common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java')
-rw-r--r--common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java b/common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java
index 600bc0f..778d05b 100644
--- a/common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java
+++ b/common/darkknight/jewelrycraft/tileentity/TileEntityMolder.java
@@ -12,14 +12,15 @@ public class TileEntityMolder extends TileEntity
{
public int cooling;
public boolean hasMoltenMetal, hasJewelBase, hasMold;
- public ItemStack mold, jewelBase, moltenMetal, ringMetal;
+ public ItemStack mold, jewelBase, moltenMetal;
+ public String 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 = new ItemStack(0, 0, 0);
+ this.ringMetal = "";
this.cooling = 0;
this.hasJewelBase = false;
this.hasMoltenMetal = false;
@@ -34,18 +35,16 @@ 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
@@ -55,6 +54,7 @@ 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,8 +62,6 @@ 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()
@@ -80,7 +78,7 @@ public class TileEntityMolder extends TileEntity
}
if(this.hasMoltenMetal && !this.hasJewelBase)
{
- ringMetal = moltenMetal;
+ ringMetal = moltenMetal.getDisplayName();
if(cooling > 0) this.cooling--;
if(cooling == 0)
{