Skip to content

Commit

Permalink
fix rendering error, fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
EoD committed Oct 5, 2014
1 parent 2a69107 commit 4876abe
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,27 @@ public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block b
if(blck == null || !(blck instanceof BlockTexturedOre))
return false;
BlockTexturedOre block = (BlockTexturedOre) blck;
boolean result = false;

if(block.currentPass == 0)
{
if(block.icon != null)
{
renderer.overrideBlockTexture = block.icon;
renderer.renderStandardBlock(block, x, y, z);
result = renderer.renderStandardBlock(block, x, y, z);
renderer.overrideBlockTexture = null;
} else if(block.base != null)
{
rendererAdvanced.renderWorldBlock(world, x, y, z, block, -1, renderer);
// TODO use renderBlockByRenderType for block.getRenderType != 0
result = rendererAdvanced.renderWorldBlock(world, x, y, z, block, -1, renderer);
}
} else
{
renderer.setRenderBounds(bot, bot, bot, top, top, top);
rendererAdvanced.renderWorldBlock(world, x, y, z, block, -1, renderer);
result = rendererAdvanced.renderWorldBlock(world, x, y, z, block, -1, renderer);
}

return true;
return result;
}

@Override
Expand Down

0 comments on commit 4876abe

Please sign in to comment.