Skip to content

Commit

Permalink
Fix threading issue in LevelTicks.java
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHua269 committed Nov 29, 2023
1 parent bae7c75 commit 4f9b37b
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

public LevelTicks(LongPredicate p_193211_, Supplier<ProfilerFiller> p_193212_) {
this.f_193200_ = p_193211_;
@@ -55,75 +_,100 @@
@@ -55,75 +_,95 @@
}

public void m_193231_(ChunkPos p_193232_, LevelChunkTicks<T> p_193233_) {
Expand Down Expand Up @@ -149,14 +149,9 @@
+ this.m_193216_(p_193222_);
+ //profiler.incrementCounter("containersToTick", this.containersToTick.size()); // Purpur
+ this.m_193218_(p_193222_, p_193223_);
+ }finally {
+ this.accessLock.writeLock().unlock();
+ }
+ this.accessLock.readLock().lock();
+ try {
+ this.m_193278_();
+ }finally {
+ this.accessLock.readLock().unlock();
+ this.accessLock.writeLock().unlock();
+ }
}

Expand Down

0 comments on commit 4f9b37b

Please sign in to comment.