summaryrefslogtreecommitdiff
path: root/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
diff options
context:
space:
mode:
authorbspkrs <bspkrs@gmail.com>2013-12-16 23:44:45 -0500
committerbspkrs <bspkrs@gmail.com>2013-12-16 23:44:45 -0500
commitd83ae9e5dff05ec876050fdc64e597b1b54ecd3d (patch)
tree75821c87acf325feaf73f393c8e2fc4428a7ad06 /common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
parente66f86a8624a5504fb1b389982883be9ebe6a092 (diff)
last ditch effort to get crafting table working
Diffstat (limited to 'common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java')
-rw-r--r--common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java b/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
index 7d24c21..633c4fd 100644
--- a/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
+++ b/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
@@ -11,7 +11,7 @@ public class TileEntityJewelrsCraftingTable extends TileEntity
{
public boolean hasJewel, hasModifier, hasEndItem;
public ItemStack jewel, modifier, endItem;
- public int timer;
+ public int timer;
public TileEntityJewelrsCraftingTable()
{
@@ -59,30 +59,34 @@ public class TileEntityJewelrsCraftingTable extends TileEntity
this.endItem.readFromNBT(nbt.getCompoundTag("endItem"));
}
+ @Override
public void updateEntity()
{
super.updateEntity();
- if(this.hasJewel && this.hasEndItem)
+ if (this.hasJewel && this.hasModifier && !this.hasEndItem)
{
- if(timer > 0) timer--;
+ if (timer > 0)
+ timer--;
System.out.println(timer);
- if(timer == 0)
+ if (timer == 0)
{
this.hasEndItem = true;
- this.endItem = jewel;
+ this.endItem = jewel.copy();
this.hasJewel = false;
- this.jewel = new ItemStack(0, 0, 0);
+ // this.jewel = new ItemStack(0, 0, 0);
this.hasModifier = false;
- this.modifier = new ItemStack(0, 0, 0);
+ // this.modifier = new ItemStack(0, 0, 0);
}
}
}
+ @Override
public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt)
{
readFromNBT(pkt.data);
}
+ @Override
public Packet getDescriptionPacket()
{
NBTTagCompound nbtTag = new NBTTagCompound();