Fix the BLOCK_3D render helper for items that aren't an instance of ItemBlock Closes #533
This commit is contained in:
parent
2d84dcd44e
commit
13ff75bd9c
2 changed files with 4 additions and 5 deletions
|
@ -80,10 +80,10 @@ public class ForgeHooksClient
|
|||
}
|
||||
boolean is3D = customRenderer.shouldUseRenderHelper(ENTITY, item, BLOCK_3D);
|
||||
|
||||
if (item.getItem() instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[item.itemID].getRenderType())))
|
||||
engine.bindTexture(item.getItemSpriteNumber() == 0 ? "/terrain.png" : "/gui/items.png");
|
||||
if (is3D || (item.itemID < Block.blocksList.length && RenderBlocks.renderItemIn3d(Block.blocksList[item.itemID].getRenderType())))
|
||||
{
|
||||
engine.bindTexture("/terrain.png");
|
||||
int renderType = Block.blocksList[item.itemID].getRenderType();
|
||||
int renderType = (item.itemID < Block.blocksList.length ? Block.blocksList[item.itemID].getRenderType() : 1);
|
||||
float scale = (renderType == 1 || renderType == 19 || renderType == 12 || renderType == 2 ? 0.5F : 0.25F);
|
||||
|
||||
if (RenderItem.renderInFrame)
|
||||
|
@ -114,7 +114,6 @@ public class ForgeHooksClient
|
|||
}
|
||||
else
|
||||
{
|
||||
engine.bindTexture(item.getItemSpriteNumber() == 0 ? "/terrain.png" : "/gui/items.png");
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
customRenderer.renderItem(ENTITY, item, renderBlocks, entity);
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED);
|
||||
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D));
|
||||
+
|
||||
+ if (itemstack1.getItem() instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType())))
|
||||
+ if (is3D || (itemstack1.itemID < Block.blocksList.length && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType())))
|
||||
{
|
||||
f3 = 0.5F;
|
||||
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
|
||||
|
|
Loading…
Reference in a new issue