mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Delegate to platformGenerator in deprecated generation method if applicable when using new generation methods (1.19)
This commit is contained in:
parent
84c9bb0d92
commit
307a1a6deb
@ -278,9 +278,13 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
|||||||
@NonNull World world, @NonNull Random random, int x, int z, @NonNull BiomeGrid biome
|
@NonNull World world, @NonNull Random random, int x, int z, @NonNull BiomeGrid biome
|
||||||
) {
|
) {
|
||||||
if (useNewGenerationMethods) {
|
if (useNewGenerationMethods) {
|
||||||
|
if (this.platformGenerator != this) {
|
||||||
|
return this.platformGenerator.generateChunkData(world, random, x, z, biome);
|
||||||
|
} else {
|
||||||
// Return super as it will throw an exception caught by the server that will mean this method is no longer used.
|
// Return super as it will throw an exception caught by the server that will mean this method is no longer used.
|
||||||
return super.generateChunkData(world, random, x, z, biome);
|
return super.generateChunkData(world, random, x, z, biome);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
int minY = BukkitWorld.getMinWorldHeight(world);
|
int minY = BukkitWorld.getMinWorldHeight(world);
|
||||||
int maxY = BukkitWorld.getMaxWorldHeight(world);
|
int maxY = BukkitWorld.getMaxWorldHeight(world);
|
||||||
GenChunk result = new GenChunk(minY, maxY);
|
GenChunk result = new GenChunk(minY, maxY);
|
||||||
|
Loading…
Reference in New Issue
Block a user