Send velocity packet when velocity is forced changed with Entity#setVelocity

This commit is contained in:
jglrxavpok 2020-05-21 00:36:50 +02:00
parent da416866f6
commit 1ca561215c

View File

@ -455,6 +455,7 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer {
EntityVelocityEvent entityVelocityEvent = new EntityVelocityEvent(this, velocity);
callCancellableEvent(EntityVelocityEvent.class, entityVelocityEvent, () -> {
this.velocity.copy(entityVelocityEvent.getVelocity());
sendPacketToViewers(getVelocityPacket());
});
}