mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
SPIGOT-5675, SPIGOT-5798, MC-149563: Fix tracking of entities across dimensions
This commit is contained in:
parent
7f3e7c3fbf
commit
26c0084f0a
@ -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<MobEffect, Float> pair = (Pair) iterator.next();
|
||||
|
||||
if (!world.isClientSide && pair.getLeft() != null && world.random.nextFloat() < (Float) pair.getRight()) {
|
||||
|
Loading…
Reference in New Issue
Block a user