TechReborn/src/main/java/techreborn/client/gui/GuiLESU.java

58 lines
2 KiB
Java
Raw Normal View History

2015-06-14 17:42:03 +02:00
package techreborn.client.gui;
2016-03-25 10:47:34 +01:00
import java.awt.*;
2015-06-14 17:42:03 +02:00
import net.minecraft.client.gui.inventory.GuiContainer;
2016-02-21 15:16:55 +01:00
import net.minecraft.client.renderer.GlStateManager;
2015-06-14 17:42:03 +02:00
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
2016-03-13 17:08:30 +01:00
import net.minecraft.util.text.translation.I18n;
import reborncore.common.powerSystem.PowerSystem;
2016-03-29 04:47:00 +02:00
import techreborn.client.container.ContainerLESU;
2015-06-14 17:42:03 +02:00
import techreborn.tiles.lesu.TileLesu;
2016-03-29 04:47:00 +02:00
public class GuiLESU extends GuiContainer
2016-03-25 10:47:34 +01:00
{
private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/aesu.png");
TileLesu aesu;
2016-03-29 04:47:00 +02:00
ContainerLESU containerLesu;
2016-03-25 10:47:34 +01:00
2016-03-29 04:47:00 +02:00
public GuiLESU(EntityPlayer player, TileLesu tileaesu)
2016-03-25 10:47:34 +01:00
{
2016-03-29 04:47:00 +02:00
super(new ContainerLESU(tileaesu, player));
2016-03-25 10:47:34 +01:00
this.xSize = 176;
2016-03-29 04:47:00 +02:00
this.ySize = 197;
2016-03-25 10:47:34 +01:00
aesu = tileaesu;
2016-03-29 04:47:00 +02:00
this.containerLesu = (ContainerLESU) this.inventorySlots;
2016-03-25 10:47:34 +01:00
}
@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_)
{
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(texture);
int k = (this.width - this.xSize) / 2;
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
}
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)
{
this.fontRendererObj.drawString(I18n.translateToLocal("tile.techreborn.lesu.name"), 40, 10,
Color.WHITE.getRGB());
this.fontRendererObj.drawString(PowerSystem.getLocalizedPower(containerLesu.euOut) + "/t", 10, 20,
2016-03-25 10:47:34 +01:00
Color.WHITE.getRGB());
this.fontRendererObj.drawString(PowerSystem.getLocalizedPower(containerLesu.storedEu), 10, 30,
2016-03-25 10:47:34 +01:00
Color.WHITE.getRGB());
this.fontRendererObj.drawString(PowerSystem.getLocalizedPower(containerLesu.euChange) + " change", 10, 40,
2016-03-25 10:47:34 +01:00
Color.WHITE.getRGB());
this.fontRendererObj.drawString(containerLesu.connectedBlocks + " blocks", 10, 50, Color.WHITE.getRGB());
this.fontRendererObj.drawString(PowerSystem.getLocalizedPower(containerLesu.euStorage) + " max", 10, 60,
2016-03-25 10:47:34 +01:00
Color.WHITE.getRGB());
}
2015-06-14 17:42:03 +02:00
}