Only send velocity packet in #addViewer if required

This commit is contained in:
themode 2021-03-26 09:04:28 +01:00
parent 0eea491f9d
commit c92a7873db

View File

@ -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