-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: MrHua269 <novau233@163.com> | ||
Date: Mon, 27 May 2024 11:45:53 +0000 | ||
Subject: [PATCH] Correct remove hook position | ||
|
||
|
||
diff --git a/src/main/java/io/papermc/paper/threadedregions/ThreadedRegionizer.java b/src/main/java/io/papermc/paper/threadedregions/ThreadedRegionizer.java | ||
index 69b2f6182e135ba86ac878956aabfd472f103f11..2b81c59e3aff7f0d017807a9990074453e6dd952 100644 | ||
--- a/src/main/java/io/papermc/paper/threadedregions/ThreadedRegionizer.java | ||
+++ b/src/main/java/io/papermc/paper/threadedregions/ThreadedRegionizer.java | ||
@@ -640,7 +640,6 @@ public final class ThreadedRegionizer<R extends ThreadedRegionizer.ThreadedRegio | ||
// need to split the region, so we need to kill the old one first | ||
region.state = ThreadedRegion.STATE_DEAD; | ||
region.onRemove(true); | ||
- region.regioniser.world.regionizedWorldDataAccessor.removeRegion((ThreadedRegion<TickRegions.TickRegionData, TickRegions.TickRegionSectionData>) region); | ||
|
||
// create new regions | ||
final Long2ReferenceOpenHashMap<ThreadedRegion<R, S>> newRegionsMap = new Long2ReferenceOpenHashMap<>(); | ||
@@ -816,6 +815,7 @@ public final class ThreadedRegionizer<R extends ThreadedRegionizer.ThreadedRegio | ||
} | ||
this.regioniser.callbacks.onRegionDestroy(this); | ||
this.regioniser.onRegionDestroy(this); | ||
+ this.regioniser.world.regionizedWorldDataAccessor.removeRegion((ThreadedRegion<TickRegions.TickRegionData, TickRegions.TickRegionSectionData>) this); | ||
} | ||
|
||
private final boolean hasNoAliveSections() { |