Strip enderpearl owners when they are no longer ticked (#7559)

This commit is contained in:
Owen1212055
2022-04-07 20:52:25 -04:00
parent 38f9875028
commit 8fdde462f2
2 changed files with 20 additions and 24 deletions

View File

@@ -179,9 +179,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public void onTickingEnd(Entity entity) {
ServerLevel.this.entityTickList.remove(entity);
+ ServerLevel.this.entityManager.removeNavigatorsFromData(entity); // Paper - optimise notify
}
public void onTrackingStart(Entity entity) {
// Paper start - Reset pearls when they stop being ticked
if (paperConfig.disableEnderpearlExploit && entity instanceof net.minecraft.world.entity.projectile.ThrownEnderpearl pearl) {
pearl.cachedOwner = null;
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java