2014-04-29 10:54:20 +10:00
|
|
|
package codechicken.nei.config;
|
|
|
|
|
|
|
|
|
|
import net.minecraft.client.renderer.RenderHelper;
|
|
|
|
|
import net.minecraft.enchantment.Enchantment;
|
|
|
|
|
import net.minecraft.init.Blocks;
|
|
|
|
|
import net.minecraft.init.Items;
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
2023-09-25 00:35:24 +02:00
|
|
|
|
2014-04-29 10:54:20 +10:00
|
|
|
import org.lwjgl.opengl.GL11;
|
|
|
|
|
import org.lwjgl.opengl.GL12;
|
|
|
|
|
|
2023-09-25 00:35:24 +02:00
|
|
|
import codechicken.nei.Image;
|
|
|
|
|
import codechicken.nei.LayoutManager;
|
|
|
|
|
import codechicken.nei.guihook.GuiContainerManager;
|
|
|
|
|
|
2022-06-24 12:32:13 +01:00
|
|
|
public class OptionUtilities extends OptionStringSet {
|
2023-01-28 17:55:51 -08:00
|
|
|
|
2022-06-24 12:32:13 +01:00
|
|
|
public OptionUtilities(String name) {
|
2014-04-29 10:54:20 +10:00
|
|
|
super(name);
|
|
|
|
|
options.add("time");
|
|
|
|
|
options.add("rain");
|
|
|
|
|
options.add("heal");
|
|
|
|
|
options.add("delete");
|
|
|
|
|
options.add("magnet");
|
|
|
|
|
options.add("gamemode");
|
|
|
|
|
options.add("enchant");
|
|
|
|
|
options.add("potion");
|
|
|
|
|
options.add("item");
|
|
|
|
|
groups.put("gamemode", "creative");
|
|
|
|
|
groups.put("gamemode", "creative+");
|
|
|
|
|
groups.put("gamemode", "adventure");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
2022-06-24 12:32:13 +01:00
|
|
|
public void drawIcons() {
|
2014-04-29 10:54:20 +10:00
|
|
|
int x = buttonX();
|
2022-06-24 12:32:13 +01:00
|
|
|
LayoutManager.drawIcon(x + 4, 4, new Image(120, 24, 12, 12));
|
|
|
|
|
x += 24;
|
|
|
|
|
LayoutManager.drawIcon(x + 4, 4, new Image(120, 12, 12, 12));
|
|
|
|
|
x += 24;
|
|
|
|
|
LayoutManager.drawIcon(x + 4, 4, new Image(168, 24, 12, 12));
|
|
|
|
|
x += 24;
|
|
|
|
|
LayoutManager.drawIcon(x + 4, 4, new Image(144, 12, 12, 12));
|
|
|
|
|
x += 24;
|
|
|
|
|
LayoutManager.drawIcon(x + 4, 4, new Image(180, 24, 12, 12));
|
|
|
|
|
x += 24;
|
|
|
|
|
LayoutManager.drawIcon(x + 4, 4, new Image(132, 12, 12, 12));
|
|
|
|
|
x += 24;
|
2024-10-13 23:00:06 +03:00
|
|
|
|
2025-10-02 12:53:18 +02:00
|
|
|
GL11.glPushAttrib(GL11.GL_ENABLE_BIT | GL11.GL_COLOR_BUFFER_BIT | GL11.GL_LIGHTING_BIT);
|
2014-04-29 10:54:20 +10:00
|
|
|
RenderHelper.enableGUIStandardItemLighting();
|
|
|
|
|
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
|
|
|
|
ItemStack sword = new ItemStack(Items.diamond_sword);
|
|
|
|
|
sword.addEnchantment(Enchantment.sharpness, 1);
|
2022-06-24 12:32:13 +01:00
|
|
|
GuiContainerManager.drawItem(x + 2, 2, sword);
|
|
|
|
|
x += 24;
|
|
|
|
|
GuiContainerManager.drawItem(x + 2, 2, new ItemStack(Items.potionitem));
|
|
|
|
|
x += 24;
|
|
|
|
|
GuiContainerManager.drawItem(x + 2, 2, new ItemStack(Blocks.stone));
|
2024-10-13 23:00:06 +03:00
|
|
|
GL11.glPopAttrib();
|
2014-04-29 10:54:20 +10:00
|
|
|
}
|
|
|
|
|
}
|