Exemplo n.º 1
0
 protected void drawGuiContainerBackgroundLayer(
     float p_146976_1_, int p_146976_2_, int p_146976_3_) {
   GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
   this.mc
       .getTextureManager()
       .bindTexture(
           new ResourceLocation(
               "securitycraft:textures/gui/container/customize"
                   + tileEntity.getNumberOfCustomizableOptions()
                   + ".png"));
   int k = (this.width - this.xSize) / 2;
   int l = (this.height - this.ySize) / 2;
   this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
 }
Exemplo n.º 2
0
  public void initGui() {
    super.initGui();

    for (int i = 0; i < tileEntity.getNumberOfCustomizableOptions(); i++) {
      GuiPictureButton button =
          new GuiPictureButton(
              i,
              guiLeft + 130,
              (guiTop + 10) + (i * 25),
              20,
              20,
              "",
              itemRender,
              new ItemStack(ModuleUtils.getItemFromModule(tileEntity.getCustomizableOptions()[i])),
              "");
      this.buttonList.add(button);
      this.hoverCheckers[i] = new HoverChecker(button, 20);
    }
  }