Archived
0

мелкий рефакторинг + указываем точно где локальные, а где глобальные координаты

This commit is contained in:
2018-12-25 14:55:14 +03:00
parent 969ecdac36
commit 48de3a5049
12 changed files with 168 additions and 71 deletions

View File

@@ -207,7 +207,7 @@ public class ChunkDataPacket implements SCPacket {
}
if (!biomeFinally) {
biomes.writeByte(chunkSection.getBiome(x, z).getId());
biomes.writeByte(chunk.getBiome(x, z).getId());
if (x == 15 && z == 15) {
biomeFinally = true;
}

View File

@@ -41,7 +41,6 @@ class ChunkdataPacketTest {
if (y <= 3) return 0;
else return 15;
});
when(chunkSection.getBiome(anyInt(), anyInt())).thenReturn(Biome.PLAINS);
when(chunkSection.getBlock(anyInt(), anyInt(), anyInt())).thenAnswer(invocation -> {
Object[] args = invocation.getArguments();
int x = (int) args[0];
@@ -57,7 +56,7 @@ class ChunkdataPacketTest {
});
world = mock(World.class);
when(world.getWorldType()).thenReturn(WorldType.FLAT);
when(world.getType()).thenReturn(WorldType.FLAT);
when(world.getChunk(anyInt(), anyInt())).thenAnswer(invocation -> {
Object[] args = invocation.getArguments();