mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-23 10:45:54 +01:00
Comments in biome updating
This commit is contained in:
parent
cf5bc5a12c
commit
39d129e85f
@ -48,7 +48,7 @@ public class BiomeManager {
|
||||
ChunkLoader.startChunkLoadingPerChunk(island, IslandWorld.Normal, skyblock.isPaperAsync(), (asyncChunk, syncChunk) -> {
|
||||
Chunk chunk = asyncChunk.join();
|
||||
if(ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)){ // TODO Should be 1.15 but it works fine there
|
||||
setChunkBiome3D(island, biome, chunk);
|
||||
setChunkBiome2D(island, biome, chunk); // 2D for the moment
|
||||
} else {
|
||||
setChunkBiome2D(island, biome, chunk);
|
||||
}
|
||||
@ -63,7 +63,7 @@ public class BiomeManager {
|
||||
Bukkit.getScheduler().runTaskAsynchronously(skyblock, () -> {
|
||||
for(Chunk chunk : syncChunks){
|
||||
if(ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)){ // TODO Should be 1.15 but it works fine there
|
||||
setChunkBiome3D(island, biome, chunk);
|
||||
setChunkBiome2D(island, biome, chunk); // 2D for the moment
|
||||
} else {
|
||||
setChunkBiome2D(island, biome, chunk);
|
||||
}
|
||||
@ -89,14 +89,15 @@ public class BiomeManager {
|
||||
updateBiomePacket(island, chunk);
|
||||
}
|
||||
|
||||
// Do not use - Too laggy
|
||||
private void setChunkBiome3D(Island island, Biome biome, Chunk chunk) {
|
||||
for(int x = 0; x < 16; x++){
|
||||
for(int z = 0; z < 16; z++){
|
||||
//for(int y = 0; y<256; y++){
|
||||
if(!chunk.getWorld().getBiome(x, 0, z).equals(biome)){
|
||||
chunk.getWorld().setBiome(x, 0, z, biome);
|
||||
for(int y = 0; y<256; y++){
|
||||
if(!chunk.getWorld().getBiome(x, y, z).equals(biome)){
|
||||
chunk.getWorld().setBiome(x, y, z, biome);
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
updateBiomePacket(island, chunk);
|
||||
|
@ -30,7 +30,7 @@ public class VoidGenerator extends ChunkGenerator {
|
||||
final ConfigurationSection worldSection = configLoad.getConfigurationSection("Island.World");
|
||||
|
||||
if(ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)) { // TODO Should be 1.15 but it works fine there
|
||||
setChunkBiome3D(CompatibleBiome.valueOf(configLoad
|
||||
setChunkBiome2D(CompatibleBiome.valueOf(configLoad // 2D for the moment
|
||||
.getString("Island.Biome.Default.Type").toUpperCase()).getBiome(), biomeGrid);
|
||||
} else {
|
||||
setChunkBiome2D(CompatibleBiome.valueOf(configLoad
|
||||
@ -84,14 +84,15 @@ public class VoidGenerator extends ChunkGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
// Do not use - Too laggy
|
||||
private void setChunkBiome3D(Biome biome, BiomeGrid grid) {
|
||||
for(int x = 0; x < 16; x++){
|
||||
for(int z = 0; z < 16; z++){
|
||||
//for(int y = 0; y<256; y++){
|
||||
if(!grid.getBiome(x, 0, z).equals(biome)){
|
||||
grid.setBiome(x, 0, z, biome);
|
||||
for(int y = 0; y<256; y++){
|
||||
if(!grid.getBiome(x, y, z).equals(biome)){
|
||||
grid.setBiome(x, y, z, biome);
|
||||
}
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user