Guest User

GuiEgg.java

a guest
Apr 12th, 2014
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.11 KB | None | 0 0
  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);
  25.         drawTexturedModalRect(guiLeft, guiTop, 0, 0, 176, 166);
  26.  
  27.         progress = (int) tileEntityEgg.getProgressScaled(24);
  28.         drawTexturedModalRect(guiLeft + 76, guiTop + 35, 176, 0, progress, 18);
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment