use of binnie.extratrees.machines.distillery.DistilleryLogic in project Binnie by ForestryMC.
the class ControlDistilleryProgress method onRenderBackground.
@Override
@SideOnly(Side.CLIENT)
public void onRenderBackground(int guiWidth, int guiHeight) {
CraftGUI.RENDER.texture(DISTILLERY_BASE, Point.ZERO);
CraftGUI.RENDER.texturePercentage(LIQUID_FLOW, new Area(18, 0, 38, 66), Alignment.LEFT, this.progress);
final DistilleryLogic component = Machine.getInterface(DistilleryLogic.class, Window.get(this).getInventory());
FluidStack stack = null;
if (component != null) {
stack = component.getCurrentFluid();
}
if (stack != null) {
for (int y = 0; y < 4; ++y) {
RenderUtil.drawFluid(new Point(1, 1 + y * 16), stack);
}
}
}
use of binnie.extratrees.machines.distillery.DistilleryLogic in project Binnie by ForestryMC.
the class ControlDistilleryProgress method onRenderForeground.
@Override
@SideOnly(Side.CLIENT)
public void onRenderForeground(int guiWidth, int guiHeight) {
DistilleryLogic distilleryLogic = Machine.getInterface(DistilleryLogic.class, Window.get(this).getInventory());
if (distilleryLogic != null) {
final int level = distilleryLogic.getLevel();
GlStateManager.enableAlpha();
CraftGUI.RENDER.texture(OUTPUT, new Point(47, 14 + level * 15));
CraftGUI.RENDER.texture(DISTILLERY_OVERLAY, Point.ZERO);
}
}
Aggregations