use of pneumaticCraft.common.tileentity.TileEntityPlasticMixer in project PneumaticCraft by MineMaarten.
the class ModelPlasticMixer method renderStatic.
@Override
public void renderStatic(float size, TileEntity te) {
Shape2.render(size);
Shape3b.render(size);
Shape1.render(size);
Shape3.render(size);
Shape4b.render(size);
Shape4.render(size);
if (te != null) {
TileEntityPlasticMixer mixer = (TileEntityPlasticMixer) te;
FluidTankInfo info = mixer.getTankInfo(null)[0];
if (info.fluid != null && info.fluid.amount > 10) {
float percentageFull = (float) info.fluid.amount / info.capacity;
RenderInfo renderInfo = new RenderInfo(-6 / 16F + 0.01F, 22 / 16F - percentageFull * 13.999F / 16F, -6 / 16F + 0.01F, 6 / 16F - 0.01F, 22 / 16F, 6 / 16F - 0.01F);
RenderUtils.INSTANCE.renderLiquid(info, renderInfo, mixer.getWorldObj());
}
}
}
Aggregations