Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.81 KB | None | 0 0
  1. package net.theviolentsquirrels.questsystem.gui;
  2.  
  3. import net.minecraft.client.renderer.GlStateManager;
  4. import net.minecraft.client.resources.I18n;
  5. import net.minecraft.entity.player.InventoryPlayer;
  6. import net.minecraft.util.ResourceLocation;
  7. import net.minecraft.world.World;
  8. import net.theviolentsquirrels.questsystem.Reference;
  9. import net.theviolentsquirrels.questsystem.inventory.ContainerSieve;
  10.  
  11. public class                GuiSieve extends ModGui {
  12.     private static final    ResourceLocation texture = new ResourceLocation(Reference.MODID, "textures/gui/sieve.png");
  13.  
  14.     public                  GuiSieve(InventoryPlayer playerInventory, World worldIn) {
  15.         super (new ContainerSieve(playerInventory, worldIn));
  16.     }
  17.  
  18.     /**
  19.      * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
  20.      * window resizes, the buttonList is cleared beforehand.
  21.      */
  22.     @Override
  23.     public void initGui() {
  24.         super.initGui();
  25.     }
  26.  
  27.     @Override
  28.     protected void          drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
  29.         GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
  30.         this.mc.getTextureManager().bindTexture(texture);
  31.         this.drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
  32.     }
  33.  
  34.     @Override
  35.     protected void          drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
  36.         String              sifting;
  37.         int                 result;
  38.  
  39.         sifting = I18n.format("container.sifting");
  40.         result = this.xSize / 2 - this.fontRendererObj.getStringWidth(sifting) / 2;
  41.         this.fontRendererObj.drawString(sifting, result, 6, 4210752);
  42.         this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement