mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-11 19:14:11 +00:00
Memory patch
This commit is contained in:
@@ -179,6 +179,7 @@ int coreTestForks = Math.max(1, Integer.parseInt(providers.gradleProperty('testF
|
||||
tasks.named('test').configure {
|
||||
maxHeapSize = '1g'
|
||||
maxParallelForks = coreTestForks
|
||||
jvmArgs('-XX:+ExitOnOutOfMemoryError')
|
||||
}
|
||||
|
||||
java {
|
||||
|
||||
+3
-2
@@ -30,6 +30,7 @@ import static org.mockito.ArgumentMatchers.anyString;
|
||||
import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
import static org.mockito.Mockito.withSettings;
|
||||
|
||||
public class IrisPerfectionModifierColumnTest {
|
||||
@Rule
|
||||
@@ -200,7 +201,7 @@ public class IrisPerfectionModifierColumnTest {
|
||||
if (existing != null) {
|
||||
return existing;
|
||||
}
|
||||
NativeBlockState block = mock(NativeBlockState.class);
|
||||
NativeBlockState block = mock(NativeBlockState.class, withSettings().stubOnly());
|
||||
states.put(key, block);
|
||||
when(block.key()).thenReturn(key);
|
||||
when(block.isAir()).thenReturn(key.equals("minecraft:air"));
|
||||
@@ -209,7 +210,7 @@ public class IrisPerfectionModifierColumnTest {
|
||||
when(block.isWaterLogged()).thenReturn(key.contains("waterlogged=true"));
|
||||
when(block.isDecorant()).thenReturn(key.equals("minecraft:poppy") || key.startsWith("minecraft:tall_grass"));
|
||||
when(block.canPlaceOnto(any())).thenAnswer(call -> "minecraft:tall_grass[half=lower]".equals(call.<NativeBlockState>getArgument(0).key()));
|
||||
BlockData handle = mock(BlockData.class);
|
||||
BlockData handle = mock(BlockData.class, withSettings().stubOnly());
|
||||
when(block.nativeHandle()).thenReturn(handle);
|
||||
when(handle.isFaceSturdy(any(), any())).thenReturn(key.equals("minecraft:stone"));
|
||||
when(block.withProperty(anyString(), anyString())).thenAnswer(call -> {
|
||||
|
||||
Reference in New Issue
Block a user