If the observer is riding the disguised entity, don't do weird player stuff
This commit is contained in:
parent
a45f7a8076
commit
7ab4a31c1f
@ -206,7 +206,7 @@ public class PacketHandlerSpawn implements IPacketHandler {
|
|||||||
double dist = observer.getLocation().distanceSquared(disguisedEntity.getLocation());
|
double dist = observer.getLocation().distanceSquared(disguisedEntity.getLocation());
|
||||||
|
|
||||||
// If self disguise, or further than 50 blocks, or not in front of entity
|
// If self disguise, or further than 50 blocks, or not in front of entity
|
||||||
normalPlayerDisguise = observer == disguisedEntity || dist > (50 * 50) ||
|
normalPlayerDisguise = observer == disguisedEntity || disguisedEntity.getPassengers().contains(observer) || dist > (50 * 50) ||
|
||||||
(observer.getLocation().add(observer.getLocation().getDirection().normalize()).distanceSquared(disguisedEntity.getLocation()) - dist) < 0.3;
|
(observer.getLocation().add(observer.getLocation().getDirection().normalize()).distanceSquared(disguisedEntity.getLocation()) - dist) < 0.3;
|
||||||
sendArmor = normalPlayerDisguise;
|
sendArmor = normalPlayerDisguise;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user