[ci-skip] Mention missing World#regenerateChunk implementation in jd (#12109)

* Mention missing impl

* Clean the implementation out of years old code

* Change the jd comment

* Move to default method

---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
This commit is contained in:
masmc05
2025-02-16 00:31:42 +02:00
committed by GitHub
parent c62252e19f
commit 404167841d
2 changed files with 5 additions and 29 deletions

View File

@@ -470,33 +470,6 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return !this.isChunkLoaded(x, z);
}
@Override
public boolean regenerateChunk(int x, int z) {
org.spigotmc.AsyncCatcher.catchOp("chunk regenerate"); // Spigot
throw new UnsupportedOperationException("Not supported in this Minecraft version! Unless you can fix it, this is not a bug :)");
/*
if (!unloadChunk0(x, z, false)) {
return false;
}
warnUnsafeChunk("regenerating a faraway chunk", x, z); // Paper
final long chunkKey = ChunkCoordIntPair.pair(x, z);
world.getChunkProvider().unloadQueue.remove(chunkKey);
net.minecraft.server.Chunk chunk = world.getChunkProvider().generateChunk(x, z);
PlayerChunk playerChunk = world.getPlayerChunkMap().getChunk(x, z);
if (playerChunk != null) {
playerChunk.chunk = chunk;
}
if (chunk != null) {
refreshChunk(x, z);
}
return chunk != null;
*/
}
@Override
public boolean refreshChunk(int x, int z) {
ChunkHolder playerChunk = this.world.getChunkSource().chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z));