Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention missing World#regenerateChunk implementation in jd #12109

Merged
merged 4 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion paper-api/src/main/java/org/bukkit/World.java
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,12 @@ default boolean isChunkGenerated(long chunkKey) {
* @param z Z-coordinate of the chunk
* @return Whether the chunk was actually regenerated
*
* @throws UnsupportedOperationException not implemented
* @deprecated regenerating a single chunk is not likely to produce the same
* chunk as before as terrain decoration may be spread across chunks. It may
* or may not change blocks in the adjacent chunks as well.
*/
@Deprecated(since = "1.13")
@Deprecated(since = "1.13", forRemoval = true)
public boolean regenerateChunk(int x, int z);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,29 +472,7 @@ private boolean unloadChunk0(int x, int z, boolean save) {

@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;
*/
throw new UnsupportedOperationException("Not supported in this Minecraft version! This is not a bug.");
}

@Override
Expand Down
Loading