mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-12 03:24:14 +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 {
|
tasks.named('test').configure {
|
||||||
maxHeapSize = '1g'
|
maxHeapSize = '1g'
|
||||||
maxParallelForks = coreTestForks
|
maxParallelForks = coreTestForks
|
||||||
|
jvmArgs('-XX:+ExitOnOutOfMemoryError')
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
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.RETURNS_DEEP_STUBS;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
import static org.mockito.Mockito.withSettings;
|
||||||
|
|
||||||
public class IrisPerfectionModifierColumnTest {
|
public class IrisPerfectionModifierColumnTest {
|
||||||
@Rule
|
@Rule
|
||||||
@@ -200,7 +201,7 @@ public class IrisPerfectionModifierColumnTest {
|
|||||||
if (existing != null) {
|
if (existing != null) {
|
||||||
return existing;
|
return existing;
|
||||||
}
|
}
|
||||||
NativeBlockState block = mock(NativeBlockState.class);
|
NativeBlockState block = mock(NativeBlockState.class, withSettings().stubOnly());
|
||||||
states.put(key, block);
|
states.put(key, block);
|
||||||
when(block.key()).thenReturn(key);
|
when(block.key()).thenReturn(key);
|
||||||
when(block.isAir()).thenReturn(key.equals("minecraft:air"));
|
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.isWaterLogged()).thenReturn(key.contains("waterlogged=true"));
|
||||||
when(block.isDecorant()).thenReturn(key.equals("minecraft:poppy") || key.startsWith("minecraft:tall_grass"));
|
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()));
|
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(block.nativeHandle()).thenReturn(handle);
|
||||||
when(handle.isFaceSturdy(any(), any())).thenReturn(key.equals("minecraft:stone"));
|
when(handle.isFaceSturdy(any(), any())).thenReturn(key.equals("minecraft:stone"));
|
||||||
when(block.withProperty(anyString(), anyString())).thenAnswer(call -> {
|
when(block.withProperty(anyString(), anyString())).thenAnswer(call -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user