mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-27 03:27:56 +01:00
Fix placement of negative section biomes
This commit is contained in:
parent
b17c66e339
commit
9174742429
@ -94,7 +94,7 @@ public class AnvilLoader implements IChunkLoader {
|
||||
HashMap<String, Biome> biomeCache = new HashMap<>();
|
||||
|
||||
for (ChunkSection section : fileChunk.getSections().values()) {
|
||||
if(section.getEmpty()) continue;
|
||||
if (section.getEmpty()) continue;
|
||||
for (int y = 0; y < Chunk.CHUNK_SECTION_SIZE; y++) {
|
||||
for (int z = 0; z < Chunk.CHUNK_SIZE_Z; z++) {
|
||||
for (int x = 0; x < Chunk.CHUNK_SIZE_X; x++) {
|
||||
|
@ -87,8 +87,10 @@ public class DynamicChunk extends Chunk {
|
||||
public void setBiome(int x, int y, int z, @NotNull Biome biome) {
|
||||
this.chunkCache.invalidate();
|
||||
Section section = getSectionAt(y);
|
||||
section.biomePalette()
|
||||
.set(toChunkRelativeCoordinate(x) / 4, y / 4, toChunkRelativeCoordinate(z) / 4, biome.id());
|
||||
section.biomePalette().set(
|
||||
toChunkRelativeCoordinate(x) / 4,
|
||||
toChunkRelativeCoordinate(y) / 4,
|
||||
toChunkRelativeCoordinate(z) / 4, biome.id());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user