Advertisement
Raevox

GuiVendingMachine

Feb 22nd, 2014
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.64 KB | None | 0 0
  1. import org.lwjgl.opengl.GL11;
  2. import com.skcraft.creditvendor.tileentity.TileEntityVendingMachine;
  3. import net.minecraft.client.Minecraft;
  4. import net.minecraft.client.gui.inventory.GuiContainer;
  5. import net.minecraft.entity.player.InventoryPlayer;
  6. import net.minecraft.util.ResourceLocation;
  7.  
  8. public class GuiVendingMachine extends GuiContainer {
  9.     public static ResourceLocation texture = new ResourceLocation( "creditvendor", "textures/gui/vendingMachineItems.png" );
  10.     public static TileEntityVendingMachine vendingMachine;
  11.  
  12.     public GuiVendingMachine( InventoryPlayer inventoryPlayer, TileEntityVendingMachine vendingMachine ) {
  13.         super( new ContainerVendingMachine( inventoryPlayer, vendingMachine ) );
  14.         this.vendingMachine = vendingMachine;
  15.         xSize = 195;
  16.         ySize = 158;
  17.     }
  18.  
  19.     @Override
  20.     protected void drawGuiContainerBackgroundLayer( float f, int x, int y ) {
  21.         GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
  22.         GL11.glDisable( GL11.GL_LIGHTING );
  23.         GL11.glDisable( GL11.GL_FOG );
  24.  
  25.         Minecraft.getMinecraft().getTextureManager().bindTexture( texture );
  26.         drawTexturedModalRect( guiLeft, guiTop, 0, 0, xSize, ySize );
  27. //        drawTexturedModalRect( guiLeft + 84, guiTop + 19, 13, 158, 13, 14 );
  28. //        drawTexturedModalRect( guiLeft + 78, guiTop + 55, 13, 158, 13, 14 );
  29.     }
  30.  
  31.     @Override
  32.     protected void drawGuiContainerForegroundLayer( int par1, int par2 ) {
  33.         fontRenderer.drawString("Selling", 7, 5, 0x404040);
  34.         fontRenderer.drawString("Buying", 135, 5, 0x404040);
  35.     }
  36.  
  37.     @Override
  38.     public void initGui() {
  39.         super.initGui();
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement