Update patches to latest 1.21.4 #1

Merged
Chaoscaot merged 242 commits from update/1.21.4 into main 2025-04-23 22:27:11 +02:00
315 changed files with 4202 additions and 1715 deletions
Showing only changes of commit 404167841d - Show all commits

View File

@ -476,12 +476,15 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
* @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")
public boolean regenerateChunk(int x, int z);
@Deprecated(since = "1.13", forRemoval = true)
default boolean regenerateChunk(int x, int z) {
throw new UnsupportedOperationException("Not supported in this Minecraft version! This is not a bug.");
}
/**
* Resends the {@link Chunk} to all clients

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));