SleepyTrousers/EnderIO#2603 Fix techne model icon handling

This commit is contained in:
tterrag1098 committed 2015-06-23 21:26:23 -04:00
1 parent 1905796463
commit e8a5c364e2
2 files changed
+2 -9

No files matched your search

@@ -49,13 +49,13 @@ public class TechneModelRenderer implements ISimpleBlockRenderingHandler {
@Override
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
TechneUtil.vt = this.vt;
TechneUtil.renderInventoryBlock(getModel(block, metadata), block, metadata, renderer);
TechneUtil.renderInventoryBlock(getModel(block, metadata), getModelIcon(block, metadata), block, metadata, renderer);
}
@Override
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
TechneUtil.vt = this.vt;
return TechneUtil.renderWorldBlock(getModel(world, x, y, z), world, x, y, z, block, renderer);
return TechneUtil.renderWorldBlock(getModel(world, x, y, z), getModelIcon(world, x, y, z, block), world, x, y, z, block, renderer);
}
protected IIcon getModelIcon(Block block, int metadata) {
@@ -404,18 +404,11 @@ public class TechneUtil {
vt = null;
}
// TODO
private static IIcon getIconFor(Block block, IBlockAccess world, int x, int y, int z) {
// if(block instanceof AbstractMachineBlock<?>) {
// return ((AbstractMachineBlock<?>) block).getModelIcon(world, x, y, z);
// }
return block.getIcon(world, x, y, z, 0);
}
private static IIcon getIconFor(Block block, int metadata) {
// if(block instanceof AbstractMachineBlock<?>) {
// return ((AbstractMachineBlock<?>) block).getModelIcon();
// }
return block.getIcon(0, metadata);
}
}