mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-29 18:45:26 +02:00
Compare commits
5 Commits
fix/plot-c
...
renovate/n
Author | SHA1 | Date | |
---|---|---|---|
![]() |
62de0b9d2c | ||
![]() |
e9cab5f1a3 | ||
![]() |
956deb2144 | ||
![]() |
45b012f38b | ||
![]() |
f11f5f0dfb |
@@ -185,35 +185,6 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
|||||||
world.setWaterAnimalSpawnLimit(limit);
|
world.setWaterAnimalSpawnLimit(limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void generateNoise(
|
|
||||||
@NotNull final WorldInfo worldInfo,
|
|
||||||
@NotNull final Random random,
|
|
||||||
final int chunkX,
|
|
||||||
final int chunkZ,
|
|
||||||
@NotNull final ChunkData chunkData
|
|
||||||
) {
|
|
||||||
if (this.platformGenerator != this) {
|
|
||||||
this.platformGenerator.generateNoise(worldInfo, random, chunkX, chunkZ, chunkData);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
int minY = chunkData.getMinHeight();
|
|
||||||
int maxY = chunkData.getMaxHeight();
|
|
||||||
GenChunk result = new GenChunk(minY, maxY);
|
|
||||||
// Set the chunk location
|
|
||||||
result.setChunk(new ChunkWrapper(worldInfo.getName(), chunkX, chunkZ));
|
|
||||||
// Set the result data
|
|
||||||
result.setChunkData(chunkData);
|
|
||||||
result.result = null;
|
|
||||||
|
|
||||||
// Catch any exceptions (as exceptions usually thrown)
|
|
||||||
try {
|
|
||||||
generate(BlockVector2.at(chunkX, chunkZ), worldInfo.getName(), result, false);
|
|
||||||
} catch (Throwable e) {
|
|
||||||
LOGGER.error("Error attempting to generate chunk.", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void generateSurface(
|
public void generateSurface(
|
||||||
@NotNull final WorldInfo worldInfo,
|
@NotNull final WorldInfo worldInfo,
|
||||||
@@ -277,11 +248,6 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
|||||||
return super.getBaseHeight(worldInfo, random, x, z, heightMap);
|
return super.getBaseHeight(worldInfo, random, x, z, heightMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* The entire method is deprecated, but kept for compatibility with versions lower than or equal to 1.16.2.
|
|
||||||
* The method will be removed in future versions, because WorldEdit and FastAsyncWorldEdit only support the latest point
|
|
||||||
* release.
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("deprecation") // The entire method is deprecated, but kept for compatibility with <=1.16.2
|
@SuppressWarnings("deprecation") // The entire method is deprecated, but kept for compatibility with <=1.16.2
|
||||||
@Override
|
@Override
|
||||||
@Deprecated(since = "TODO")
|
@Deprecated(since = "TODO")
|
||||||
@@ -292,8 +258,8 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
|||||||
if (this.platformGenerator != this) {
|
if (this.platformGenerator != this) {
|
||||||
return this.platformGenerator.generateChunkData(world, random, x, z, biome);
|
return this.platformGenerator.generateChunkData(world, random, x, z, biome);
|
||||||
} else {
|
} else {
|
||||||
// Throw exception to be caught by the server that indicates the new generation API is being used.
|
// Return super as it will throw an exception caught by the server that will mean this method is no longer used.
|
||||||
throw new UnsupportedOperationException("Using new generation methods. This method is unsupported.");
|
return super.generateChunkData(world, random, x, z, biome);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -288,13 +288,6 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||||||
queue.setCompleteTask(whenDone);
|
queue.setCompleteTask(whenDone);
|
||||||
}
|
}
|
||||||
if (!canRegen) {
|
if (!canRegen) {
|
||||||
if (hybridPlotWorld.getMinBuildHeight() < hybridPlotWorld.getMinGenHeight()) {
|
|
||||||
queue.setCuboid(
|
|
||||||
pos1.withY(hybridPlotWorld.getMinBuildHeight()),
|
|
||||||
pos2.withY(hybridPlotWorld.getMinGenHeight()),
|
|
||||||
BlockTypes.AIR.getDefaultState()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
queue.setCuboid(
|
queue.setCuboid(
|
||||||
pos1.withY(hybridPlotWorld.getMinGenHeight()),
|
pos1.withY(hybridPlotWorld.getMinGenHeight()),
|
||||||
pos2.withY(hybridPlotWorld.getMinGenHeight()),
|
pos2.withY(hybridPlotWorld.getMinGenHeight()),
|
||||||
@@ -312,13 +305,6 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||||||
pos2.withY(hybridPlotWorld.getMaxGenHeight()),
|
pos2.withY(hybridPlotWorld.getMaxGenHeight()),
|
||||||
BlockTypes.AIR.getDefaultState()
|
BlockTypes.AIR.getDefaultState()
|
||||||
);
|
);
|
||||||
if (hybridPlotWorld.getMaxGenHeight() < hybridPlotWorld.getMaxBuildHeight() - 1) {
|
|
||||||
queue.setCuboid(
|
|
||||||
pos1.withY(hybridPlotWorld.getMaxGenHeight()),
|
|
||||||
pos2.withY(hybridPlotWorld.getMaxBuildHeight() - 1),
|
|
||||||
BlockTypes.AIR.getDefaultState()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
queue.setBiomeCuboid(pos1, pos2, biome);
|
queue.setBiomeCuboid(pos1, pos2, biome);
|
||||||
} else {
|
} else {
|
||||||
queue.setRegenRegion(new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3()));
|
queue.setRegenRegion(new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3()));
|
||||||
|
@@ -74,7 +74,7 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(platform("com.intellectualsites.bom:bom-newest:1.24"))
|
implementation(platform("com.intellectualsites.bom:bom-newest:1.25"))
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
Reference in New Issue
Block a user