summaryrefslogtreecommitdiff
path: root/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityBlockShadow.java
diff options
context:
space:
mode:
Diffstat (limited to 'eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityBlockShadow.java')
-rw-r--r--eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityBlockShadow.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityBlockShadow.java b/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityBlockShadow.java
index 28f4daa..186f78a 100644
--- a/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityBlockShadow.java
+++ b/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/tileentity/TileEntityBlockShadow.java
@@ -1,6 +1,9 @@
package darkknight.jewelrycraft.tileentity;
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 net.minecraft.util.MathHelper;
import net.minecraft.world.EnumSkyBlock;
@@ -54,4 +57,18 @@ public class TileEntityBlockShadow extends TileEntity
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, metadata, 2);
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
}
+
+ 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);
+ }
}