mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-25 21:40:05 +00:00
Take chunk uses through pins
- Every getChunk(..).use() site calls Mantle.useChunk, which cannot fail because a save closed the chunk in between - Covered-chunk cleanup, custom block and static object layers take their chunk through useChunk - Discovered flag writes go through Mantle.flag instead of an unpinned chunk - Test mantles stub useChunk the way the real one behaves
This commit is contained in:
1 parent
8899c9e3f9
commit
59165df427
42 files changed
+94
-86
No files matched your search
+1
-2
@@ -70,8 +70,7 @@ public class ModdedSavedBiomeConsumersTest {
|
||||
when(engine.getWorld()).thenReturn(mock(IrisWorld.class));
|
||||
when(engineMantle.getMantle()).thenReturn(mantle);
|
||||
when(mantle.isChunkLoaded(2, -1)).thenReturn(true);
|
||||
when(mantle.getChunk(2, -1)).thenReturn(chunk);
|
||||
when(chunk.use()).thenReturn(chunk);
|
||||
when(mantle.useChunk(2, -1)).thenReturn(chunk);
|
||||
BiomeEnvironment environment = environment();
|
||||
when(engine.getSurfaceBiomeEnvironment(40, -8))
|
||||
.thenThrow(new SavedBiomeUnavailableException("Loading", true))
|
||||
|
||||
Reference in new issue
Block a user