From 15ffb962e41b82f653a5574fea3d3f40543c9788 Mon Sep 17 00:00:00 2001 From: LexManos Date: Tue, 23 Apr 2013 19:05:35 -0700 Subject: [PATCH] Fix rotation issue with non-block items. --- .../client/renderer/entity/RenderPlayer.java.patch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/patches/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java.patch b/patches/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java.patch index 5775876b0..da9da352d 100644 --- a/patches/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java.patch +++ b/patches/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java.patch @@ -79,19 +79,20 @@ { f2 = 0.625F; GL11.glTranslatef(0.0F, -0.25F, 0.0F); -@@ -304,7 +317,10 @@ +@@ -304,7 +317,11 @@ enumaction = itemstack1.getItemUseAction(); } - if (itemstack1.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType())) + IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED); + boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D)); ++ boolean isBlock = itemstack1.itemID < Block.blocksList.length && itemstack1.getItemSpriteNumber() == 0; + -+ if (is3D || (itemstack1.itemID < Block.blocksList.length && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType()))) ++ if (is3D || (isBlock && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType()))) { f3 = 0.5F; GL11.glTranslatef(0.0F, 0.1875F, -0.3125F); -@@ -361,7 +377,7 @@ +@@ -361,7 +378,7 @@ if (itemstack1.getItem().requiresMultipleRenderPasses()) {