mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-29 23:17:59 +02:00
Send velocity packet when velocity is forced changed with Entity#setVelocity
This commit is contained in:
parent
da416866f6
commit
1ca561215c
@ -455,6 +455,7 @@ public abstract class Entity implements Viewable, EventHandler, DataContainer {
|
|||||||
EntityVelocityEvent entityVelocityEvent = new EntityVelocityEvent(this, velocity);
|
EntityVelocityEvent entityVelocityEvent = new EntityVelocityEvent(this, velocity);
|
||||||
callCancellableEvent(EntityVelocityEvent.class, entityVelocityEvent, () -> {
|
callCancellableEvent(EntityVelocityEvent.class, entityVelocityEvent, () -> {
|
||||||
this.velocity.copy(entityVelocityEvent.getVelocity());
|
this.velocity.copy(entityVelocityEvent.getVelocity());
|
||||||
|
sendPacketToViewers(getVelocityPacket());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user