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, Tickable
Direct Known Subclasses:
ChestBoatEntity

public class BoatEntity extends Entity implements Tickable
  • Constructor Details

    • BoatEntity

      public BoatEntity(GeyserSession session, int entityId, long geyserId, UUID uuid, EntityDefinition<?> definition, org.cloudburstmc.math.vector.Vector3f position, org.cloudburstmc.math.vector.Vector3f motion, float yaw, float pitch, float headYaw)
  • Method Details

    • 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.
    • setVariant

      public void setVariant(org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata entityMetadata)
    • 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)
    • 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()
      Specified by:
      tick in interface Tickable
    • getVariant

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