Merge pull request #1559 from jstockwin/development
Stop energy cube core rendering when cube is empty.
This commit is contained in:
commit
fd9fb0713e
1 changed files with 22 additions and 17 deletions
|
@ -55,6 +55,8 @@ public class RenderEnergyCube extends TileEntitySpecialRenderer
|
|||
model.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if(tileEntity.getEnergy()/tileEntity.getMaxEnergy()>0.1) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
|
||||
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "EnergyCore.png"));
|
||||
|
@ -64,18 +66,21 @@ public class RenderEnergyCube extends TileEntitySpecialRenderer
|
|||
|
||||
EnumColor c = tileEntity.tier.color;
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.4F, 0.4F, 0.4F);
|
||||
GL11.glColor4f(c.getColor(0), c.getColor(1), c.getColor(2), (float)(tileEntity.getEnergy()/tileEntity.getMaxEnergy()));
|
||||
GL11.glTranslatef(0, (float)Math.sin(Math.toRadians((MekanismClient.ticksPassed + partialTick) * 3)) / 7, 0);
|
||||
GL11.glColor4f(c.getColor(0), c.getColor(1), c.getColor(2), (float) (tileEntity.getEnergy() / tileEntity.getMaxEnergy()));
|
||||
GL11.glTranslatef(0, (float) Math.sin(Math.toRadians((MekanismClient.ticksPassed + partialTick) * 3)) / 7, 0);
|
||||
GL11.glRotatef((MekanismClient.ticksPassed + partialTick) * 4, 0, 1, 0);
|
||||
GL11.glRotatef(36F + (MekanismClient.ticksPassed + partialTick) * 4, 0, 1, 1);
|
||||
core.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
MekanismRenderer.glowOff();
|
||||
MekanismRenderer.blendOff();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue