diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/ItemSkull.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemSkull.java | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/main/java/net/minecraft/server/ItemSkull.java b/src/main/java/net/minecraft/server/ItemSkull.java index 063f50b6..6b2bf9bb 100644 --- a/src/main/java/net/minecraft/server/ItemSkull.java +++ b/src/main/java/net/minecraft/server/ItemSkull.java @@ -5,8 +5,7 @@ public class ItemSkull extends Item { private static final String[] b = new String[] { "skeleton", "wither", "zombie", "char", "creeper"}; public static final String[] a = new String[] { "skeleton", "wither", "zombie", "steve", "creeper"}; - public ItemSkull(int i) { - super(i); + public ItemSkull() { this.a(CreativeModeTab.c); this.setMaxDurability(0); this.a(true); @@ -16,7 +15,7 @@ public class ItemSkull extends Item { final int clickedX = i, clickedY = j, clickedZ = k; // CraftBukkit if (l == 0) { return false; - } else if (!world.getMaterial(i, j, k).isBuildable()) { + } else if (!world.getType(i, j, k).getMaterial().isBuildable()) { return false; } else { if (l == 1) { @@ -41,12 +40,12 @@ public class ItemSkull extends Item { if (!entityhuman.a(i, j, k, l, itemstack)) { return false; - } else if (!Block.SKULL.canPlace(world, i, j, k)) { + } else if (!Blocks.SKULL.canPlace(world, i, j, k)) { return false; } else { // CraftBukkit start - Handle in ItemBlock - // world.setTypeIdAndData(i, j, k, Block.SKULL.id, l, 2); - if (!ItemBlock.processBlockPlace(world, entityhuman, null, i, j, k, Block.SKULL.id, l, clickedX, clickedY, clickedZ)) { + // world.setTypeAndData(i, j, k, Blocks.SKULL, l, 2); + if (!ItemBlock.processBlockPlace(world, entityhuman, null, i, j, k, Blocks.SKULL, l, clickedX, clickedY, clickedZ)) { return false; } l = world.getData(i, j, k); @@ -62,13 +61,13 @@ public class ItemSkull extends Item { if (tileentity != null && tileentity instanceof TileEntitySkull) { String s = ""; - if (itemstack.hasTag() && itemstack.getTag().hasKey("SkullOwner")) { + if (itemstack.hasTag() && itemstack.getTag().hasKeyOfType("SkullOwner", 8)) { s = itemstack.getTag().getString("SkullOwner"); } ((TileEntitySkull) tileentity).setSkullType(itemstack.getData(), s); ((TileEntitySkull) tileentity).setRotation(i1); - ((BlockSkull) Block.SKULL).a(world, i, j, k, (TileEntitySkull) tileentity); + ((BlockSkull) Blocks.SKULL).a(world, i, j, k, (TileEntitySkull) tileentity); } --itemstack.count; @@ -81,7 +80,7 @@ public class ItemSkull extends Item { return i; } - public String d(ItemStack itemstack) { + public String a(ItemStack itemstack) { int i = itemstack.getData(); if (i < 0 || i >= b.length) { @@ -91,7 +90,7 @@ public class ItemSkull extends Item { return super.getName() + "." + b[i]; } - public String l(ItemStack itemstack) { - return itemstack.getData() == 3 && itemstack.hasTag() && itemstack.getTag().hasKey("SkullOwner") ? LocaleI18n.get("item.skull.player.name", new Object[] { itemstack.getTag().getString("SkullOwner")}) : super.l(itemstack); + public String n(ItemStack itemstack) { + return itemstack.getData() == 3 && itemstack.hasTag() && itemstack.getTag().hasKeyOfType("SkullOwner", 8) ? LocaleI18n.get("item.skull.player.name", new Object[] { itemstack.getTag().getString("SkullOwner")}) : super.n(itemstack); } } |