mirror of
https://github.com/PaperMC/Folia.git
synced 2025-02-16 01:22:04 +01:00
Fix two regionizer issues: In ThreadedRegionizer#addChunk, fix the incorrect handling of merging two regions where one of the regions had pending merges. If the first region had pending merges, and the second was marked as "ready" then the merge would cause a "ready" region to have pending merges. The fix is to simply downgrade the "ready" region to "transient," as was previously done if the merge was delayed in the case where the first region was "ticking." Additionally, prevent the creation of empty regions by checking if any new sections were created. This would happen when a section existed, but had no marked chunks in it AND all of the sections neighbours existed. In these cases, no region needs to be created as no sections were created.
20 lines
1.2 KiB
Diff
20 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
|
Date: Wed, 29 Mar 2023 10:15:40 -0700
|
|
Subject: [PATCH] Work around https://github.com/PaperMC/paperweight/issues/194
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
index f461db9abd9a7d9bed145cd1a053835c31541a88..6f88fbd45217dbbe67f2469040b7c5f621e185c6 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -504,7 +504,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
|
this.disconnect(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(s), cause);
|
|
}
|
|
|
|
- @io.papermc.paper.annotation.DoNotUse // Paper
|
|
+ @Deprecated(forRemoval = true) // Folia - https://github.com/PaperMC/paperweight/issues/194
|
|
public void disconnect(final Component reason) {
|
|
this.disconnect(PaperAdventure.asAdventure(reason), org.bukkit.event.player.PlayerKickEvent.Cause.UNKNOWN);
|
|
}
|