From a99b135e734470d910d318efc85b1fa0fff76fa2 Mon Sep 17 00:00:00 2001 From: Progwml6 Date: Sat, 18 Jan 2014 12:56:42 -0500 Subject: [PATCH] move 1.7 stuff to correct branch This reverts commit baf965d0d0e77829f95df76fa56dfaad3cf88855. --- .../java/tconstruct/client/TProxyClient.java | 24 +++++++++---------- .../util/DamageSourceFireworkExplode.java | 9 +++---- .../tconstruct/util/DamageSourceLandmine.java | 7 +++--- .../java/tconstruct/util/landmine/Helper.java | 14 +++++------ .../landmine/behavior/BehaviorBlockThrow.java | 3 +-- .../stackCombo/SpecialStackHandler.java | 2 +- 6 files changed, 30 insertions(+), 29 deletions(-) diff --git a/src/main/java/tconstruct/client/TProxyClient.java b/src/main/java/tconstruct/client/TProxyClient.java index 5b2ebab24c4..9450221ba81 100644 --- a/src/main/java/tconstruct/client/TProxyClient.java +++ b/src/main/java/tconstruct/client/TProxyClient.java @@ -52,7 +52,7 @@ public class TProxyClient extends TProxyCommon { public static SmallFontRenderer smallFontRenderer; - public static IIcon metalBall; + public static Icon metalBall; public static Minecraft mc; public static RenderItem itemRenderer = new RenderItem(); @@ -63,32 +63,32 @@ public class TProxyClient extends TProxyCommon public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z) { if (ID == toolStationID) - return new ToolStationGui(player.inventory, (ToolStationLogic) world.func_147438_o(x, y, z), world, x, y, z); + return new ToolStationGui(player.inventory, (ToolStationLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); if (ID == partBuilderID) - return new PartCrafterGui(player.inventory, (PartBuilderLogic) world.func_147438_o(x, y, z), world, x, y, z); + return new PartCrafterGui(player.inventory, (PartBuilderLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); if (ID == patternChestID) - return new PatternChestGui(player.inventory, (PatternChestLogic) world.func_147438_o(x, y, z), world, x, y, z); + return new PatternChestGui(player.inventory, (PatternChestLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); if (ID == frypanGuiID) - return new FrypanGui(player.inventory, (FrypanLogic) world.func_147438_o(x, y, z), world, x, y, z); + return new FrypanGui(player.inventory, (FrypanLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); if (ID == smelteryGuiID) { if (PHConstruct.newSmeltery) - return new AdaptiveSmelteryGui(player.inventory, (AdaptiveSmelteryLogic) world.func_147438_o(x, y, z), world, x, y, z); + return new AdaptiveSmelteryGui(player.inventory, (AdaptiveSmelteryLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); else - return new SmelteryGui(player.inventory, (SmelteryLogic) world.func_147438_o(x, y, z), world, x, y, z); + return new SmelteryGui(player.inventory, (SmelteryLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); } if (ID == stencilTableID) - return new StencilTableGui(player.inventory, (StencilTableLogic) world.func_147438_o(x, y, z), world, x, y, z); + return new StencilTableGui(player.inventory, (StencilTableLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); if (ID == toolForgeID) - return new ToolForgeGui(player.inventory, (ToolForgeLogic) world.func_147438_o(x, y, z), world, x, y, z); + return new ToolForgeGui(player.inventory, (ToolForgeLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); if (ID == landmineID) - return new GuiLandmine(new ContainerLandmine(player, (TileEntityLandmine) world.func_147438_o(x, y, z))); + return new GuiLandmine(new ContainerLandmine(player, (TileEntityLandmine) world.getBlockTileEntity(x, y, z))); if (ID == craftingStationID) - return new CraftingStationGui(player.inventory, (CraftingStationLogic) world.func_147438_o(x, y, z), world, x, y, z); + return new CraftingStationGui(player.inventory, (CraftingStationLogic) world.getBlockTileEntity(x, y, z), world, x, y, z); if (ID == furnaceID) - return new FurnaceGui(player.inventory, (FurnaceLogic) world.func_147438_o(x, y, z)); + return new FurnaceGui(player.inventory, (FurnaceLogic) world.getBlockTileEntity(x, y, z)); if (ID == manualGuiID) { diff --git a/src/main/java/tconstruct/util/DamageSourceFireworkExplode.java b/src/main/java/tconstruct/util/DamageSourceFireworkExplode.java index 1d32d87ae14..edaae009bd9 100644 --- a/src/main/java/tconstruct/util/DamageSourceFireworkExplode.java +++ b/src/main/java/tconstruct/util/DamageSourceFireworkExplode.java @@ -1,8 +1,9 @@ package tconstruct.util; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; -import net.minecraft.util.IChatComponent; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.ChatMessageComponent; public class DamageSourceFireworkExplode extends DamageSource { @@ -13,9 +14,9 @@ public DamageSourceFireworkExplode(String s) this.setDamageBypassesArmor(); } - public IChatComponent func_151519_b (EntityLivingBase par1EntityLivingBase) + public ChatMessageComponent getDeathMessage (EntityLivingBase par1EntityLivingBase) { - return super.func_151519_b(par1EntityLivingBase); + return super.getDeathMessage(par1EntityLivingBase); } } diff --git a/src/main/java/tconstruct/util/DamageSourceLandmine.java b/src/main/java/tconstruct/util/DamageSourceLandmine.java index 5aa2f688bfc..234bf4aedc7 100644 --- a/src/main/java/tconstruct/util/DamageSourceLandmine.java +++ b/src/main/java/tconstruct/util/DamageSourceLandmine.java @@ -1,8 +1,9 @@ package tconstruct.util; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.util.ChatMessageComponent; import net.minecraft.util.DamageSource; -import net.minecraft.util.IChatComponent; +import net.minecraft.util.StatCollector; public class DamageSourceLandmine extends DamageSource { @@ -13,9 +14,9 @@ public DamageSourceLandmine(String s) this.setDamageBypassesArmor(); } - public IChatComponent func_151519_b (EntityLivingBase par1EntityLivingBase) + public ChatMessageComponent getDeathMessage (EntityLivingBase par1EntityLivingBase) { - return super.func_151519_b(par1EntityLivingBase); + return super.getDeathMessage(par1EntityLivingBase); } } diff --git a/src/main/java/tconstruct/util/landmine/Helper.java b/src/main/java/tconstruct/util/landmine/Helper.java index 5a0fdb4eaec..fce9048b639 100644 --- a/src/main/java/tconstruct/util/landmine/Helper.java +++ b/src/main/java/tconstruct/util/landmine/Helper.java @@ -3,7 +3,7 @@ import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; -import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.common.ForgeDirection; /** * @@ -44,32 +44,32 @@ public static void renderInventoryCube (Block block, int metadata, int modelID, tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 1.0F, 0.0F); - renderer.func_147806_b(block, 0, 0, 0, renderer.func_147787_a(block, 1, metadata)); + renderer.renderFaceYPos(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 1, metadata)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, -1.0F, 0.0F); - renderer.func_147768_a(block, 0, 0, 0, renderer.func_147787_a(block, 0, metadata)); + renderer.renderFaceYNeg(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(1.0F, 0.0F, 0.0F); - renderer.func_147764_f(block, 0, 0, 0, renderer.func_147787_a(block, 2, metadata)); + renderer.renderFaceXPos(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 2, metadata)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(-1.0F, 0.0F, 0.0F); - renderer.func_147798_e(block, 0, 0, 0, renderer.func_147787_a(block, 3, metadata)); + renderer.renderFaceXNeg(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 3, metadata)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 0.0F, 1.0F); - renderer.func_147734_d(block, 0, 0, 0, renderer.func_147787_a(block, 4, metadata)); + renderer.renderFaceZPos(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 4, metadata)); tessellator.draw(); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 0.0F, -1.0F); - renderer.func_147761_c(block, 0, 0, 0, renderer.func_147787_a(block, 5, metadata)); + renderer.renderFaceZNeg(block, 0, 0, 0, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata)); tessellator.draw(); } diff --git a/src/main/java/tconstruct/util/landmine/behavior/BehaviorBlockThrow.java b/src/main/java/tconstruct/util/landmine/behavior/BehaviorBlockThrow.java index eb2f2c48a3c..78f3126db03 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/BehaviorBlockThrow.java +++ b/src/main/java/tconstruct/util/landmine/behavior/BehaviorBlockThrow.java @@ -3,7 +3,6 @@ import java.util.List; import net.minecraft.entity.Entity; -import net.minecraft.entity.item.EntityFallingBlock; import net.minecraft.entity.item.EntityFallingSand; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -65,7 +64,7 @@ public void executeLogic (World par1World, int par2, int par3, int par4, ItemSta break; } - EntityFallingBlock entityfallingsand = new EntityFallingBlock(par1World, (double) ((float) par2 + 0.5F), (double) ((float) par3 + 2F), (double) ((float) par4 + 0.5F), par5ItemStack.itemID, + EntityFallingSand entityfallingsand = new EntityFallingSand(par1World, (double) ((float) par2 + 0.5F), (double) ((float) par3 + 2F), (double) ((float) par4 + 0.5F), par5ItemStack.itemID, par5ItemStack.getItemDamage()); entityfallingsand.preventEntitySpawning = false; entityfallingsand.fallTime = 2; diff --git a/src/main/java/tconstruct/util/landmine/behavior/stackCombo/SpecialStackHandler.java b/src/main/java/tconstruct/util/landmine/behavior/stackCombo/SpecialStackHandler.java index 15379f929fa..f24ffb4f411 100644 --- a/src/main/java/tconstruct/util/landmine/behavior/stackCombo/SpecialStackHandler.java +++ b/src/main/java/tconstruct/util/landmine/behavior/stackCombo/SpecialStackHandler.java @@ -68,7 +68,7 @@ public final void removeItemFromInventory (World par1World, int x, int y, int z, return; } - TileEntityLandmine tileEntity = (TileEntityLandmine) par1World.func_147438_o(x, y, z); + TileEntityLandmine tileEntity = (TileEntityLandmine) par1World.getBlockTileEntity(x, y, z); while (item.stackSize > 0) {