Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.jack.jackmod.gui;
- import com.jack.jackmod.reference.Reference;
- import com.jack.jackmod.tileentity.TileEntityHydrogenSeparator;
- import org.lwjgl.opengl.GL11;
- import net.minecraft.client.Minecraft;
- import net.minecraft.client.gui.inventory.GuiContainer;
- import net.minecraft.client.resources.I18n;
- import net.minecraft.entity.player.InventoryPlayer;
- import net.minecraft.init.Items;
- import net.minecraft.inventory.Container;
- import net.minecraft.util.ResourceLocation;
- import net.minecraft.util.StatCollector;
- import com.jack.jackmod.JackMod;
- import com.jack.jackmod.tileentity.TileEntityHydrogenSeparator;
- import com.jack.jackmod.container.ContainerHydrogenSeparator;
- public class GuiHydrogenSeparator extends GuiContainer {
- public static final ResourceLocation bground = new ResourceLocation(Reference.MOD_ID + ":" + "textures/gui/GuiHydrogenSeparator.png");
- public TileEntityHydrogenSeparator hydrogenSeparator;
- public GuiHydrogenSeparator(InventoryPlayer inventoryPlayer, TileEntityHydrogenSeparator entity) {
- super(new TileEntityHydrogenSeparator(inventoryPlayer, entity));
- this.hydrogenSeparator = entity;
- this.xSize = 176;
- this.ySize = 166;
- }
- public void drawGuiContainerForegroundLayer(int par1, int par2) {
- String name = this.hydrogenSeparator.hasCustomInventoryName() ? this.hydrogenSeparator.getInventoryName() : I18n.format(this.hydrogenSeparator.getInventoryName(), new Object[0]);
- this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
- this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 118, this.ySize - 96 + 2, 4210752);
- }
- @Override
- protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
- GL11.glColor4f(1F, 1F, 1F, 1F);
- Minecraft.getMinecraft().getTextureManager().bindTexture(bground);
- drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
- if(this.hydrogenSeparator.isBurning()) {
- int k = this.hydrogenSeparator.getBurnTimeRemainingScaled(40);
- int j = 40 - k;
- drawTexturedModalRect(guiLeft + 29, guiTop + 65, 176, 0, 40 - j, 10);
- }
- int k = this.hydrogenSeparator.getCookProgressScaled(24);
- drawTexturedModalRect(guiLeft + 79, guiTop + 34, 176, 10, k + 1, 16);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment