Interface ClientVehicle
- All Known Implementing Classes:
AbstractHorseEntity,AbstractNautilusEntity,BoatEntity,CamelEntity,CamelHuskEntity,ChestBoatEntity,ChestedHorseEntity,HappyGhastEntity,HorseEntity,LlamaEntity,NautilusEntity,PigEntity,SkeletonHorseEntity,StriderEntity,TraderLlamaEntity,ZombieHorseEntity,ZombieNautilusEntity
public interface ClientVehicle
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanClimb()booleanWhether the session is controlling this vehicle, i.e.default booleanorg.cloudburstmc.math.vector.Vector3fgetRiddenInput(org.cloudburstmc.math.vector.Vector2f input) floatdefault booleanWhether Geyser should simulate vehicle movement and send it to the backend.
-
Method Details
-
getVehicleComponent
VehicleComponent<?> getVehicleComponent() -
getRiddenInput
org.cloudburstmc.math.vector.Vector3f getRiddenInput(org.cloudburstmc.math.vector.Vector2f input) -
getVehicleSpeed
float getVehicleSpeed() -
canSimulateMovement
boolean canSimulateMovement()Whether the session is controlling this vehicle, i.e. riding a (saddled) horse or holding a carrot on a stick while on a pig (warped fungus on a stick for a strider)- See Also:
-
getVehicle
Entity getVehicle() -
shouldSimulateMovement
default boolean shouldSimulateMovement()Whether Geyser should simulate vehicle movement and send it to the backend.Java clients only simulate the main controlled vehicle. MojMap
LocalPlayer#tickonly sends aServerboundMoveVehiclePacketforgetRootVehicle(). Likewise, a vehicle that is a passenger, e.g. a pig in a minecart, is controlled by the vehicle it is riding... See MojMapEntity#rideTick- if we simulate a vehicle (while it's a passenger), welcome to "was expecting to be controlling vehicle" galore (Geyser also ignores backend position updates due to this).Unlike
canSimulateMovement(), this double-checks that the vehicle isn't actually a passenger and should be simulated. -
canWalkOnLava
default boolean canWalkOnLava() -
canClimb
default boolean canClimb()
-