mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-19 20:00:00 +00:00
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
35 lines
1.2 KiB
Java
35 lines
1.2 KiB
Java
package codechicken.nei.api;
|
|
|
|
import codechicken.nei.NEIChestGuiHandler;
|
|
import codechicken.nei.NEICreativeGuiHandler;
|
|
import codechicken.nei.NEIDummySlotHandler;
|
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
|
import net.minecraft.client.gui.inventory.GuiContainerCreative;
|
|
|
|
import java.util.HashSet;
|
|
import java.util.Iterator;
|
|
import java.util.LinkedList;
|
|
|
|
public class GuiInfo
|
|
{
|
|
public static LinkedList<INEIGuiHandler> guiHandlers = new LinkedList<INEIGuiHandler>();
|
|
public static HashSet<Class<? extends GuiContainer>> customSlotGuis = new HashSet<Class<? extends GuiContainer>>();
|
|
|
|
public static void load() {
|
|
API.registerNEIGuiHandler(new NEICreativeGuiHandler());
|
|
API.registerNEIGuiHandler(new NEIChestGuiHandler());
|
|
API.registerNEIGuiHandler(new NEIDummySlotHandler());
|
|
customSlotGuis.add(GuiContainerCreative.class);
|
|
}
|
|
|
|
public static void clearGuiHandlers() {
|
|
for (Iterator<INEIGuiHandler> iterator = guiHandlers.iterator(); iterator.hasNext(); )
|
|
if (iterator.next() instanceof GuiContainer)
|
|
iterator.remove();
|
|
}
|
|
|
|
public static boolean hasCustomSlots(GuiContainer gui) {
|
|
return customSlotGuis.contains(gui.getClass());
|
|
}
|
|
}
|