use of io.xol.chunkstories.api.net.packets.PacketVelocityDelta in project chunkstories-api by Hugobros3.
the class EntityComponentVelocity method addVelocity.
public void addVelocity(Vector3dc delta) {
this.velocity.add(delta);
this.pushComponentEveryoneButController();
// Notify the controller otherwise:
if (entity instanceof EntityControllable) {
Controller controller = ((EntityControllable) entity).getControllerComponent().getController();
if (controller != null) {
PacketVelocityDelta packet = new PacketVelocityDelta(entity.getWorld(), delta);
controller.pushPacket(packet);
}
}
}
Aggregations