Class BoatEntity

java.lang.Object
org.geysermc.geyser.entity.type.Entity
org.geysermc.geyser.entity.type.BoatEntity
All Implemented Interfaces:
org.geysermc.geyser.api.entity.type.GeyserEntity, Leashable, Tickable, ClientVehicle
Direct Known Subclasses:
ChestBoatEntity

public class BoatEntity extends Entity implements Tickable, Leashable, ClientVehicle
  • Field Details

    • variant

      protected final BoatEntity.BoatVariant variant
      Saved for using the "pick" functionality on a boat.
  • Constructor Details

  • Method Details

    • initializeMetadata

      protected void initializeMetadata()
      Description copied from class: Entity
      Called on entity spawn. Used to populate the entity metadata and flags with default values.
      Overrides:
      initializeMetadata in class Entity
    • moveAbsolute

      public void moveAbsolute(org.cloudburstmc.math.vector.Vector3f position, float yaw, float pitch, float headYaw, boolean isOnGround, boolean teleported)
      Overrides:
      moveAbsolute in class Entity
    • moveAbsoluteWithoutAdjustments

      public void moveAbsoluteWithoutAdjustments(org.cloudburstmc.math.vector.Vector3f position, float yaw, boolean isOnGround, boolean teleported)
      Move the boat without making the adjustments needed to translate from Java
    • moveRelative

      public void moveRelative(double relX, double relY, double relZ, float yaw, float pitch, float headYaw, boolean isOnGround)
      Overrides:
      moveRelative in class Entity
    • updatePositionAndRotation

      public void updatePositionAndRotation(double moveX, double moveY, double moveZ, float yaw, float pitch, boolean isOnGround)
      Description copied from class: Entity
      Updates an entity's position and rotation. Used in JavaMoveEntityPosRotTranslator.
      Overrides:
      updatePositionAndRotation in class Entity
      Parameters:
      moveX - The new X offset of the current position.
      moveY - The new Y offset of the current position.
      moveZ - The new Z offset of the current position.
      yaw - The new yaw of the entity.
      pitch - The new pitch of the entity.
      isOnGround - Whether the entity is currently on the ground.
    • updateRotation

      public void updateRotation(float yaw, float pitch, boolean isOnGround)
      Description copied from class: Entity
      Updates an entity's rotation. Used in JavaMoveEntityRotTranslator.
      Overrides:
      updateRotation in class Entity
      Parameters:
      yaw - The new yaw of the entity.
      pitch - The new pitch of the entity.
      isOnGround - Whether the entity is currently on the ground.
    • setPaddlingLeft

      public void setPaddlingLeft(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)
    • setPaddlingRight

      public void setPaddlingRight(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata entityMetadata)
    • setLeashHolderBedrockId

      public void setLeashHolderBedrockId(long bedrockId)
      Specified by:
      setLeashHolderBedrockId in interface Leashable
    • testInteraction

      protected InteractiveTag testInteraction(org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand)
      Description copied from class: Entity
      Test interacting with the given hand to see if we should send a tag to the Bedrock client. Should usually mirror Entity.interact(Hand) without any side effects.
      Overrides:
      testInteraction in class Entity
    • interact

      public InteractionResult interact(org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand hand)
      Description copied from class: Entity
      Simulates interacting with an entity. The code here should mirror Java Edition code to the best of its ability, to ensure packet parity as well as functionality parity (such as sound effect responses).
      Overrides:
      interact in class Entity
    • tick

      public void tick()
      Description copied from interface: Tickable
      This function gets called every game tick as long as the game tick loop isn't frozen.
      Specified by:
      tick in interface Tickable
    • leashHolderBedrockId

      public long leashHolderBedrockId()
      Specified by:
      leashHolderBedrockId in interface Leashable
    • getVehicleComponent

      public VehicleComponent<?> getVehicleComponent()
      Specified by:
      getVehicleComponent in interface ClientVehicle
    • getRiddenInput

      public org.cloudburstmc.math.vector.Vector3f getRiddenInput(org.cloudburstmc.math.vector.Vector2f input)
      Specified by:
      getRiddenInput in interface ClientVehicle
    • getVehicleSpeed

      public float getVehicleSpeed()
      Specified by:
      getVehicleSpeed in interface ClientVehicle
    • isClientControlled

      public boolean isClientControlled()
      Specified by:
      isClientControlled in interface ClientVehicle
    • getVariant

      public BoatEntity.BoatVariant getVariant()
      Saved for using the "pick" functionality on a boat.