diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-02-21 21:31:16 +0000 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-02-21 21:31:16 +0000 |
| commit | 420faddca46e70e3a70def168fb4e452ef193b0d (patch) | |
| tree | 247e334012e4bf9e4fa6d42718bf601ce6bd42d9 /java/darkknight/jewelrycraft/tileentity/TileEntityShadowHand.java | |
| parent | 3f4c717de5ebc9b942d65ae45ac87c43bdf8a31b (diff) | |
Added just a butt ton of stuff, also thanks to pau101 for helping me with the Hand Pedestal animation :)
Diffstat (limited to 'java/darkknight/jewelrycraft/tileentity/TileEntityShadowHand.java')
| -rw-r--r-- | java/darkknight/jewelrycraft/tileentity/TileEntityShadowHand.java | 77 |
1 files changed, 5 insertions, 72 deletions
diff --git a/java/darkknight/jewelrycraft/tileentity/TileEntityShadowHand.java b/java/darkknight/jewelrycraft/tileentity/TileEntityShadowHand.java index 1a274ec..b22602e 100644 --- a/java/darkknight/jewelrycraft/tileentity/TileEntityShadowHand.java +++ b/java/darkknight/jewelrycraft/tileentity/TileEntityShadowHand.java @@ -1,74 +1,7 @@ package darkknight.jewelrycraft.tileentity; -import java.util.List; - -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; - -public class TileEntityShadowHand extends TileEntity -{ - public boolean isDirty, hasObject; - public ItemStack object = new ItemStack(Item.getItemById(0), 0, 0); - public float grip; - - public TileEntityShadowHand() - { - this.isDirty = false; - this.hasObject = false; - this.grip = 0f; - } - - @Override - public void writeToNBT(NBTTagCompound nbt) - { - super.writeToNBT(nbt); - nbt.setBoolean("hasObject", hasObject); - nbt.setFloat("Grip", grip); - NBTTagCompound tag = new NBTTagCompound(); - this.object.writeToNBT(tag); - nbt.setTag("object", tag); - } - - @Override - public void readFromNBT(NBTTagCompound nbt) - { - super.readFromNBT(nbt); - this.hasObject = nbt.getBoolean("hasObject"); - this.grip = nbt.getFloat("Grip"); - this.object = new ItemStack(Item.getItemById(0), 0, 0); - this.object.readFromNBT(nbt.getCompoundTag("object")); - } - - @Override - public void updateEntity() - { - super.updateEntity(); - if (isDirty) - { - worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); - isDirty = false; - } - if(grip <= 10f) grip++; - else grip = 0; - //System.out.println(Item.getIdFromItem(object.getItem())); - } - - 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); - } -} +/** + * @author Paul Fulham (pau101) + */ +public class TileEntityShadowHand extends TileEntityHandPedestal +{}
\ No newline at end of file |
