mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-27 23:45:55 +00:00
Remove usage of 'localize(String, false)' in favor of localizeExact
This commit is contained in:
1 parent
f3ac159c52
commit
e1d60a5b19
20 files changed
+31
-30
No files matched your search
@@ -2,6 +2,7 @@ package crazypants.enderio.machine;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@@ -38,20 +39,30 @@ public class TechneMachineRenderer<T extends AbstractMachineEntity> extends Tech
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||
T te = (T) world.getTileEntity(x, y, z);
|
||||
if(te != null) {
|
||||
if (te != null) {
|
||||
setFacingDir(te.getFacingDir());
|
||||
overlay.setTile(te);
|
||||
}
|
||||
|
||||
super.renderWorldBlock(world, x, y, z, block, modelId, renderer);
|
||||
|
||||
if(renderer.overrideBlockTexture == null) {
|
||||
if (renderer.overrideBlockTexture == null) {
|
||||
ccr.renderBlock(world, block, x, y, z, overlay);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IIcon getModelIcon(Block block, int metadata) {
|
||||
return ((AbstractMachineBlock<?>) block).getModelIcon();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IIcon getModelIcon(IBlockAccess world, int x, int y, int z, Block block) {
|
||||
return getModelIcon(block, 0);
|
||||
}
|
||||
|
||||
private void setFacingDir(ForgeDirection dir) {
|
||||
VertexRotationFacing rot = (VertexRotationFacing) ((VertexTransformComposite) vt).xforms[0];
|
||||
rot.setRotation(dir);
|
||||
|
||||
Reference in new issue
Block a user