SHOW:
|
|
- or go back to the newest paste.
| 1 | package fossils.gui; | |
| 2 | ||
| 3 | import fossils.blocks.containers.ContainerEgg; | |
| 4 | import fossils.blocks.tileentities.TileEntityEgg; | |
| 5 | import net.minecraft.client.Minecraft; | |
| 6 | import net.minecraft.client.gui.inventory.GuiContainer; | |
| 7 | import net.minecraft.entity.player.InventoryPlayer; | |
| 8 | import net.minecraft.util.ResourceLocation; | |
| 9 | ||
| 10 | public class GuiEgg extends GuiContainer | |
| 11 | {
| |
| 12 | public final ResourceLocation texture = new ResourceLocation("fossils", "textures/gui/GuiDNASelector.png");
| |
| 13 | public TileEntityEgg tileEntityEgg; | |
| 14 | public int progress; | |
| 15 | ||
| 16 | public GuiEgg(InventoryPlayer inventoryPlayer, TileEntityEgg tileEntityEgg) | |
| 17 | {
| |
| 18 | super(new ContainerEgg(inventoryPlayer, tileEntityEgg)); | |
| 19 | this.tileEntityEgg = tileEntityEgg; | |
| 20 | } | |
| 21 | ||
| 22 | public void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) | |
| 23 | {
| |
| 24 | - | Minecraft.getMinecraft().getTextureManager().bindTexture(texture); |
| 24 | + | GL11.glColor4f(1F, 1F, 1F, 1F); |
| 25 | - | drawTexturedModalRect(guiLeft, guiTop, 0, 0, 176, 166); |
| 25 | + | |
| 26 | Minecraft.getMinecraft().getTextureManager().bindTexture(texture); | |
| 27 | int k = (this.width - this.xSize) / 2; | |
| 28 | - | drawTexturedModalRect(guiLeft + 76, guiTop + 35, 176, 0, progress, 18); |
| 28 | + | int l = (this.height - this.ySize) / 2; |
| 29 | this.drawTexturedModalRect(guiLeft, guiTop, 0, 0, 176, 166); | |
| 30 | ||
| 31 | progress = (int) tileEntityEgg.getProgressScaled(24); | |
| 32 | this.drawTexturedModalRect(guiLeft + 76, guiTop + 35, 176, 0, progress, 18); | |
| 33 | } | |
| 34 | } |