Various CPU and RAM improvements (#1015)

Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
boubou19andMartin Robertz authored and GitHub committed 2026-09-03 00:07:25 +03:00
1 parent 866b796411
commit 3f38e6f39b
9 files changed
+236 -54

No files matched your search

@@ -0,0 +1,26 @@
package codechicken.nei;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.mock;
import net.minecraft.client.renderer.InventoryEffectRenderer;
import org.junit.jupiter.api.Test;
public class NEIPotionGuiHandlerTest {
@Test
void preservesGapsBetweenPotionBoxes() {
assertTrue(NEIPotionGuiHandler.intersectsPotionEffects(131, 1, 100, 2, 33));
assertFalse(NEIPotionGuiHandler.intersectsPotionEffects(132, 1, 100, 2, 33));
}
@Test
void skipsConfigLookupOutsidePotionColumn() {
InventoryEffectRenderer gui = mock(InventoryEffectRenderer.class);
gui.guiLeft = 200;
assertFalse(new NEIPotionGuiHandler().hideItemPanelSlot(gui, 216, 100, 1, 1));
}
}