Class EntityBoat

All Implemented Interfaces:
org.cloudburstmc.api.entity.Entity, org.cloudburstmc.api.entity.Interactable, org.cloudburstmc.api.entity.Rideable, org.cloudburstmc.api.entity.vehicle.Boat, org.cloudburstmc.api.entity.vehicle.Vehicle

public class EntityBoat extends EntityVehicle implements org.cloudburstmc.api.entity.vehicle.Boat
Created by yescallop on 2016/2/13.
  • Field Details

    • RIDER_PLAYER_OFFSET

      public static final com.nukkitx.math.vector.Vector3f RIDER_PLAYER_OFFSET
    • RIDER_OFFSET

      public static final com.nukkitx.math.vector.Vector3f RIDER_OFFSET
    • PASSENGER_OFFSET

      public static final com.nukkitx.math.vector.Vector3f PASSENGER_OFFSET
    • RIDER_PASSENGER_OFFSET

      public static final com.nukkitx.math.vector.Vector3f RIDER_PASSENGER_OFFSET
    • RIDER_INDEX

      public static final int RIDER_INDEX
      See Also:
      Constant Field Values
    • PASSENGER_INDEX

      public static final int PASSENGER_INDEX
      See Also:
      Constant Field Values
    • SINKING_DEPTH

      public static final double SINKING_DEPTH
      See Also:
      Constant Field Values
    • SINKING_SPEED

      public static final double SINKING_SPEED
      See Also:
      Constant Field Values
    • SINKING_MAX_SPEED

      public static final double SINKING_MAX_SPEED
      See Also:
      Constant Field Values
    • sinking

      protected boolean sinking
  • Constructor Details

    • EntityBoat

      public EntityBoat(org.cloudburstmc.api.entity.EntityType<org.cloudburstmc.api.entity.vehicle.Boat> type, org.cloudburstmc.api.level.Location location)
  • Method Details

    • initEntity

      protected void initEntity()
      Overrides:
      initEntity in class BaseEntity
    • getWoodType

      public int getWoodType()
    • setWoodType

      public void setWoodType(org.cloudburstmc.api.util.data.TreeSpecies woodType)
      Specified by:
      setWoodType in interface org.cloudburstmc.api.entity.vehicle.Boat
    • getHeight

      public float getHeight()
      Specified by:
      getHeight in interface org.cloudburstmc.api.entity.Entity
      Overrides:
      getHeight in class BaseEntity
    • getWidth

      public float getWidth()
      Specified by:
      getWidth in interface org.cloudburstmc.api.entity.Entity
      Overrides:
      getWidth in class BaseEntity
    • getDrag

      public float getDrag()
      Specified by:
      getDrag in interface org.cloudburstmc.api.entity.Entity
      Overrides:
      getDrag in class BaseEntity
    • getGravity

      public float getGravity()
      Specified by:
      getGravity in interface org.cloudburstmc.api.entity.Entity
      Overrides:
      getGravity in class BaseEntity
    • getBaseOffset

      public float getBaseOffset()
      Overrides:
      getBaseOffset in class BaseEntity
    • getInteractButtonText

      public String getInteractButtonText()
      Specified by:
      getInteractButtonText in interface org.cloudburstmc.api.entity.Interactable
      Overrides:
      getInteractButtonText in class EntityVehicle
    • attack

      public boolean attack(org.cloudburstmc.api.event.entity.EntityDamageEvent source)
      Specified by:
      attack in interface org.cloudburstmc.api.entity.Entity
      Overrides:
      attack in class EntityVehicle
    • close

      public void close()
      Specified by:
      close in interface org.cloudburstmc.api.entity.Entity
      Overrides:
      close in class BaseEntity
    • onUpdate

      public boolean onUpdate(int currentTick)
      Specified by:
      onUpdate in interface org.cloudburstmc.api.entity.Entity
      Overrides:
      onUpdate in class EntityVehicle
    • updatePassengers

      public void updatePassengers()
      Overrides:
      updatePassengers in class BaseEntity
    • updatePassengers

      public void updatePassengers(boolean sendLinks)
    • getWaterLevel

      public double getWaterLevel()
    • mount

      public boolean mount(org.cloudburstmc.api.entity.Entity entity)
      Specified by:
      mount in interface org.cloudburstmc.api.entity.Entity
    • onMount

      public void onMount(org.cloudburstmc.api.entity.Entity passenger)
      Specified by:
      onMount in interface org.cloudburstmc.api.entity.Entity
      Overrides:
      onMount in class BaseEntity
    • onDismount

      public void onDismount(org.cloudburstmc.api.entity.Entity passenger)
      Specified by:
      onDismount in interface org.cloudburstmc.api.entity.Entity
      Overrides:
      onDismount in class BaseEntity
    • updatePassengerPosition

      protected void updatePassengerPosition(org.cloudburstmc.api.entity.Entity passenger)
      Overrides:
      updatePassengerPosition in class BaseEntity
    • isControlling

      public boolean isControlling(org.cloudburstmc.api.entity.Entity entity)
      Specified by:
      isControlling in interface org.cloudburstmc.api.entity.Entity
      Overrides:
      isControlling in class BaseEntity
    • onInteract

      public boolean onInteract(org.cloudburstmc.api.player.Player player, org.cloudburstmc.api.item.ItemStack item, com.nukkitx.math.vector.Vector3f clickedPos)
      Specified by:
      onInteract in interface org.cloudburstmc.api.entity.Entity
      Overrides:
      onInteract in class BaseEntity
    • getMountedOffset

      public com.nukkitx.math.vector.Vector3f getMountedOffset(org.cloudburstmc.api.entity.Entity entity)
      Overrides:
      getMountedOffset in class BaseEntity
    • onPaddle

      public void onPaddle(com.nukkitx.protocol.bedrock.packet.AnimatePacket.Action animation, float value)
    • onEntityCollision

      public void onEntityCollision(org.cloudburstmc.api.entity.Entity entity)
      Specified by:
      onEntityCollision in interface org.cloudburstmc.api.entity.Entity
      Overrides:
      onEntityCollision in class BaseEntity
    • canPassThrough

      public boolean canPassThrough()
      Specified by:
      canPassThrough in interface org.cloudburstmc.api.entity.Entity
      Overrides:
      canPassThrough in class BaseEntity
    • kill

      public void kill()
      Specified by:
      kill in interface org.cloudburstmc.api.entity.Entity
      Overrides:
      kill in class BaseEntity
    • mount

      public boolean mount(org.cloudburstmc.api.entity.Entity entity, org.cloudburstmc.api.util.data.MountType mode)
      Description copied from class: BaseEntity
      Mount or dismounts an Entity from a/into vehicle
      Specified by:
      mount in interface org.cloudburstmc.api.entity.Entity
      Specified by:
      mount in interface org.cloudburstmc.api.entity.Rideable
      Overrides:
      mount in class BaseEntity
      Parameters:
      entity - The target Entity
      Returns:
      true if the mounting successful