mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-25 14:34:54 +00:00
Cleaned and generalised item loading/searching
Reimplemented subsets Added regex searching Fixed format error on delete all Fixed GuiButton handling clicks before NEI widgets could override Re-Implemented banned blocks implementation Added brewing recipes again note test obf ASM beacons Fixed some calls being intercepted by item panel when mouse was over a gui element Fixed crash on closing potion window with escape Disabled fast transfer, scrolling, and drag 'n' drop in creative Added item panel sorting Removed TMI uninstaller Fixed /give command Updated to 1.7.10
This commit is contained in:
1 parent
3c9ebc6961
commit
3c84527806
67 files changed
+3251
-2319
No files matched your search
@@ -0,0 +1,32 @@
|
||||
package codechicken.nei.config;
|
||||
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
public class OptionOpenGui extends OptionButton
|
||||
{
|
||||
public final Class<? extends GuiScreen> guiClass;
|
||||
public OptionOpenGui(String name, Class<? extends GuiScreen> guiClass) {
|
||||
super(name, null, name, null);
|
||||
this.guiClass = guiClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void copyGlobals() {
|
||||
copyGlobal(name, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onClick(int button) {
|
||||
if (defaulting())
|
||||
return false;
|
||||
|
||||
try {
|
||||
Minecraft.getMinecraft().displayGuiScreen(guiClass.getConstructor(Option.class).newInstance(this));
|
||||
} catch (Exception e) {
|
||||
NEIClientConfig.logger.error("Unable to open gui class: "+guiClass.getName()+" from option "+fullName(), e);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user