mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-17 19:15:13 +00:00
Various CPU and RAM improvements (#1015)
Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
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));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user