mirror of
https://github.com/GTNewHorizons/FindIt.git
synced 2026-11-20 08:29:34 +00:00
Fix inventory slots not being highlighted (#9)
This commit is contained in:
1 parent
bdf41e7ed8
commit
1f4c5b0058
2 files changed
+13
-7
No files matched your search
@@ -1,6 +1,5 @@
|
||||
package com.gtnh.findit;
|
||||
|
||||
import codechicken.nei.guihook.GuiContainerManager;
|
||||
import com.gtnh.findit.service.blockfinder.BlockFindService;
|
||||
import com.gtnh.findit.service.blockfinder.ClientBlockFindService;
|
||||
import com.gtnh.findit.service.cooldown.SearchCooldownService;
|
||||
@@ -48,11 +47,6 @@ public class FindIt {
|
||||
|
||||
@Mod.EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
if (event.getSide() == Side.CLIENT && FindIt.isExtraUtilitiesLoaded()) {
|
||||
GuiContainerManager.inputHandlers.removeIf((inputHandler) ->
|
||||
inputHandler.getClass().getName().equals("com.rwtema.extrautils.nei.ping.NEIPing")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public static SearchCooldownService getCooldownService() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.gtnh.findit.service.itemfinder;
|
||||
|
||||
import codechicken.nei.NEIClientUtils;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.event.NEIConfigsLoadedEvent;
|
||||
import codechicken.nei.guihook.GuiContainerManager;
|
||||
import com.gtnh.findit.FindIt;
|
||||
import com.gtnh.findit.FindItNetwork;
|
||||
@@ -38,6 +38,7 @@ public class ClientItemFindService extends ItemFindService {
|
||||
GuiContainerManager.addInputHandler(new ItemFindInputHandler());
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new GuiListener());
|
||||
MinecraftForge.EVENT_BUS.register(new NEIEventListener());
|
||||
FMLCommonHandler.instance().bus().register(new TickListener());
|
||||
}
|
||||
|
||||
@@ -141,6 +142,17 @@ public class ClientItemFindService extends ItemFindService {
|
||||
}
|
||||
}
|
||||
|
||||
public static class NEIEventListener {
|
||||
@SubscribeEvent
|
||||
public void onNEIConfigsLoaded(NEIConfigsLoadedEvent event) {
|
||||
if (FindIt.isExtraUtilitiesLoaded()) {
|
||||
GuiContainerManager.inputHandlers.removeIf((inputHandler) ->
|
||||
inputHandler.getClass().getName().equals("com.rwtema.extrautils.nei.ping.NEIPing")
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ClientItemFindService getInstance() {
|
||||
return (ClientItemFindService) FindIt.getItemFindService();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user