Advertisement
Guest User

GuiClass

a guest
Aug 18th, 2017
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. package kyros.testMod.gui;
  2.  
  3. import org.lwjgl.opengl.GL11;
  4.  
  5. import kyros.testMod.testMod;
  6. import kyros.testMod.container.ContainerCCrafter;
  7. import net.minecraft.client.gui.inventory.GuiContainer;
  8. import net.minecraft.client.resources.I18n;
  9. import net.minecraft.entity.player.InventoryPlayer;
  10. import net.minecraft.inventory.Container;
  11. import net.minecraft.util.ResourceLocation;
  12. import net.minecraft.world.World;
  13.  
  14. public class guiCCrafter extends GuiContainer {
  15.  
  16. private ResourceLocation CGui = new ResourceLocation(testMod.modid + ":" + "textures/gui/container/Circuit_Crafter.png");
  17.  
  18. public guiCCrafter(InventoryPlayer invPlayer, World world, int x, int y, int z) {
  19. super(new ContainerCCrafter(invPlayer, world, x, y, z));
  20.  
  21. }
  22.  
  23. public void drawGiuContainerForegroundLayer(int i, int j) {
  24. this.fontRendererObj.drawString(I18n.format("Circuit Crafter", new Object[0]), 28, 6, 4210752);
  25. this.fontRendererObj.drawString(I18n.format("Inventory", new Object[0]), 8, 94, 4210752);
  26.  
  27. }
  28.  
  29.  
  30. @Override
  31. protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) {
  32.  
  33. GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  34.  
  35. this.mc.getTextureManager().bindTexture(CGui);
  36.  
  37. int k = (this.width - this.xSize) / 2;
  38. int l = (this.height - this.ySize) / 2;
  39. this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
  40.  
  41. }
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement