Skip to content

Commit

Permalink
Do not call modifyEntityTrackingRange on own range
Browse files Browse the repository at this point in the history
The range is already modified, so this call will not do anything.
  • Loading branch information
Spottedleaf committed Nov 27, 2024
1 parent afb5b13 commit d38624b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patches/server/1038-Moonrise-optimisation-patches.patch
Original file line number Diff line number Diff line change
Expand Up @@ -24172,7 +24172,7 @@ index d9ad32acdf46a43a649334a3b736aeb7b3af21d1..fae17a075d7efaf24d916877dd5968eb
public static final int RADIUS_AROUND_FULL_CHUNK = FULL_CHUNK_STEP.accumulatedDependencies().getRadius();
public static final int MAX_LEVEL = 33 + RADIUS_AROUND_FULL_CHUNK;
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 7317c353edab8b11d9d94e257f968ac49284f47a..cb3850939955ae068d4776c835522e0b8f228984 100644
index 7317c353edab8b11d9d94e257f968ac49284f47a..c185f634b962c40047696ec0df50eb88af3ac389 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -108,7 +108,7 @@ import org.slf4j.Logger;
Expand Down Expand Up @@ -25455,7 +25455,7 @@ index 7317c353edab8b11d9d94e257f968ac49284f47a..cb3850939955ae068d4776c835522e0b
- Iterator iterator = this.entity.getIndirectPassengers().iterator();
+ // Paper start - optimise entity tracker
+ final Entity entity = this.entity;
+ int range = ca.spottedleaf.moonrise.common.PlatformHooks.get().modifyEntityTrackingRange(entity, this.range);
+ int range = this.range;

- while (iterator.hasNext()) {
- Entity entity = (Entity) iterator.next();
Expand Down

0 comments on commit d38624b

Please sign in to comment.