diff --git a/src/main/java/tconstruct/client/gui/PartCrafterGui.java b/src/main/java/tconstruct/client/gui/PartCrafterGui.java index 48506163..a971864a 100644 --- a/src/main/java/tconstruct/client/gui/PartCrafterGui.java +++ b/src/main/java/tconstruct/client/gui/PartCrafterGui.java @@ -184,7 +184,7 @@ public class PartCrafterGui extends NewContainerGui if (drawChestPart) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - this.mc.getTextureManager().bindTexture(minichest); + this.field_146297_k.getTextureManager().bindTexture(minichest); this.drawTexturedModalRect(cornerX - 116, cornerY + 11, 0, 0, this.xSize, this.ySize); } @@ -199,7 +199,7 @@ public class PartCrafterGui extends NewContainerGui @Override protected void mouseClicked (int mouseX, int mouseY, int clickNum) { - boolean flag = clickNum == this.mc.gameSettings.keyBindPickBlock.keyCode + 100; + boolean flag = clickNum == this.field_146297_k.gameSettings.keyBindPickBlock.keyCode + 100; Slot slot = this.getSlotAtPosition(mouseX, mouseY); long l = Minecraft.getSystemTime(); this.field_94074_J = this.field_94072_H == slot && l - this.field_94070_G < 250L && this.field_94073_I == clickNum; @@ -224,7 +224,7 @@ public class PartCrafterGui extends NewContainerGui k1 = -999; } - if (this.field_146297_k.gameSettings.touchscreen && flag1 && this.mc.thePlayer.inventory.getItemStack() == null) + if (this.field_146297_k.gameSettings.touchscreen && flag1 && this.field_146297_k.thePlayer.inventory.getItemStack() == null) { this.field_146297_k.displayGuiScreen((GuiScreen) null); return; diff --git a/src/main/java/tconstruct/client/gui/SmelteryGui.java b/src/main/java/tconstruct/client/gui/SmelteryGui.java index ffd3f6aa..4e062c2e 100644 --- a/src/main/java/tconstruct/client/gui/SmelteryGui.java +++ b/src/main/java/tconstruct/client/gui/SmelteryGui.java @@ -164,7 +164,7 @@ public class SmelteryGui extends NewContainerGui drawTexturedModalRect(cornerX + 46, cornerY, 0, 0, 176, ySize); //Fuel - Lava - this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture); + this.field_146297_k.getTextureManager().bindTexture(TextureMap.locationBlocksTexture); if (logic.fuelGague > 0) { IIcon lavaIcon = Blocks.lava.getIcon(0, 0); diff --git a/src/main/java/tconstruct/items/tools/Battleaxe.java b/src/main/java/tconstruct/items/tools/Battleaxe.java index ab3f6a3f..c6d68ae8 100644 --- a/src/main/java/tconstruct/items/tools/Battleaxe.java +++ b/src/main/java/tconstruct/items/tools/Battleaxe.java @@ -45,7 +45,7 @@ public class Battleaxe extends HarvestTool } @Override - public boolean onBlockDestroyed (ItemStack itemstack, World world, Block b, int x, int y, int z, EntityLivingBase player) + public boolean func_150894_a (ItemStack itemstack, World world, Block b, int x, int y, int z, EntityLivingBase player) { if (b != null && b.func_149688_o() == Material.field_151584_j) return false; @@ -277,11 +277,11 @@ public class Battleaxe extends HarvestTool { if (block.removeBlockByPlayer(world, player, x, yPos, z)) { - block.onBlockDestroyedByPlayer(world, x, yPos, z, localMeta); + block.func_149664_b(world, x, yPos, z, localMeta); } - block.harvestBlock(world, player, x, yPos, z, localMeta); - block.onBlockHarvested(world, x, yPos, z, localMeta, player); - onBlockDestroyed(stack, world, block, x, yPos, z, player); + block.func_149636_a(world, player, x, yPos, z, localMeta); + block.func_149681_a(world, x, yPos, z, localMeta, player); + func_150894_a(stack, world, block, x, yPos, z, player); } else { diff --git a/src/main/java/tconstruct/items/tools/BowBase.java b/src/main/java/tconstruct/items/tools/BowBase.java index 786d66e6..b1e7bfb3 100644 --- a/src/main/java/tconstruct/items/tools/BowBase.java +++ b/src/main/java/tconstruct/items/tools/BowBase.java @@ -149,11 +149,11 @@ public abstract class BowBase extends ToolCore //if (tinkerArrow != null) if (slotID != -1 && (arrowID == -1 || slotID < arrowID)) { - player.inventory.consumeInventoryItem(TRepo.arrow); + player.inventory.func_146026_a(TRepo.arrow); } else { - player.inventory.consumeInventoryItem(Items.arrow); + player.inventory.func_146026_a(Items.arrow); } } diff --git a/src/main/java/tconstruct/items/tools/Chisel.java b/src/main/java/tconstruct/items/tools/Chisel.java index 87553866..c05dd3d2 100644 --- a/src/main/java/tconstruct/items/tools/Chisel.java +++ b/src/main/java/tconstruct/items/tools/Chisel.java @@ -91,7 +91,7 @@ public class Chisel extends ToolCore { return itemstack; } - if (movingobjectposition.typeOfHit == MovingObjectType.TILE) + if (movingobjectposition.typeOfHit == MovingObjectType.BLOCK) { int x = movingobjectposition.blockX; int y = movingobjectposition.blockY; @@ -100,7 +100,7 @@ public class Chisel extends ToolCore int meta = world.getBlockMetadata(x, y, z); DetailInput details = TConstruct.chiselDetailing.getDetailing(block, meta); - if (details != null && details.outputID < 4096) + if (details != null) { world.func_147465_d(x, y, z, BlockUtils.getBlockFromItemStack(details.output), details.outputMeta, 3); if (!(entityplayer.capabilities.isCreativeMode)) diff --git a/src/main/java/tconstruct/items/tools/Excavator.java b/src/main/java/tconstruct/items/tools/Excavator.java index d2671382..09f0c1bb 100644 --- a/src/main/java/tconstruct/items/tools/Excavator.java +++ b/src/main/java/tconstruct/items/tools/Excavator.java @@ -38,7 +38,7 @@ public class Excavator extends HarvestTool return "shovel"; } - static Material[] materials = { Material.field_151577_b, Material.field_151578_c, Material.sand, Material.snow, Material.crafedSnow, Material.clay }; + static Material[] materials = { Material.field_151577_b, Material.field_151578_c, Material.field_151595_p, Material.snow, Material.crafedSnow, Material.clay }; @Override public Item getHeadItem () @@ -142,14 +142,14 @@ public class Excavator extends HarvestTool World world = player.worldObj; final int meta = world.getBlockMetadata(x, y, z); - Block block = world.getBlock(x, y, z); + Block block = world.func_147439_a(x, y, z); if (!stack.hasTagCompound()) return false; if (block == null) return super.onBlockStartBreak(stack, x, y, z, player); - float blockHardness = block.getBlockHardness(world, x, y, z); + float blockHardness = block.func_149712_f(world, x, y, z); boolean validStart = false; for (int iter = 0; iter < materials.length; iter++) @@ -192,11 +192,11 @@ public class Excavator extends HarvestTool { if (!(tags.getBoolean("Broken"))) { - Block localblock = world.getBlock(xPos, yPos, zPos); + Block localblock = world.func_147439_a(xPos, yPos, zPos); block = localblock; int localMeta = world.getBlockMetadata(xPos, yPos, zPos); int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType()); - float localHardness = block == null ? Float.MAX_VALUE : block.getBlockHardness(world, xPos, yPos, zPos); + float localHardness = block == null ? Float.MAX_VALUE : block.func_149712_f(world, xPos, yPos, zPos); if (hlvl <= tags.getInteger("HarvestLevel") && localHardness - 1.5 <= blockHardness) { @@ -219,12 +219,12 @@ public class Excavator extends HarvestTool { if (block.removeBlockByPlayer(world, player, xPos, yPos, zPos)) { - block.onBlockDestroyedByPlayer(world, xPos, yPos, zPos, localMeta); + block.func_149664_b(world, xPos, yPos, zPos, localMeta); } - block.harvestBlock(world, player, xPos, yPos, zPos, localMeta); - block.onBlockHarvested(world, xPos, yPos, zPos, localMeta, player); + block.func_149636_a(world, player, xPos, yPos, zPos, localMeta); + block.func_149681_a(world, xPos, yPos, zPos, localMeta, player); if (blockHardness > 0f) - onBlockDestroyed(stack, world, localblock, xPos, yPos, zPos, player); + func_150894_a(stack, world, localblock, xPos, yPos, zPos, player); } else { diff --git a/src/main/java/tconstruct/items/tools/FryingPan.java b/src/main/java/tconstruct/items/tools/FryingPan.java index 8071458d..8ea74735 100644 --- a/src/main/java/tconstruct/items/tools/FryingPan.java +++ b/src/main/java/tconstruct/items/tools/FryingPan.java @@ -86,7 +86,7 @@ public class FryingPan extends Weapon { return false; } - else if (!world.getBlockMaterial(x, y, z).isSolid()) + else if (!world.func_147439_a(x, y, z).func_149688_o().isSolid()) { return false; } @@ -121,17 +121,17 @@ public class FryingPan extends Weapon { return false; } - else if (!TRepo.heldItemBlock.canPlaceBlockAt(world, x, y, z)) + else if (!TRepo.heldItemBlock.func_149742_c(world, x, y, z)) { return false; } else { world.func_147465_d(x, y, z, TRepo.heldItemBlock, 0, 3); - TRepo.heldItemBlock.onBlockPlacedBy(world, x, y, z, player, stack); + TRepo.heldItemBlock.func_149689_a(world, x, y, z, player, stack); world.playSoundEffect(x, y, z, "tinker:frypan_hit", 1.0F, (random.nextFloat() - random.nextFloat()) * 0.2F + 0.65F); - EquipLogic logic = (EquipLogic) world.getBlockTileEntity(x, y, z); + EquipLogic logic = (EquipLogic) world.func_147438_o(x, y, z); logic.setEquipmentItem(stack); --stack.stackSize; diff --git a/src/main/java/tconstruct/items/tools/Hammer.java b/src/main/java/tconstruct/items/tools/Hammer.java index f9a43299..50e43a8c 100644 --- a/src/main/java/tconstruct/items/tools/Hammer.java +++ b/src/main/java/tconstruct/items/tools/Hammer.java @@ -68,7 +68,7 @@ public class Hammer extends HarvestTool return materials; } - static Material[] materials = new Material[] { Material.rock, Material.field_151573_f, Material.ice, Material.field_151592_s, Material.piston, Material. field_151574_g }; + static Material[] materials = new Material[] { Material.field_151576_e, Material.field_151573_f, Material.field_151588_w, Material.field_151592_s, Material.piston, Material. field_151574_g }; @Override public Item getHeadItem () @@ -242,7 +242,7 @@ public class Hammer extends HarvestTool if (block == null) return super.onBlockStartBreak(stack, x, y, z, player); - float blockHardness = block.getBlockHardness(world, x, y, z); + float blockHardness = block.func_149712_f(world, x, y, z); boolean validStart = false; for (int iter = 0; iter < materials.length; iter++) @@ -290,7 +290,7 @@ public class Hammer extends HarvestTool { if (!(tags.getBoolean("Broken"))) { - Block localBlock = world.getBlock(xPos, yPos, zPos); + Block localBlock = world.func_147439_a(xPos, yPos, zPos); int localMeta = world.getBlockMetadata(xPos, yPos, zPos); int hlvl = MinecraftForge.getBlockHarvestLevel(localBlock, meta, getHarvestType()); float localHardness = localBlock == null ? Float.MAX_VALUE : localBlock.getBlockHardness(world, xPos, yPos, zPos); @@ -316,12 +316,12 @@ public class Hammer extends HarvestTool { if (localBlock.removeBlockByPlayer(world, player, xPos, yPos, zPos)) { - localBlock.onBlockDestroyedByPlayer(world, xPos, yPos, zPos, localMeta); + localBlock.func_149664_b(world, xPos, yPos, zPos, localMeta); } - localBlock.harvestBlock(world, player, xPos, yPos, zPos, localMeta); - localBlock.onBlockHarvested(world, xPos, yPos, zPos, localMeta, player); + localBlock.func_149636_a(world, player, xPos, yPos, zPos, localMeta); + localBlock.func_149681_a(world, xPos, yPos, zPos, localMeta, player); if (blockHardness > 0f) - onBlockDestroyed(stack, world, localBlock, xPos, yPos, zPos, player); + func_150894_a(stack, world, localBlock, xPos, yPos, zPos, player); } else { diff --git a/src/main/java/tconstruct/items/tools/Hatchet.java b/src/main/java/tconstruct/items/tools/Hatchet.java index b8e3adcb..6f109f02 100644 --- a/src/main/java/tconstruct/items/tools/Hatchet.java +++ b/src/main/java/tconstruct/items/tools/Hatchet.java @@ -34,7 +34,7 @@ public class Hatchet extends HarvestTool } @Override - public boolean onBlockDestroyed (ItemStack itemstack, World world, Block block, int x, int y, int z, EntityLivingBase player) + public boolean func_150894_a (ItemStack itemstack, World world, Block block, int x, int y, int z, EntityLivingBase player) { if (block != null && block.func_149688_o() == Material.field_151584_j) return false; diff --git a/src/main/java/tconstruct/items/tools/LumberAxe.java b/src/main/java/tconstruct/items/tools/LumberAxe.java index 1da7afef..42a41ead 100644 --- a/src/main/java/tconstruct/items/tools/LumberAxe.java +++ b/src/main/java/tconstruct/items/tools/LumberAxe.java @@ -55,7 +55,7 @@ public class LumberAxe extends HarvestTool } @Override - public boolean onBlockDestroyed (ItemStack itemstack, World world, Block block, int x, int y, int z, EntityLivingBase player) + public boolean func_150894_a (ItemStack itemstack, World world, Block block, int x, int y, int z, EntityLivingBase player) { if (block != null && block.func_149688_o() == Material.field_151584_j) return false; @@ -242,11 +242,11 @@ public class LumberAxe extends HarvestTool { if (block.removeBlockByPlayer(world, player, xPos, yPos, zPos)) { - block.onBlockDestroyedByPlayer(world, xPos, yPos, zPos, meta); + block.func_149664_b(world, xPos, yPos, zPos, meta); } - block.harvestBlock(world, player, xPos, yPos, zPos, meta); - block.onBlockHarvested(world, xPos, yPos, zPos, meta, player); - onBlockDestroyed(stack, world, localblock, xPos, yPos, zPos, player); + block.func_149636_a(world, player, xPos, yPos, zPos, meta); + block.func_149681_a(world, xPos, yPos, zPos, meta, player); + func_150894_a(stack, world, localblock, xPos, yPos, zPos, player); } else { @@ -308,7 +308,7 @@ public class LumberAxe extends HarvestTool { //TODO harvestBlock block.func_149636_a(world, player, xPos, yPos, zPos, meta); - onBlockDestroyed(stack, world, block, xPos, yPos, zPos, player); + func_150894_a(stack, world, block, xPos, yPos, zPos, player); } } } diff --git a/src/main/java/tconstruct/items/tools/Pickaxe.java b/src/main/java/tconstruct/items/tools/Pickaxe.java index a6e528f9..62773c89 100644 --- a/src/main/java/tconstruct/items/tools/Pickaxe.java +++ b/src/main/java/tconstruct/items/tools/Pickaxe.java @@ -25,7 +25,7 @@ public class Pickaxe extends HarvestTool return materials; } - static Material[] materials = new Material[] { Material.rock, Material.field_151573_f, Material.ice, Material.field_151592_s, Material.piston, Material.field_151574_g, Material.field_151594_q }; + static Material[] materials = new Material[] { Material.field_151576_e, Material.field_151573_f, Material.field_151588_w, Material.field_151592_s, Material.piston, Material.field_151574_g, Material.field_151594_q }; @Override public Item getHeadItem () diff --git a/src/main/java/tconstruct/items/tools/PotionLauncher.java b/src/main/java/tconstruct/items/tools/PotionLauncher.java index 78c7d4b1..ff079fbf 100644 --- a/src/main/java/tconstruct/items/tools/PotionLauncher.java +++ b/src/main/java/tconstruct/items/tools/PotionLauncher.java @@ -111,7 +111,7 @@ public class PotionLauncher extends Item } @Override - public void getSubItems (Item b, CreativeTabs tabs, List list) + public void func_150895_a (Item b, CreativeTabs tabs, List list) { ItemStack stack = new ItemStack(b, 1, 0); NBTTagCompound compound = new NBTTagCompound(); diff --git a/src/main/java/tconstruct/items/tools/Scythe.java b/src/main/java/tconstruct/items/tools/Scythe.java index dc9f0d0a..06ddc84b 100644 --- a/src/main/java/tconstruct/items/tools/Scythe.java +++ b/src/main/java/tconstruct/items/tools/Scythe.java @@ -155,7 +155,7 @@ public class Scythe extends Weapon return false; World world = player.worldObj; - final int blockID = world.getBlockId(x, y, z); + final Block blockB = world.func_147439_a(x, y, z); final int meta = world.getBlockMetadata(x, y, z); if (!stack.hasTagCompound()) return false; @@ -177,7 +177,7 @@ public class Scythe extends Weapon if (!cancelHarvest) { - Block block = world.getBlock(xPos, yPos, zPos); + Block block = world.func_147439_a(xPos, yPos, zPos); if (block != null)// && (block.func_149688_o() == Material.field_151584_j || block.isLeaves(world, xPos, yPos, zPos))) { for (int iter = 0; iter < materials.length; iter++) @@ -188,10 +188,10 @@ public class Scythe extends Weapon WorldHelper.setBlockToAir(world, xPos, yPos, zPos); if (!player.capabilities.isCreativeMode) { - block.onBlockDestroyedByPlayer(world, x, y, z, meta); - block.harvestBlock(world, player, xPos, yPos, zPos, localMeta); - block.onBlockHarvested(world, x, y, z, localMeta, player); - onBlockDestroyed(stack, world, localblock, xPos, yPos, zPos, player); + block.func_149664_b(world, x, y, z, meta); + block.func_149636_a(world, player, xPos, yPos, zPos, localMeta); + block.func_149681_a(world, x, y, z, localMeta, player); + func_150894_a(stack, world, blockB, xPos, yPos, zPos, player); } } } diff --git a/src/main/java/tconstruct/items/tools/Shovel.java b/src/main/java/tconstruct/items/tools/Shovel.java index e11db407..a6436770 100644 --- a/src/main/java/tconstruct/items/tools/Shovel.java +++ b/src/main/java/tconstruct/items/tools/Shovel.java @@ -27,7 +27,7 @@ public class Shovel extends HarvestTool return "shovel"; } - static Material[] materials = { Material.field_151577_b, Material.field_151578_c, Material.sand, Material.snow, Material.craftedSnow, Material.clay }; + static Material[] materials = { Material.field_151577_b, Material.field_151578_c, Material.field_151595_p, Material.snow, Material.craftedSnow, Material.clay }; @Override public Item getHeadItem () diff --git a/src/main/java/tconstruct/library/armor/BehaviorDispenseArmorCopy.java b/src/main/java/tconstruct/library/armor/BehaviorDispenseArmorCopy.java index 147f014d..b516c225 100644 --- a/src/main/java/tconstruct/library/armor/BehaviorDispenseArmorCopy.java +++ b/src/main/java/tconstruct/library/armor/BehaviorDispenseArmorCopy.java @@ -20,7 +20,7 @@ final class BehaviorDispenseArmorCopy extends BehaviorDefaultDispenseItem */ protected ItemStack dispenseStack (IBlockSource par1IBlockSource, ItemStack par2ItemStack) { - EnumFacing enumfacing = BlockDispenser.getFacing(par1IBlockSource.getBlockMetadata()); + EnumFacing enumfacing = BlockDispenser.func_149937_b(par1IBlockSource.getBlockMetadata()); int i = par1IBlockSource.getXInt() + enumfacing.getFrontOffsetX(); int j = par1IBlockSource.getYInt() + enumfacing.getFrontOffsetY(); int k = par1IBlockSource.getZInt() + enumfacing.getFrontOffsetZ(); diff --git a/src/main/java/tconstruct/library/component/TankLayerScan.java b/src/main/java/tconstruct/library/component/TankLayerScan.java index 48ee02b3..f262ccf1 100644 --- a/src/main/java/tconstruct/library/component/TankLayerScan.java +++ b/src/main/java/tconstruct/library/component/TankLayerScan.java @@ -505,7 +505,7 @@ public class TankLayerScan extends LogicComponent for (int i = 0; i < layerAir.tagCount(); ++i) { NBTTagIntArray tag = (NBTTagIntArray) layerAir.tagAt(i); - int[] coord = tag.intArray; + int[] coord = tag.func_150302_c(); layerAirCoords.add(new CoordTuple(coord[0], coord[1], coord[2])); } } @@ -518,7 +518,7 @@ public class TankLayerScan extends LogicComponent for (int i = 0; i < blocks.tagCount(); ++i) { NBTTagIntArray tag = (NBTTagIntArray) blocks.tagAt(i); - int[] coord = tag.intArray; + int[] coord = tag.func_150302_c(); blockCoords.add(new CoordTuple(coord[0], coord[1], coord[2])); } } @@ -531,7 +531,7 @@ public class TankLayerScan extends LogicComponent for (int i = 0; i < air.tagCount(); ++i) { NBTTagIntArray tag = (NBTTagIntArray) air.tagAt(i); - int[] coord = tag.intArray; + int[] coord = tag.func_150302_c(); airCoords.add(new CoordTuple(coord[0], coord[1], coord[2])); } } diff --git a/src/main/java/tconstruct/library/tools/DualHarvestTool.java b/src/main/java/tconstruct/library/tools/DualHarvestTool.java index 7215d48c..0c46d534 100644 --- a/src/main/java/tconstruct/library/tools/DualHarvestTool.java +++ b/src/main/java/tconstruct/library/tools/DualHarvestTool.java @@ -27,11 +27,11 @@ public abstract class DualHarvestTool extends HarvestTool NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); World world = player.worldObj; int meta = world.getBlockMetadata(x, y, z); - Block block = player.worldObj.getBlock(x, y, z); + Block block = player.worldObj.func_147439_a(x, y, z); if (block == null || block == Blocks.air) return false; - int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType()); - int shlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getSecondHarvestType()); + int hlvl = block.getBlockHarvestLevel(meta, getHarvestType())); + int shlvl = block.getBlockHarvestLevel(meta, getSecondHarvestType()); if (hlvl <= tags.getInteger("HarvestLevel") && shlvl <= tags.getInteger("HarvestLevel2")) { @@ -70,7 +70,7 @@ public abstract class DualHarvestTool extends HarvestTool { float speed = tags.getInteger("MiningSpeed"); speed /= 100f; - int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType()); + int hlvl = block.getBlockHarvestLevel(meta, getHarvestType()); int durability = tags.getInteger("Damage"); float shoddy = tags.getFloat("Shoddy"); @@ -88,7 +88,7 @@ public abstract class DualHarvestTool extends HarvestTool { float speed = tags.getInteger("MiningSpeed2"); speed /= 100f; - int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType()); + int hlvl = block.getBlockHarvestLevel(meta, getHarvestType()); int durability = tags.getInteger("Damage"); float shoddy = tags.getFloat("Shoddy"); diff --git a/src/main/java/tconstruct/library/tools/ToolCore.java b/src/main/java/tconstruct/library/tools/ToolCore.java index 98567710..4b3df272 100644 --- a/src/main/java/tconstruct/library/tools/ToolCore.java +++ b/src/main/java/tconstruct/library/tools/ToolCore.java @@ -611,9 +611,9 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBa } @Override - public boolean onBlockDestroyed (ItemStack itemstack, World world, Block block, int x, int y, int z, EntityLivingBase player) + public boolean func_150894_a (ItemStack itemstack, World world, Block block, int x, int y, int z, EntityLivingBase player) { - if (block != null && (double) block.getBlockHardness(world, x, y, z) != 0.0D) + if (block != null && (double) block.func_149712_f(world, x, y, z) != 0.0D) { return AbilityHelper.onBlockChanged(itemstack, world, block, x, y, z, player, random); } diff --git a/src/main/java/tconstruct/library/tools/Weapon.java b/src/main/java/tconstruct/library/tools/Weapon.java index 1ed43e23..35d5247a 100644 --- a/src/main/java/tconstruct/library/tools/Weapon.java +++ b/src/main/java/tconstruct/library/tools/Weapon.java @@ -78,14 +78,14 @@ public abstract class Weapon extends ToolCore /** * Returns if the item (tool) can harvest results from the block type. */ - public boolean canHarvestBlock (Block block) + public boolean canHarvestBlock (Block block, ItemStack is) { for (int i = 0; i < web.length; i++) { if (block.func_149688_o() == web[i]) return true; } - return super.canHarvestBlock(block); + return super.canHarvestBlock(block, is); } protected Material[] getEffectiveMaterials () diff --git a/src/main/java/tconstruct/modifiers/tools/TActiveOmniMod.java b/src/main/java/tconstruct/modifiers/tools/TActiveOmniMod.java index a450ce64..f7fad671 100644 --- a/src/main/java/tconstruct/modifiers/tools/TActiveOmniMod.java +++ b/src/main/java/tconstruct/modifiers/tools/TActiveOmniMod.java @@ -59,7 +59,7 @@ public class TActiveOmniMod extends ActiveToolMod NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool"); World world = entity.worldObj; - Block block = entity.worldObj.getBlock(x, y, z); + Block block = entity.worldObj.func_147439_a(x, y, z); int meta = world.getBlockMetadata(x, y, z); //TODO do we need the next to lines???????? if (block == null) diff --git a/src/main/java/tconstruct/util/DamageSourceLandmine.java b/src/main/java/tconstruct/util/DamageSourceLandmine.java index 02e90e99..7938ba9c 100644 --- a/src/main/java/tconstruct/util/DamageSourceLandmine.java +++ b/src/main/java/tconstruct/util/DamageSourceLandmine.java @@ -1,7 +1,7 @@ package tconstruct.util; import net.minecraft.entity.EntityLivingBase; -import net.minecraft.util.ChatMessageComponent; +import net.minecraft.util.ChatComponentText; import net.minecraft.util.DamageSource; import net.minecraft.util.IChatComponent; import net.minecraft.util.StatCollector; @@ -15,9 +15,10 @@ public class DamageSourceLandmine extends DamageSource this.setDamageBypassesArmor(); } - public IChatComponent getDeathMessage (EntityLivingBase par1EntityLivingBase) + public IChatComponent func_151519_b (EntityLivingBase par1EntityLivingBase) { - return super.getDeathMessage(par1EntityLivingBase); + //TODO getDeathMessage???? + return super.func_151519_b(par1EntityLivingBase); } } diff --git a/src/main/java/tconstruct/util/MiningExplosion.java b/src/main/java/tconstruct/util/MiningExplosion.java index b93a5922..ffe0acf7 100644 --- a/src/main/java/tconstruct/util/MiningExplosion.java +++ b/src/main/java/tconstruct/util/MiningExplosion.java @@ -70,7 +70,7 @@ public class MiningExplosion extends Explosion int l = MathHelper.floor_double(d0); int i1 = MathHelper.floor_double(d1); int j1 = MathHelper.floor_double(d2); - Block k1 = this.world.getBlock(l, i1, j1); + Block k1 = this.world.func_147439_a(l, i1, j1); if (k1 != Blocks.air) { @@ -169,10 +169,10 @@ public class MiningExplosion extends Explosion while (iterator.hasNext()) { chunkposition = (ChunkPosition) iterator.next(); - i = chunkposition.x; - j = chunkposition.y; - k = chunkposition.z; - l = this.world.getBlock(i, j, k); + i = chunkposition.field_151329_a; + j = chunkposition.field_151327_b; + k = chunkposition.field_151328_c; + l = this.world.func_147439_a(i, j, k); if (par1) { @@ -199,9 +199,9 @@ public class MiningExplosion extends Explosion { Block block = l; - if (block.canDropFromExplosion(this)) + if (block.func_149659_a(this)) { - block.dropBlockAsItemWithChance(this.world, i, j, k, this.world.getBlockMetadata(i, j, k), 1.0F, 0); + block.func_149690_a(this.world, i, j, k, this.world.getBlockMetadata(i, j, k), 1.0F, 0); } block.onBlockExploded(this.world, i, j, k, this); @@ -216,11 +216,11 @@ public class MiningExplosion extends Explosion while (iterator.hasNext()) { chunkposition = (ChunkPosition) iterator.next(); - i = chunkposition.x; - j = chunkposition.y; - k = chunkposition.z; - l = this.world.getBlock(i, j, k); - Block i1 = this.world.getBlock(i, j - 1, k); + i = chunkposition.field_151329_a; + j = chunkposition.field_151327_b; + k = chunkposition.field_151328_c; + l = this.world.func_147439_a(i, j, k); + Block i1 = this.world.func_147439_a(i, j - 1, k); if (l == Blocks.air && Block.opaqueCubeLookup[i1] && this.random.nextInt(3) == 0) { diff --git a/src/main/java/tconstruct/util/SmelteryDamageSource.java b/src/main/java/tconstruct/util/SmelteryDamageSource.java index 9f32108f..18253b47 100644 --- a/src/main/java/tconstruct/util/SmelteryDamageSource.java +++ b/src/main/java/tconstruct/util/SmelteryDamageSource.java @@ -35,7 +35,7 @@ public class SmelteryDamageSource extends DamageSource String s = "death." + type + this.damageType; String s1 = s + ".player"; return entityliving1 != null && StatCollector.func_94522_b(s1) ? StatCollector.translateToLocalFormatted(s1, - new Object[] { par1EntityLiving.getTranslatedEntityName(), entityliving1.getTranslatedEntityName() }) : StatCollector.translateToLocalFormatted(s, + new Object[] { par1EntityLiving..getTranslatedEntityName(), entityliving1.getTranslatedEntityName() }) : StatCollector.translateToLocalFormatted(s, new Object[] { par1EntityLiving.getTranslatedEntityName() }); } } diff --git a/src/main/java/tconstruct/util/TEventHandler.java b/src/main/java/tconstruct/util/TEventHandler.java index a9d9a2d7..c6d48f31 100644 --- a/src/main/java/tconstruct/util/TEventHandler.java +++ b/src/main/java/tconstruct/util/TEventHandler.java @@ -264,7 +264,7 @@ public class TEventHandler for (int i = 0; i < event.drops.size(); i++) { ItemStack is = event.drops.get(i).getEntityItem(); - if (FurnaceRecipes.smelting().getSmeltingResult(is) != null && FurnaceRecipes.smelting().getSmeltingResult(is).getItem() instanceof ItemFood) + if (FurnaceRecipes.smelting().func_151395_a(is) != null && FurnaceRecipes.smelting().func_151395_a(is).getItem() instanceof ItemFood) { NBTTagCompound stackCompound = is.getTagCompound(); if (stackCompound == null) @@ -636,7 +636,7 @@ public class TEventHandler for(int i = 0; i < armor.getSizeInventory(); i++){ if(armor.getStackInSlot(i) != null){ armor.getStackInSlot(i).getItem().onUpdate(armor.getStackInSlot(i), player.worldObj, player, i, false); - armor.getStackInSlot(i).getItem().onArmorTickUpdate(player.worldObj, player, armor.getStackInSlot(i)); + armor.getStackInSlot(i).getItem().onArmorTick(player.worldObj, player, armor.getStackInSlot(i)); } } } diff --git a/src/main/java/tconstruct/worldgen/SlimeIslandGen.java b/src/main/java/tconstruct/worldgen/SlimeIslandGen.java index 74feec34..2b14eb43 100644 --- a/src/main/java/tconstruct/worldgen/SlimeIslandGen.java +++ b/src/main/java/tconstruct/worldgen/SlimeIslandGen.java @@ -250,7 +250,7 @@ public class SlimeIslandGen extends WorldGenerator implements IWorldGenerator { if (validLocations[(xPos * 16 + zPos) * 8 + yPos]) { - world.func_147465_d(x + xPos, y + yPos, z + zPos, yPos >= 4 ? Blocks.air : this.liquidBlock); + world.setBlock(x + xPos, y + yPos, z + zPos, yPos >= 4 ? Blocks.air : this.liquidBlock); } } } diff --git a/src/main/java/tconstruct/worldgen/SurfaceOreGen.java b/src/main/java/tconstruct/worldgen/SurfaceOreGen.java index 1c607c92..bda1a932 100644 --- a/src/main/java/tconstruct/worldgen/SurfaceOreGen.java +++ b/src/main/java/tconstruct/worldgen/SurfaceOreGen.java @@ -17,7 +17,7 @@ public class SurfaceOreGen extends WorldGenerator /** The number of blocks to generate. */ private int numberOfBlocks; - private int[] replaceBlocks; + private Block[] replaceBlocks; private boolean alterSize; public SurfaceOreGen(Block b, int meta, int number, boolean changeSize) @@ -25,7 +25,7 @@ public class SurfaceOreGen extends WorldGenerator this(b, meta, number, changeSize, Blocks.stone, (Block) Blocks.grass, Blocks.dirt, Blocks.water, Blocks.sand, Blocks.gravel, Blocks.snow); } - public SurfaceOreGen(Block b, int meta, int number, boolean changeSize, int... target) + public SurfaceOreGen(Block b, int meta, int number, boolean changeSize, Block... target) { this.minableBlock = b; this.numberOfBlocks = number; diff --git a/src/main/java/tconstruct/worldgen/TBaseWorldGenerator.java b/src/main/java/tconstruct/worldgen/TBaseWorldGenerator.java index 3834ac95..c672d62e 100644 --- a/src/main/java/tconstruct/worldgen/TBaseWorldGenerator.java +++ b/src/main/java/tconstruct/worldgen/TBaseWorldGenerator.java @@ -282,7 +282,7 @@ public class TBaseWorldGenerator implements IWorldGenerator world.func_147465_d(x + chunkX, y, z + chunkZ, Blocks.end_stone, 0, 0); if (y > 40 && (block.func_149688_o() == Material.field_151578_c || block.func_149688_o() == Material.field_151577_b)) world.func_147465_d(x + chunkX, y, z + chunkZ, Blocks.soul_sand, 0, 0); - if (block.func_149688_o() == Material.sand) + if (block.func_149688_o() == Material.field_151595_p) world.func_147465_d(x + chunkX, y, z + chunkZ, Blocks.silverfish, 0, 0); } }