Skip to content

Commit

Permalink
Correct remove hook position
Browse files Browse the repository at this point in the history
  • Loading branch information
Lora4967 committed May 27, 2024
1 parent e0f186a commit 55e3da7
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions patches/server/0006-Correct-remove-hook-position.patch
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 <[email protected]>
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() {

0 comments on commit 55e3da7

Please sign in to comment.