mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-08 09:27:58 +01:00
Only send velocity packet in #addViewer if required
This commit is contained in:
parent
0eea491f9d
commit
c92a7873db
@ -345,7 +345,9 @@ public class Entity implements Viewable, EventHandler, DataContainer, Permission
|
||||
|
||||
PlayerConnection playerConnection = player.getPlayerConnection();
|
||||
playerConnection.sendPacket(getEntityType().getSpawnType().getSpawnPacket(this));
|
||||
playerConnection.sendPacket(getVelocityPacket());
|
||||
if (hasVelocity()) {
|
||||
playerConnection.sendPacket(getVelocityPacket());
|
||||
}
|
||||
playerConnection.sendPacket(getMetadataPacket());
|
||||
|
||||
// Passenger
|
||||
|
Loading…
Reference in New Issue
Block a user