mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-30 23:47:37 +02: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<>();
|
HashMap<String, Biome> biomeCache = new HashMap<>();
|
||||||
|
|
||||||
for (ChunkSection section : fileChunk.getSections().values()) {
|
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 y = 0; y < Chunk.CHUNK_SECTION_SIZE; y++) {
|
||||||
for (int z = 0; z < Chunk.CHUNK_SIZE_Z; z++) {
|
for (int z = 0; z < Chunk.CHUNK_SIZE_Z; z++) {
|
||||||
for (int x = 0; x < Chunk.CHUNK_SIZE_X; x++) {
|
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) {
|
public void setBiome(int x, int y, int z, @NotNull Biome biome) {
|
||||||
this.chunkCache.invalidate();
|
this.chunkCache.invalidate();
|
||||||
Section section = getSectionAt(y);
|
Section section = getSectionAt(y);
|
||||||
section.biomePalette()
|
section.biomePalette().set(
|
||||||
.set(toChunkRelativeCoordinate(x) / 4, y / 4, toChunkRelativeCoordinate(z) / 4, biome.id());
|
toChunkRelativeCoordinate(x) / 4,
|
||||||
|
toChunkRelativeCoordinate(y) / 4,
|
||||||
|
toChunkRelativeCoordinate(z) / 4, biome.id());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user