summaryrefslogtreecommitdiff
path: root/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
diff options
context:
space:
mode:
authorOnyxDarkKnight <sor1n.iliutza16@gmail.com>2014-04-15 22:41:43 +0300
committerOnyxDarkKnight <sor1n.iliutza16@gmail.com>2014-04-15 22:41:43 +0300
commit4b8b13b34d7a8fd0ee7c7b13f11be9c2bf3b5d18 (patch)
treeb49bc483d576ec3abeb2e18523e4511ecce353d3 /eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
parent86398ed60db321f86e8d98f191107fdac2c93760 (diff)
More 1.7 stuff
Diffstat (limited to 'eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java')
-rw-r--r--eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java19
1 files changed, 18 insertions, 1 deletions
diff --git a/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java b/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
index 5a883d6..13b689d 100644
--- a/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
+++ b/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityJewelrsCraftingTable.java
@@ -4,6 +4,9 @@ import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.network.NetworkManager;
+import net.minecraft.network.Packet;
+import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import darkknight.jewelrycraft.config.ConfigHandler;
import darkknight.jewelrycraft.util.JewelryNBT;
@@ -86,7 +89,7 @@ public class TileEntityJewelrsCraftingTable extends TileEntity
super.updateEntity();
if(isDirty){
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
- isDirty = true;
+ isDirty = false;
}
if(angle<360F)angle+=3F;
else angle=0F;
@@ -121,4 +124,18 @@ public class TileEntityJewelrsCraftingTable extends TileEntity
}
}
}
+
+ public Packet getDescriptionPacket()
+ {
+ NBTTagCompound nbttagcompound = new NBTTagCompound();
+ this.writeToNBT(nbttagcompound);
+ return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, nbttagcompound);
+ }
+
+ @Override
+ public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
+ {
+ readFromNBT(packet.func_148857_g());
+ worldObj.func_147479_m(xCoord, yCoord, zCoord);
+ }
}