From 26c0084f0a37464d03775761f242ca76ab25da86 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 24 Jun 2020 09:21:39 +1000 Subject: [PATCH] SPIGOT-5675, SPIGOT-5798, MC-149563: Fix tracking of entities across dimensions --- nms-patches/EntityLiving.patch | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/nms-patches/EntityLiving.patch b/nms-patches/EntityLiving.patch index 25f0287e1b..4198f94667 100644 --- a/nms-patches/EntityLiving.patch +++ b/nms-patches/EntityLiving.patch @@ -759,7 +759,15 @@ this.setFlag(7, flag); } -@@ -2296,12 +2694,12 @@ +@@ -2279,6 +2677,7 @@ + } + + public boolean hasLineOfSight(Entity entity) { ++ if (this.world != entity.world) return false; // CraftBukkit - SPIGOT-5675, SPIGOT-5798, MC-149563 + Vec3D vec3d = new Vec3D(this.locX(), this.getHeadY(), this.locZ()); + Vec3D vec3d1 = new Vec3D(entity.locX(), entity.getHeadY(), entity.locZ()); + +@@ -2296,12 +2695,12 @@ @Override public boolean isInteractable() { @@ -774,7 +782,7 @@ } @Override -@@ -2484,7 +2882,27 @@ +@@ -2484,7 +2883,27 @@ } else { if (!this.activeItem.isEmpty() && this.isHandRaised()) { this.b(this.activeItem, 16); @@ -803,7 +811,7 @@ this.dH(); } -@@ -2571,10 +2989,18 @@ +@@ -2571,10 +2990,18 @@ } if (flag2) { @@ -825,7 +833,7 @@ } } -@@ -2661,7 +3087,7 @@ +@@ -2661,7 +3088,7 @@ } public void entityWakeup() { @@ -834,7 +842,7 @@ World world = this.world; this.world.getClass(); -@@ -2725,7 +3151,7 @@ +@@ -2725,7 +3152,7 @@ Pair pair = (Pair) iterator.next(); if (!world.isClientSide && pair.getLeft() != null && world.random.nextFloat() < (Float) pair.getRight()) {