mirror of
https://github.com/GTNewHorizons/EnderCore.git
synced 2026-11-18 19:29:09 +00:00
SleepyTrousers/EnderIO#2603 Fix techne model icon handling
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user