Move comments to ChunkCoordinator, remove Range annotations

This commit is contained in:
dordsor21
2020-07-28 08:44:16 +01:00
parent 3288721259
commit 97b1a60ae8
4 changed files with 20 additions and 22 deletions

View File

@ -38,7 +38,6 @@ import org.bukkit.World;
import org.bukkit.block.Biome;
import org.bukkit.generator.BlockPopulator;
import org.bukkit.generator.ChunkGenerator;
import org.jetbrains.annotations.Range;
import javax.annotation.Nonnull;
import java.util.Random;
@ -72,8 +71,7 @@ final class DelegatePlotGenerator extends IndependentPlotGenerator {
Random random = new Random(MathMan.pair((short) chunkX, (short) chunkZ));
try {
ChunkGenerator.BiomeGrid grid = new ChunkGenerator.BiomeGrid() {
@Override public void setBiome(@Range(from = 0, to = 15) int x,
@Range(from = 0, to = 15) int z, @Nonnull Biome biome) {
@Override public void setBiome(int x, int z, @Nonnull Biome biome) {
result.setBiome(x, z, BukkitAdapter.adapt(biome));
}

View File

@ -97,9 +97,6 @@ public final class BukkitChunkCoordinator extends ChunkCoordinator {
this.bukkitWorld = Bukkit.getWorld(world.getName());
}
/**
* Start the coordinator instance
*/
@Override public void start() {
// Request initial batch
this.requestBatch();
@ -195,20 +192,10 @@ public final class BukkitChunkCoordinator extends ChunkCoordinator {
chunk.removePluginChunkTicket(this.plugin);
}
/**
* Get the amount of remaining chunks (at the time of the method call)
*
* @return Snapshot view of remaining chunk count
*/
@Override public int getRemainingChunks() {
return this.expectedSize.get();
}
/**
* Get the amount of requested chunks
*
* @return Requested chunk count
*/
@Override public int getTotalChunks() {
return this.totalSize;
}