Use correct TrackedEntity variable in ChunkMap#addEntity

The variable `trackedEntity` is the input parameter, but we need use the TrackedEntity variable for the possible other entity.
This commit is contained in:
M2ke4U 2025-01-29 07:55:07 +08:00 committed by GitHub
parent ec78da5ae0
commit 35d31075a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -111,7 +111,7 @@
+ // Folia start - region threading
+ for (Entity possible : this.level.getCurrentWorldData().trackerEntities) {
+ ChunkMap.TrackedEntity trackedEntity1 = possible.moonrise$getTrackedEntity();
+ if (trackedEntity == null) {
+ if (trackedEntity1 == null) {
+ continue;
+ }
+ // Folia end - region threading