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;