Advertisement
Guest User

Untitled

a guest
Oct 31st, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. import org.lwjgl.opengl.GL11;
  2.  
  3. import com.khufu.stonetitans.config.Preferences;
  4. import com.khufu.stonetitans.entity.EntityClone;
  5. import com.khufu.stonetitans.gui.container.ContainerClone;
  6. import com.khufu.stonetitans.inventory.InventoryClone;
  7.  
  8. import net.minecraft.client.gui.inventory.GuiContainer;
  9. import net.minecraft.entity.player.EntityPlayer;
  10. import net.minecraft.entity.player.InventoryPlayer;
  11. import net.minecraft.util.ResourceLocation;
  12.  
  13. public class GuiClone extends GuiContainer {
  14.  
  15. private static final ResourceLocation texture = new ResourceLocation(Preferences.modid, "textures/gui/clone_gui.png");
  16. /** window height is calculated with these values; the more rows, the heigher */
  17.  
  18. private int inventoryRows = 3;
  19. int xSize = 198;
  20. int ySize = 182;
  21.  
  22. public GuiClone(InventoryPlayer inventory, InventoryClone c_inventory, EntityPlayer thePlayer, EntityClone theClone) {
  23. super(new ContainerClone(inventory, c_inventory, thePlayer, theClone));
  24.  
  25. }
  26.  
  27. @Override
  28. public void initGui() {
  29. super.initGui();
  30. this.mc.thePlayer.openContainer = this.inventorySlots;
  31. this.guiLeft = (this.width - this.xSize) / 2;
  32. this.guiTop = (this.height - this.ySize) / 2;
  33. }
  34.  
  35. @Override
  36. protected void drawGuiContainerForegroundLayer(int par1, int par2) {
  37. }
  38.  
  39. @Override
  40. protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
  41.  
  42. GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  43. this.mc.getTextureManager().bindTexture(texture);
  44. int k = (this.width - this.xSize) / 2;
  45. int l = (this.height - this.ySize) / 2;
  46.  
  47. this.drawTexturedModalRect(k, l, 0, 0, this.xSize, 182);
  48.  
  49. drawVerticalLine(this.guiLeft, this.guiTop + this.ySize, this.guiTop, -6396534);
  50. drawVerticalLine(this.guiLeft + this.xSize, this.guiTop + this.ySize, this.guiTop, -6396534);
  51. drawHorizontalLine(this.guiLeft, this.guiLeft + this.xSize, this.guiTop, -6396534);
  52. drawHorizontalLine(this.guiLeft, this.guiLeft + this.xSize, this.guiTop + this.ySize, -6396534);
  53.  
  54. }
  55.  
  56. // GUI SIZE 197 x 182
  57. // default 176x166
  58.  
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement