diff options
author | meiskam <meiskam@gmail.com> | 2012-12-20 13:42:14 -0500 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2012-12-21 21:56:47 -0600 |
commit | 39e2af7bd1592be5a968f21cb461c66c33af6958 (patch) | |
tree | e2f7769afbaa51cb68f85df5e9b24b978359ee32 /src/main/java | |
parent | 78d384de93859e3c6200b9e4d1d027a8729ffc99 (diff) | |
download | craftbukkit-39e2af7bd1592be5a968f21cb461c66c33af6958.tar craftbukkit-39e2af7bd1592be5a968f21cb461c66c33af6958.tar.gz craftbukkit-39e2af7bd1592be5a968f21cb461c66c33af6958.tar.lz craftbukkit-39e2af7bd1592be5a968f21cb461c66c33af6958.tar.xz craftbukkit-39e2af7bd1592be5a968f21cb461c66c33af6958.zip |
Added TileEntitySkull for diff visibility
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/net/minecraft/server/TileEntitySkull.java | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java new file mode 100644 index 00000000..a622ecdf --- /dev/null +++ b/src/main/java/net/minecraft/server/TileEntitySkull.java @@ -0,0 +1,50 @@ +package net.minecraft.server; + +public class TileEntitySkull extends TileEntity { + + private int a; + private int b; + private String c = ""; + + public TileEntitySkull() {} + + public void b(NBTTagCompound nbttagcompound) { + super.b(nbttagcompound); + nbttagcompound.setByte("SkullType", (byte) (this.a & 255)); + nbttagcompound.setByte("Rot", (byte) (this.b & 255)); + nbttagcompound.setString("ExtraType", this.c); + } + + public void a(NBTTagCompound nbttagcompound) { + super.a(nbttagcompound); + this.a = nbttagcompound.getByte("SkullType"); + this.b = nbttagcompound.getByte("Rot"); + if (nbttagcompound.hasKey("ExtraType")) { + this.c = nbttagcompound.getString("ExtraType"); + } + } + + public Packet getUpdatePacket() { + NBTTagCompound nbttagcompound = new NBTTagCompound(); + + this.b(nbttagcompound); + return new Packet132TileEntityData(this.x, this.y, this.z, 4, nbttagcompound); + } + + public void setSkullType(int i, String s) { + this.a = i; + this.c = s; + } + + public int getSkullType() { + return this.a; + } + + public void setRotation(int i) { + this.b = i; + } + + public String getExtraType() { + return this.c; + } +} |