mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 11:24:11 +01:00
SPIGOT-6810: Improve / fix biome setting code
By: md_5 <git@md-5.net>
This commit is contained in:
parent
27643e5df2
commit
4b8394a81b
2 changed files with 3 additions and 3 deletions
|
@ -734,7 +734,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBiome(int x, int z, Biome bio) {
|
public void setBiome(int x, int z, Biome bio) {
|
||||||
for (int y = 0; y < getMaxHeight(); y++) {
|
for (int y = getMinHeight(); y < getMaxHeight(); y++) {
|
||||||
setBiome(x, y, z, bio);
|
setBiome(x, y, z, bio);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -746,7 +746,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
net.minecraft.world.level.chunk.Chunk chunk = this.world.getChunkAt(pos);
|
net.minecraft.world.level.chunk.Chunk chunk = this.world.getChunkAt(pos);
|
||||||
|
|
||||||
if (chunk != null) {
|
if (chunk != null) {
|
||||||
chunk.setBiome(x, y, z, bb);
|
chunk.setBiome(x >> 2, y >> 2, z >> 2, bb);
|
||||||
|
|
||||||
chunk.setUnsaved(true); // SPIGOT-2890
|
chunk.setUnsaved(true); // SPIGOT-2890
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBiome(int x, int z, Biome bio) {
|
public void setBiome(int x, int z, Biome bio) {
|
||||||
for (int y = 0; y < world.getWorld().getMaxHeight(); y += 4) {
|
for (int y = world.getWorld().getMinHeight(); y < world.getWorld().getMaxHeight(); y += 4) {
|
||||||
setBiome(x, y, z, bio);
|
setBiome(x, y, z, bio);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue