обновление теста anvil chunk
проверяем следующий фрагмент чанка
This commit is contained in:
@@ -63,7 +63,8 @@ class RegionTest {
|
|||||||
void getChunkSection() {
|
void getChunkSection() {
|
||||||
final Chunk chunk = region.getChunk(0, 0);
|
final Chunk chunk = region.getChunk(0, 0);
|
||||||
assertNotNull(chunk);
|
assertNotNull(chunk);
|
||||||
final ChunkSection chunkSection = chunk.getChunkSection(0);
|
|
||||||
|
ChunkSection chunkSection = chunk.getChunkSection(0);
|
||||||
assertNotNull(chunkSection);
|
assertNotNull(chunkSection);
|
||||||
|
|
||||||
for (int y = 0; y < 16; y++) {
|
for (int y = 0; y < 16; y++) {
|
||||||
@@ -88,5 +89,29 @@ class RegionTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
chunkSection = chunk.getChunkSection(1);
|
||||||
|
assertNotNull(chunkSection);
|
||||||
|
|
||||||
|
for (int y = 0; y < 16; y++) {
|
||||||
|
for (int x = 0; x < 16; x++) {
|
||||||
|
for (int z = 0; z < 16; z++) {
|
||||||
|
Block block = chunkSection.getBlock(x, y, z);
|
||||||
|
if (x == 0 && z == 0) {
|
||||||
|
assertEquals(BlockType.STONE, block.getBlockType(), String.format("coords: %d %d %d", x, y, z));
|
||||||
|
} else if (x == 15 && z == 0) {
|
||||||
|
assertEquals(BlockType.GRANITE, block.getBlockType(), String.format("coords: %d %d %d", x, y, z));
|
||||||
|
} else if (x == 15 && z == 15) {
|
||||||
|
assertEquals(BlockType.DIORITE, block.getBlockType(), String.format("coords: %d %d %d", x, y, z));
|
||||||
|
} else if (x == 0 && z == 15) {
|
||||||
|
assertEquals(BlockType.ANDESITE, block.getBlockType(), String.format("coords: %d %d %d", x, y, z));
|
||||||
|
} else if (x == 0 || x == 15 || z == 0 || z == 15) {
|
||||||
|
assertEquals(BlockType.DIAMOND_ORE, block.getBlockType(), String.format("coords: %d %d %d", x, y, z));
|
||||||
|
} else {
|
||||||
|
assertEquals(BlockType.AIR, block.getBlockType(), String.format("coords: %d %d %d", x, y, z));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user