majgenrelativity

Untitled

Jun 2nd, 2015
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. @SideOnly(Side.CLIENT)
  2. public class IonCreaterGUI extends GuiContainer {
  3.  
  4. private ResourceLocation backgroundimage = new ResourceLocation("forcelasers:textures/gui/ion_creater_gui.png");
  5. private int xSize = 176, ySize = 183;
  6.  
  7. public IonCreaterGUI(InventoryPlayer playerInventory, ion_Creater_Tile_Entity tileEntity) {
  8. super(new IonCreaterContainer(playerInventory, tileEntity));
  9.  
  10. }
  11.  
  12. //Draw the background
  13. @Override
  14. public void drawGuiContainerBackgroundLayer(float renderPartialTicks, int mouseX, int mouseY){
  15. this.mc.getTextureManager().bindTexture(backgroundimage);
  16. int x = (this.width - xSize)/2;
  17. int y = (this.height - ySize)/2;
  18. drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
  19. }
  20. //Draw the text
  21. @Override
  22. public void drawGuiContainerForegroundLayer(int x, int y){
  23. this.fontRendererObj.drawString(StatCollector.translateToLocal("container." + MainFile.MODID + ":ioncreater.name"), 8, -3, 4210752);
  24. this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, 78, 4210752);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment