diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2014-11-26 08:32:16 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2014-11-28 17:16:30 +1100 |
commit | 24557bc2b37deb6a0edf497d547471832457b1dd (patch) | |
tree | c560572889a3b0b34964a0cddb35dc87fda3c914 /src/main/java/net/minecraft/server/TileEntitySkull.java | |
parent | a4805dbd77da057cc1ea0bf344379bc6e53ca1f6 (diff) | |
download | craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.gz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.lz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.tar.xz craftbukkit-24557bc2b37deb6a0edf497d547471832457b1dd.zip |
Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
Diffstat (limited to 'src/main/java/net/minecraft/server/TileEntitySkull.java')
-rw-r--r-- | src/main/java/net/minecraft/server/TileEntitySkull.java | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java deleted file mode 100644 index 7c3757fb..00000000 --- a/src/main/java/net/minecraft/server/TileEntitySkull.java +++ /dev/null @@ -1,97 +0,0 @@ -package net.minecraft.server; - -import java.util.UUID; - -import net.minecraft.util.com.google.common.collect.Iterables; -import net.minecraft.util.com.mojang.authlib.GameProfile; -import net.minecraft.util.com.mojang.authlib.properties.Property; - -public class TileEntitySkull extends TileEntity { - - private int a; - private int i; - private GameProfile j = null; - - public TileEntitySkull() {} - - public void b(NBTTagCompound nbttagcompound) { - super.b(nbttagcompound); - nbttagcompound.setByte("SkullType", (byte) (this.a & 255)); - nbttagcompound.setByte("Rot", (byte) (this.i & 255)); - if (this.j != null) { - NBTTagCompound nbttagcompound1 = new NBTTagCompound(); - - GameProfileSerializer.serialize(nbttagcompound1, this.j); - nbttagcompound.set("Owner", nbttagcompound1); - } - } - - public void a(NBTTagCompound nbttagcompound) { - super.a(nbttagcompound); - this.a = nbttagcompound.getByte("SkullType"); - this.i = nbttagcompound.getByte("Rot"); - if (this.a == 3) { - if (nbttagcompound.hasKeyOfType("Owner", 10)) { - this.j = GameProfileSerializer.deserialize(nbttagcompound.getCompound("Owner")); - } else if (nbttagcompound.hasKeyOfType("ExtraType", 8) && !UtilColor.b(nbttagcompound.getString("ExtraType"))) { - this.j = new GameProfile((UUID) null, nbttagcompound.getString("ExtraType")); - this.d(); - } - } - } - - public GameProfile getGameProfile() { - return this.j; - } - - public Packet getUpdatePacket() { - NBTTagCompound nbttagcompound = new NBTTagCompound(); - - this.b(nbttagcompound); - return new PacketPlayOutTileEntityData(this.x, this.y, this.z, 4, nbttagcompound); - } - - public void setSkullType(int i) { - this.a = i; - this.j = null; - } - - public void setGameProfile(GameProfile gameprofile) { - this.a = 3; - this.j = gameprofile; - this.d(); - } - - private void d() { - if (this.j != null && !UtilColor.b(this.j.getName())) { - if (!this.j.isComplete() || !this.j.getProperties().containsKey("textures")) { - GameProfile gameprofile = MinecraftServer.getServer().getUserCache().getProfile(this.j.getName()); - - if (gameprofile != null) { - Property property = (Property) Iterables.getFirst(gameprofile.getProperties().get("textures"), null); - - if (property == null) { - gameprofile = MinecraftServer.getServer().av().fillProfileProperties(gameprofile, true); - } - - this.j = gameprofile; - this.update(); - } - } - } - } - - public int getSkullType() { - return this.a; - } - - public void setRotation(int i) { - this.i = i; - } - - // CraftBukkit start - add method - public int getRotation() { - return this.i; - } - // CraftBukkit end -} |