мелкий рефакторинг + указываем точно где локальные, а где глобальные координаты
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user