Add option to cache item grid rendering (#250)

* Add option to cache item grid rendering

* Fix highlighting for bookmarks

* Tweak GL state slightly

* Fix focus box being in the wrong place

* Fix flickering for one frame when searching

* Prevent potion effects from rendering over NEI slots

Fixes #231

* Invalidate the buffer if `invalidSlotMap` changes

* Clean up imports

* Delay blitting until after the buffer is refreshed

but still avoid waiting for the next frame

* Refactor slot focus logic to handle highlighting multiple slots

* Refresh grid when sorting bookmarks

* Minor code cleanup, fix some more hovering issues

* Remove `slotNeedsOutline`, it is now redundant

* Remove focus parameter from drawItem
This commit is contained in:
embeddedt authored and GitHub committed 2022-05-27 13:42:41 +02:00
1 parent 72d44fd711
commit 8f7d698e7d
7 files changed
+192 -41

No files matched your search

@@ -4,6 +4,7 @@ import codechicken.lib.vec.Rectangle4i;
import codechicken.nei.NEIChestGuiHandler;
import codechicken.nei.NEICreativeGuiHandler;
import codechicken.nei.NEIDummySlotHandler;
import codechicken.nei.NEIPotionGuiHandler;
import codechicken.nei.recipe.GuiRecipeCatalyst;
import codechicken.nei.recipe.SearchInputDropHandler;
import codechicken.nei.recipe.FillFluidContainerHandler;
@@ -33,6 +34,7 @@ public class GuiInfo {
API.registerNEIGuiHandler(new SearchInputDropHandler());
API.registerNEIGuiHandler(new FillFluidContainerHandler());
API.registerNEIGuiHandler(new CheatItemHandler());
API.registerNEIGuiHandler(new NEIPotionGuiHandler());
customSlotGuis.add(GuiContainerCreative.class);
}