From 8f861c24d8255beffe0632894fcd2a0261a46e4b Mon Sep 17 00:00:00 2001 From: LexManos Date: Sat, 16 Jun 2012 13:27:00 -0700 Subject: [PATCH] Few more cases for 4096, thanks TrueBrain --- .../minecraft/net/minecraft/src/RenderBiped.java.patch | 2 +- .../net/minecraft/src/RenderPlayer.java.patch | 10 ++++++++-- .../net/minecraft/src/RenderSnowMan.java.patch | 8 +++++++- .../net/minecraft/src/TileEntityFurnace.java.patch | 9 ++++++++- .../net/minecraft/src/TileEntityFurnace.java.patch | 9 ++++++++- 5 files changed, 32 insertions(+), 6 deletions(-) diff --git a/forge/patches/minecraft/net/minecraft/src/RenderBiped.java.patch b/forge/patches/minecraft/net/minecraft/src/RenderBiped.java.patch index c4a5597f2..aadf06dc7 100644 --- a/forge/patches/minecraft/net/minecraft/src/RenderBiped.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/RenderBiped.java.patch @@ -19,7 +19,7 @@ + IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var3, EQUIPPED); + boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, var3, BLOCK_3D)); + -+ if (var3.itemID < 256 && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var3.itemID].getRenderType()))) ++ if (var3.getItem() instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var3.itemID].getRenderType()))) { var4 = 0.5F; GL11.glTranslatef(0.0F, 0.1875F, -0.3125F); diff --git a/forge/patches/minecraft/net/minecraft/src/RenderPlayer.java.patch b/forge/patches/minecraft/net/minecraft/src/RenderPlayer.java.patch index bc5ddf28c..cb3ab266a 100644 --- a/forge/patches/minecraft/net/minecraft/src/RenderPlayer.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/RenderPlayer.java.patch @@ -30,7 +30,13 @@ ModelBiped var7 = par2 == 2 ? this.modelArmor : this.modelArmorChestplate; var7.bipedHead.showModel = par2 == 0; var7.bipedHeadwear.showModel = par2 == 0; -@@ -168,7 +180,10 @@ +@@ -163,12 +175,15 @@ + super.renderEquippedItems(par1EntityPlayer, par2); + ItemStack var3 = par1EntityPlayer.inventory.armorItemInSlot(3); + +- if (var3 != null && var3.getItem().shiftedIndex < 256) ++ if (var3 != null && var3.getItem() instanceof ItemBlock) + { GL11.glPushMatrix(); this.modelBipedMain.bipedHead.postRender(0.0625F); @@ -52,7 +58,7 @@ + IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var21, EQUIPPED); + boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, var21, BLOCK_3D)); + -+ if (var21.itemID < 256 && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var21.itemID].getRenderType()))) ++ if (var21.getItem() instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[var21.itemID].getRenderType()))) { var6 = 0.5F; GL11.glTranslatef(0.0F, 0.1875F, -0.3125F); diff --git a/forge/patches/minecraft/net/minecraft/src/RenderSnowMan.java.patch b/forge/patches/minecraft/net/minecraft/src/RenderSnowMan.java.patch index 2e4239da5..3386b2db0 100644 --- a/forge/patches/minecraft/net/minecraft/src/RenderSnowMan.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/RenderSnowMan.java.patch @@ -11,7 +11,13 @@ import org.lwjgl.opengl.GL11; public class RenderSnowMan extends RenderLiving -@@ -24,7 +29,10 @@ +@@ -19,12 +24,15 @@ + super.renderEquippedItems(par1EntitySnowman, par2); + ItemStack var3 = new ItemStack(Block.pumpkin, 1); + +- if (var3 != null && var3.getItem().shiftedIndex < 256) ++ if (var3 != null && var3.getItem() instanceof ItemBlock) + { GL11.glPushMatrix(); this.snowmanModel.field_40305_c.postRender(0.0625F); diff --git a/forge/patches/minecraft/net/minecraft/src/TileEntityFurnace.java.patch b/forge/patches/minecraft/net/minecraft/src/TileEntityFurnace.java.patch index 2b00a8d60..42adc5483 100644 --- a/forge/patches/minecraft/net/minecraft/src/TileEntityFurnace.java.patch +++ b/forge/patches/minecraft/net/minecraft/src/TileEntityFurnace.java.patch @@ -43,7 +43,14 @@ { ++this.furnaceItemStacks[2].stackSize; } -@@ -326,6 +333,11 @@ +@@ -320,12 +327,17 @@ + else + { + int var1 = par1ItemStack.getItem().shiftedIndex; +- if (var1 < 256 && Block.blocksList[var1].blockMaterial == Material.wood) return 300; ++ if (par1ItemStack.getItem() instanceof ItemBlock && Block.blocksList[var1].blockMaterial == Material.wood) return 300; + if (var1 == Item.stick.shiftedIndex) return 100; + if (var1 == Item.coal.shiftedIndex) return 1600; if (var1 == Item.bucketLava.shiftedIndex) return 20000; if (var1 == Block.sapling.blockID) return 100; if (var1 == Item.blazeRod.shiftedIndex) return 2400; diff --git a/forge/patches/minecraft_server/net/minecraft/src/TileEntityFurnace.java.patch b/forge/patches/minecraft_server/net/minecraft/src/TileEntityFurnace.java.patch index ee0e151f5..7d4b3986b 100644 --- a/forge/patches/minecraft_server/net/minecraft/src/TileEntityFurnace.java.patch +++ b/forge/patches/minecraft_server/net/minecraft/src/TileEntityFurnace.java.patch @@ -43,7 +43,14 @@ { ++this.furnaceItemStacks[2].stackSize; } -@@ -302,6 +309,11 @@ +@@ -296,12 +303,17 @@ + else + { + int var1 = par1ItemStack.getItem().shiftedIndex; +- if (var1 < 256 && Block.blocksList[var1].blockMaterial == Material.wood) return 300; ++ if (par1ItemStack.getItem() instanceof ItemBlock && Block.blocksList[var1].blockMaterial == Material.wood) return 300; + if (var1 == Item.stick.shiftedIndex) return 100; + if (var1 == Item.coal.shiftedIndex) return 1600; if (var1 == Item.bucketLava.shiftedIndex) return 20000; if (var1 == Block.sapling.blockID) return 100; if (var1 == Item.blazeRod.shiftedIndex) return 2400;