From 4b8b13b34d7a8fd0ee7c7b13f11be9c2bf3b5d18 Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Tue, 15 Apr 2014 22:41:43 +0300 Subject: More 1.7 stuff --- .../darkknight/jewelrycraft/item/ItemNecklace.java | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'eclipse/Jewelrycraft/common/darkknight/jewelrycraft/item/ItemNecklace.java') diff --git a/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/item/ItemNecklace.java b/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/item/ItemNecklace.java index 4503406..71af0a0 100644 --- a/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/item/ItemNecklace.java +++ b/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/item/ItemNecklace.java @@ -72,7 +72,7 @@ public class ItemNecklace extends Item return itemIcon; } - public String getItemDisplayName(ItemStack stack) + public String getItemStackDisplayName(ItemStack stack) { if(JewelryNBT.ingot(stack) != null) return JewelryNBT.ingot(stack).getDisplayName().replace("Ingot", " ").trim() + " " + ("" + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim(); return ("" + StatCollector.translateToLocal(this.getUnlocalizedNameInefficiently(stack) + ".name")).trim(); @@ -215,22 +215,12 @@ public class ItemNecklace extends Item for(int x = (int) - 1; x <= 1; x++) for(int z = (int) - 1; z <= 1; z++) if(JewelryNBT.isModifierX(stack, new ItemStack(Items.diamond_pickaxe)) && JewelryNBT.isJewelX(stack, new ItemStack(Items.nether_star)) && JewelryNBT.isIngotX(stack, new ItemStack(ItemList.shadowIngot))) - if((side == 0 || side == 1) && j > 0 && world.getBlock(i + x, j, k + z) != Blocks.bedrock) destroyBlock(world, i + x, j, k + z); - else if((side == 2 || side == 3) && j + x > 0 && world.getBlock(i + z, j + x, k) != Blocks.bedrock) destroyBlock(world, i + z, j + x, k); - else if((side == 4 || side == 5) && j + x > 0 && world.getBlock(i, j + x, k + z) != Blocks.bedrock) destroyBlock(world, i, j + x, k + z); + if((side == 0 || side == 1) && j > 0 && world.getBlock(i + x, j, k + z) != Blocks.bedrock) world.func_147480_a(i + x, j, k + z, true); + else if((side == 2 || side == 3) && j + x > 0 && world.getBlock(i + z, j + x, k) != Blocks.bedrock) world.func_147480_a(i + z, j + x, k, true); + else if((side == 4 || side == 5) && j + x > 0 && world.getBlock(i, j + x, k + z) != Blocks.bedrock) world.func_147480_a(i, j + x, k + z, true); } return true; } - - public void destroyBlock(World world, int i, int j, int k) - { - EntityItem entityitem = new EntityItem(world, i + 0.5D, j + 1D, k + 0.5D, new ItemStack(world.getBlock(i, j, k))); - entityitem.motionX = 0; - entityitem.motionZ = 0; - entityitem.motionY = 0.21000000298023224D; - world.spawnEntityInWorld(entityitem); - world.setBlockToAir(i, j, k); - } public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) { -- cgit v1.2.3