Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Put all three files in the jar
- Gui File
- ----------------------------------
- private static TestEnumOptions relevantOptions[];
- private TestGameSettings options;
- public GuiWhatever(TestGameSettings settings)
- {
- options = settings;
- }
- TestEnumOptions aoptions[] = relevantOptions;
- int len = aoptions.length;
- for (int l = 0; l < len; l++)
- {
- TestEnumOptions option = aoptions[l];
- controlList.add(new TestGuiSlider(option.returnEnumOrdinal(), width / 2 - 100, height / 2 - 8, option, options.getKeyBinding(option), options.getOptionFloatValue(option), options));
- }
- static
- {
- relevantOptions = (new TestEnumOptions[]
- {
- TestEnumOptions.Test
- });
- }
- ----------------------
- Where you open the gui
- ----------------------
- EntityPlayer player = ModLoader.getMinecraftInstance().thePlayer;
- TestGameSettings set = new TestGameSettings(ModLoader.getMinecraftInstance());
- ModLoader.openGUI(player, new GuiWhatever(set));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement