@@ -9,7 +9,7 @@ See the comments on setSource in ThreadedTicketPropagator
99and the implementation of addTicketAtLevel on the original ChunkHolderManager
1010
1111diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java
12- index 2745180094b48b10e7ca9d4ab28c7762637db7c3..a57e26f763ba4e3878d13b97dd75396889eb0d95 100644
12+ index 2745180094b48b10e7ca9d4ab28c7762637db7c3..0bc308917066cd8cfabbd401205e53973eaeb0d5 100644
1313--- a/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java
1414+++ b/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java
1515@@ -713,7 +713,17 @@ public final class ChunkHolderManager {
@@ -71,3 +71,22 @@ index 2745180094b48b10e7ca9d4ab28c7762637db7c3..a57e26f763ba4e3878d13b97dd753968
7171 try {
7272 if (this.removeTicketAtLevel(removeType, chunk, removeLevel, removeIdentifier, false)) {
7373 this.addTicketAtLevel(addType, chunk, addLevel, addIdentifier, false);
74+ @@ -1416,7 +1448,17 @@ public final class ChunkHolderManager {
75+ }
76+
77+ // stage 3: actually attempt to remove the chunk holders
78+ - ticketLock = this.ticketLockArea.lock(sectionLowerX, sectionLowerZ);
79+ + // Luminol start - Fix incorrect ticket locking area
80+ + // (posX & ~(SECTION_SIZE - 1), posZ & ~(SECTION_SIZE - 1)) to (posX | (SECTION_SIZE - 1), posZ | (SECTION_SIZE - 1))
81+ + final int sectionSize = ThreadedTicketLevelPropagator.SECTION_SIZE;
82+ + ticketLock = this.ticketLockArea.lock(
83+ + sectionLowerX & ~(sectionSize - 1),
84+ + sectionLowerZ & ~(sectionSize - 1),
85+ + sectionLowerX| (sectionSize - 1),
86+ + sectionLowerZ | (sectionSize - 1)
87+ + );
88+ + // Luminol end - Fix incorrect ticket locking area
89+ + // ticketLock = this.ticketLockArea.lock(sectionLowerX, sectionLowerZ); // Luminol - Fix incorrect ticket locking area
90+ try {
91+ final ReentrantAreaLock.Node scheduleLock = this.taskScheduler.schedulingLockArea.lock(sectionLowerX, sectionLowerZ);
92+ try {
0 commit comments