2012-08-17 03:46:21 +02:00
|
|
|
|
package net.uberkat.obsidian.client;
|
|
|
|
|
|
|
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
|
import net.minecraft.src.*;
|
|
|
|
|
import net.uberkat.obsidian.common.ContainerTheoreticalElementizer;
|
|
|
|
|
import net.uberkat.obsidian.common.TileEntityTheoreticalElementizer;
|
|
|
|
|
|
|
|
|
|
public class GuiTheoreticalElementizer extends GuiContainer
|
|
|
|
|
{
|
2012-08-18 19:40:59 +02:00
|
|
|
|
private TileEntityTheoreticalElementizer machineInventory;
|
2012-08-17 03:46:21 +02:00
|
|
|
|
|
|
|
|
|
public GuiTheoreticalElementizer(InventoryPlayer par1InventoryPlayer, TileEntityTheoreticalElementizer par2TileEntityTheoreticalElementizer)
|
|
|
|
|
{
|
|
|
|
|
super(new ContainerTheoreticalElementizer(par1InventoryPlayer, par2TileEntityTheoreticalElementizer));
|
2012-08-18 19:40:59 +02:00
|
|
|
|
machineInventory = par2TileEntityTheoreticalElementizer;
|
2012-08-17 03:46:21 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Draw the foreground layer for the GuiContainer (everythin in front of the items)
|
|
|
|
|
*/
|
|
|
|
|
protected void drawGuiContainerForegroundLayer()
|
|
|
|
|
{
|
2012-08-26 15:48:42 +02:00
|
|
|
|
String displayText = "";
|
|
|
|
|
fontRenderer.drawString("Theoretical Elementizer", 32, 6, 0x404040);
|
2012-08-17 03:46:21 +02:00
|
|
|
|
fontRenderer.drawString("Inventory", 8, (ySize - 96) + 2, 0x404040);
|
2012-08-26 15:48:42 +02:00
|
|
|
|
if(machineInventory.machineBurnTime > 0)
|
|
|
|
|
{
|
|
|
|
|
displayText = "Status: " + Integer.toString(machineInventory.machineCookTime/10) + "%";
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
displayText = "Status: <20>4Off";
|
|
|
|
|
}
|
|
|
|
|
fontRenderer.drawString(displayText, 80, 60, 0x404040);
|
2012-08-17 03:46:21 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Draw the background layer for the GuiContainer (everything behind the items)
|
|
|
|
|
*/
|
|
|
|
|
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
|
|
|
|
|
{
|
|
|
|
|
int var4 = this.mc.renderEngine.getTexture("/gui/GuiElementizer.png");
|
|
|
|
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
|
|
|
|
mc.renderEngine.bindTexture(var4);
|
|
|
|
|
int var5 = (this.width - this.xSize) / 2;
|
|
|
|
|
int var6 = (this.height - this.ySize) / 2;
|
|
|
|
|
drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
|
|
|
|
|
int var7;
|
|
|
|
|
|
2012-08-18 19:40:59 +02:00
|
|
|
|
if (this.machineInventory.isBurning())
|
2012-08-17 03:46:21 +02:00
|
|
|
|
{
|
2012-08-18 19:40:59 +02:00
|
|
|
|
var7 = this.machineInventory.getBurnTimeRemainingScaled(12);
|
2012-08-17 03:46:21 +02:00
|
|
|
|
this.drawTexturedModalRect(var5 + 56, var6 + 36 + 12 - var7, 176, 12 - var7, 14, var7 + 2);
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-18 19:40:59 +02:00
|
|
|
|
var7 = this.machineInventory.getCookProgressScaled(24);
|
2012-08-17 03:46:21 +02:00
|
|
|
|
this.drawTexturedModalRect(var5 + 79, var6 + 34, 176, 14, var7 + 1, 16);
|
|
|
|
|
}
|
|
|
|
|
}
|