Package me.hackware.api.event.impl
Class VehicleMoveEvent
java.lang.Object
me.hackware.api.event.Event
me.hackware.api.event.impl.VehicleMoveEvent
Fired before the vehicle the local player drives (it is the vehicle's controlling
passenger) moves. Set a new movement vector to replace the move; leave it alone (the
same instance) to keep vanilla's.
When the move is the vehicle's own velocity (a MoverType.SELF move from its
travel code), the vehicle keeps the replacement as its velocity afterwards, or
getVelocity() when a listener set one.
-
Constructor Summary
ConstructorsConstructorDescriptionVehicleMoveEvent(net.minecraft.world.entity.Entity vehicle, net.minecraft.world.entity.MoverType moverType, net.minecraft.world.phys.Vec3 movement) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.Vec3net.minecraft.world.entity.MoverTypenet.minecraft.world.entity.Entitynet.minecraft.world.phys.Vec3The velocity the vehicle keeps after a replaced move, or null for the replacement itself.voidsetMovement(net.minecraft.world.phys.Vec3 movement) voidsetVelocity(net.minecraft.world.phys.Vec3 velocity) Methods inherited from class me.hackware.api.event.Event
cancel, isCancelled
-
Constructor Details
-
VehicleMoveEvent
public VehicleMoveEvent(net.minecraft.world.entity.Entity vehicle, net.minecraft.world.entity.MoverType moverType, net.minecraft.world.phys.Vec3 movement)
-
-
Method Details
-
getVehicle
public net.minecraft.world.entity.Entity getVehicle() -
getMoverType
public net.minecraft.world.entity.MoverType getMoverType() -
getMovement
public net.minecraft.world.phys.Vec3 getMovement() -
setMovement
public void setMovement(net.minecraft.world.phys.Vec3 movement) -
getVelocity
public net.minecraft.world.phys.Vec3 getVelocity()The velocity the vehicle keeps after a replaced move, or null for the replacement itself. -
setVelocity
public void setVelocity(net.minecraft.world.phys.Vec3 velocity)
-