Package thaumic.tinkerer.client.gui.button

Examples of thaumic.tinkerer.client.gui.button.GuiButtonEnchantment


    for (int i = 0; i < 16; i++) {
      int z = -24;
      if (i > 7 || (enchantButtons[8] == null || !enchantButtons[8].enabled)) {
        z = 0;
      }
      GuiButtonEnchantment button = new GuiButtonEnchantment(this, 1 + i, x + 34 + ((i) % 8) * 16, y + 54 + z);
      enchantButtons[i] = button;
      buttonList.add(button);
    }

    asignEnchantButtons();

    int i = 0;
    for (Integer enchant : enchanter.enchantments) {
      GuiButtonEnchantment button = new GuiButtonFramedEnchantment(this, 17 + i * 3, x + xSize + 4, y + i * 26);
      button.enchant = Enchantment.enchantmentsList[enchant];
      buttonList.add(button);
      buttonList.add(new GuiButtonEnchanterLevel(17 + i * 3 + 1, x + xSize + 24, y + i * 26 - 4, false));
      buttonList.add(new GuiButtonEnchanterLevel(17 + i * 3 + 2, x + xSize + 31, y + i * 26 - 4, true));
      ++i;
View Full Code Here


  @Override
  protected void actionPerformed(GuiButton par1GuiButton) {
    if (par1GuiButton.id == 0) {
      ThaumicTinkerer.netHandler.sendToServer(new PacketEnchanterStartWorking(enchanter));
    } else if (par1GuiButton.id <= 16) {
      GuiButtonEnchantment button = enchantButtons[par1GuiButton.id - 1];
      if (button != null && button.enchant != null)
        ThaumicTinkerer.netHandler.sendToServer(new PacketEnchanterAddEnchant(enchanter, button.enchant.effectId, 0));
    } else {
      int type = (par1GuiButton.id - 17) % 3;
      int index = (par1GuiButton.id - 17) / 3;
View Full Code Here

TOP

Related Classes of thaumic.tinkerer.client.gui.button.GuiButtonEnchantment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.