Fix bad ticking checks for blocks

Caused blocks to tick outside of simulation distance
This commit is contained in:
Spottedleaf 2021-12-08 22:00:45 -08:00
parent 74fd151adc
commit 758e2a7ee2
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ so inline where possible, and avoid the abstraction of the
Either class.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 3d4961418f3ee7e2d421738d8a8104aac09361d6..fe572c99263a44a23e2dc5141295d98973684a88 100644
index 3fea7315ed3caf7363dd9349f8e977282dfa4c07..00d5060e2a81a7c5fe32f8b9ed8334ff844a70f5 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2139,15 +2139,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -18,7 +18,7 @@ index 3d4961418f3ee7e2d421738d8a8104aac09361d6..fe572c99263a44a23e2dc5141295d989
- return this.areEntitiesLoaded(chunkPos) && this.chunkSource.isPositionTicking(chunkPos);
+ // Paper start - optimize is ticking ready type functions
+ ChunkHolder chunkHolder = this.chunkSource.chunkMap.getVisibleChunkIfPresent(chunkPos);
+ return chunkHolder != null && chunkHolder.isTickingReady() && this.areEntitiesLoaded(chunkPos);
+ return chunkHolder != null && this.chunkSource.isPositionTicking(chunkPos) && chunkHolder.isTickingReady() && this.areEntitiesLoaded(chunkPos);
+ // Paper end
}