mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56: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,8 +278,12 @@ 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) {
|
||||||
// Return super as it will throw an exception caught by the server that will mean this method is no longer used.
|
if (this.platformGenerator != this) {
|
||||||
return super.generateChunkData(world, random, x, z, biome);
|
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.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);
|
||||||
|
Loading…
Reference in New Issue
Block a user