diff --git a/src/main/java/tconstruct/inventory/ToolStationContainer.java b/src/main/java/tconstruct/inventory/ToolStationContainer.java index 65c62030..abca57f3 100644 --- a/src/main/java/tconstruct/inventory/ToolStationContainer.java +++ b/src/main/java/tconstruct/inventory/ToolStationContainer.java @@ -138,7 +138,7 @@ public class ToolStationContainer extends ActiveContainer int amount = logic.getStackInSlot(1).getItem() instanceof ToolCore ? stack.stackSize : 1; logic.decrStackSize(1, amount); - logic.worldObj.playSoundEffect(logic.xCoord, logic.yCoord, logic.zCoord, "tinker:little_saw", 1.0F, (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F); + logic.func_145831_w().playSoundEffect(logic.xCoord, logic.yCoord, logic.zCoord, "tinker:little_saw", 1.0F, (random.nextFloat() - random.nextFloat()) * 0.2F + 1.0F); } } diff --git a/src/main/java/tconstruct/items/DiamondApple.java b/src/main/java/tconstruct/items/DiamondApple.java index bc352a6c..978868bd 100644 --- a/src/main/java/tconstruct/items/DiamondApple.java +++ b/src/main/java/tconstruct/items/DiamondApple.java @@ -34,22 +34,22 @@ public class DiamondApple extends ItemFood potion = player.getActivePotionEffect(Potion.resistance); if (potion != null) - duration = potion.duration; + duration = potion.getDuration(); player.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, duration + 60 * 40, 4)); potion = player.getActivePotionEffect(Potion.resistance); if (potion != null) - duration = potion.duration; + duration = potion.getDuration(); player.addPotionEffect(new PotionEffect(Potion.resistance.id, duration + 60 * 20, 0)); potion = player.getActivePotionEffect(Potion.digSpeed); if (potion != null) - duration = potion.duration; + duration = potion.getDuration(); player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, duration + 60 * 20, 0)); potion = player.getActivePotionEffect(Potion.damageBoost); if (potion != null) - duration = potion.duration; + duration = potion.getDuration(); player.addPotionEffect(new PotionEffect(Potion.damageBoost.id, duration + 60 * 20, 0)); } } diff --git a/src/main/java/tconstruct/items/Jerky.java b/src/main/java/tconstruct/items/Jerky.java index f09cba7b..70c7fd9d 100644 --- a/src/main/java/tconstruct/items/Jerky.java +++ b/src/main/java/tconstruct/items/Jerky.java @@ -54,7 +54,7 @@ public class Jerky extends SpecialFood int duration = 20 * 30; PotionEffect potion = player.getActivePotionEffect(Potion.regeneration); if (potion != null) - duration = potion.duration; + duration = potion.getDuration(); player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, duration + 20 * 30, 0)); } } diff --git a/src/main/java/tconstruct/items/TitleIcon.java b/src/main/java/tconstruct/items/TitleIcon.java index 77fb479f..f4f05ff4 100644 --- a/src/main/java/tconstruct/items/TitleIcon.java +++ b/src/main/java/tconstruct/items/TitleIcon.java @@ -9,6 +9,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingData; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Facing; @@ -64,7 +65,7 @@ public class TitleIcon extends Item { return getIconFromDamage(par1); } - return Item.monsterPlacer.getIconFromDamageForRenderPass(par1, par2); + return Items.monsterPlacer.getIconFromDamageForRenderPass(par1, par2); } @SideOnly(Side.CLIENT) @@ -118,13 +119,13 @@ public class TitleIcon extends Item { if (!world.isRemote) { - int i1 = world.getBlockId(posX, posY, posZ); + Block b = world.getBlock(posX, posY, posZ); posX += Facing.offsetsXForSide[par7]; posY += Facing.offsetsYForSide[par7]; posZ += Facing.offsetsZForSide[par7]; double d0 = 0.0D; - if (par7 == 1 && Block.blocksList[i1] != null && Block.blocksList[i1].getRenderType() == 11) + if (par7 == 1 && b != null && b.getRenderType() == 11) { d0 = 0.5D; } @@ -149,13 +150,13 @@ public class TitleIcon extends Item public static EntityLiving activateSpawnEgg (ItemStack stack, World world, double posX, double posY, double posZ, int par7) { - int i1 = world.getBlockId((int) posX, (int) posY, (int) posZ); + Block b = world.getBlock((int) posX, (int) posY, (int) posZ); posX += Facing.offsetsXForSide[par7]; posY += Facing.offsetsYForSide[par7]; posZ += Facing.offsetsZForSide[par7]; double d0 = 0.0D; - if (par7 == 1 && Block.blocksList[i1] != null && Block.blocksList[i1].getRenderType() == 11) + if (par7 == 1 && b != null && b.getRenderType() == 11) { d0 = 0.5D; } diff --git a/src/main/java/tconstruct/items/armor/ExoArmor.java b/src/main/java/tconstruct/items/armor/ExoArmor.java index e05b47f4..7be56612 100644 --- a/src/main/java/tconstruct/items/armor/ExoArmor.java +++ b/src/main/java/tconstruct/items/armor/ExoArmor.java @@ -24,9 +24,9 @@ public class ExoArmor extends ArmorCore protected static final UUID attack = UUID.fromString("CB3F55A9-629C-4F38-A497-9C13A33DB5CE"); protected static final UUID health = UUID.fromString("CB3F55A9-629C-4F38-A497-9C13A33DB5CD"); protected static final UUID knockback = UUID.fromString("CB3F55A9-629C-4F38-A497-9C13A33DB5CC"); - public ExoArmor(int id, EnumArmorPart part, String texture) + public ExoArmor(EnumArmorPart part, String texture) { - super(id, 0, part); + super(0, part); this.textureName = texture; this.setCreativeTab(TConstructRegistry.materialTab); } diff --git a/src/main/java/tconstruct/items/blocks/BarricadeItem.java b/src/main/java/tconstruct/items/blocks/BarricadeItem.java index 7fc8e316..2dbbbe83 100644 --- a/src/main/java/tconstruct/items/blocks/BarricadeItem.java +++ b/src/main/java/tconstruct/items/blocks/BarricadeItem.java @@ -31,14 +31,14 @@ public class BarricadeItem extends ItemBlock public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) { - Block i1 = world.getBlock(x, y, z); + Block b = world.getBlock(x, y, z); - if (i1 == Blocks.snow && (world.getBlockMetadata(x, y, z) & 7) < 1) + if (b == Blocks.snow && (world.getBlockMetadata(x, y, z) & 7) < 1) { side = 1; } - else if (i1 != Blocks.vine && i1 != Blocks.tallgrass && i1 != Blocks.deadbush - && (Block.blocksList[i1] == null || !Block.blocksList[i1].isBlockReplaceable(world, x, y, z))) + else if (b != Blocks.vine && b != Blocks.tallgrass && b != Blocks.deadbush + && (b == null || !b.isBlockReplaceable(world, x, y, z))) { if (side == 0) { diff --git a/src/main/java/tconstruct/items/blocks/ItemBlockLandmine.java b/src/main/java/tconstruct/items/blocks/ItemBlockLandmine.java index bfa2e273..a7879e86 100644 --- a/src/main/java/tconstruct/items/blocks/ItemBlockLandmine.java +++ b/src/main/java/tconstruct/items/blocks/ItemBlockLandmine.java @@ -59,12 +59,12 @@ public class ItemBlockLandmine extends ItemBlock @Override public boolean placeBlockAt (ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata) { - if (!world.setBlock(x, y, z, TRepo.landmine.blockID, metadata, 3)) + if (!world.setBlock(x, y, z, TRepo.landmine, metadata, 3)) { return false; } - if (world.getBlockId(x, y, z) == TRepo.landmine.blockID) + if (world.getBlock(x, y, z) == TRepo.landmine) { TRepo.landmine.onBlockPlacedBy(world, x, y, z, player, stack);