Class BoatEntity

java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.vehicle.BoatEntity
All Implemented Interfaces:
class_5568, CommandOutput, Nameable

public class BoatEntity
extends Entity
  • Field Details

    • DAMAGE_WOBBLE_TICKS

      private static final TrackedData<Integer> DAMAGE_WOBBLE_TICKS
    • DAMAGE_WOBBLE_SIDE

      private static final TrackedData<Integer> DAMAGE_WOBBLE_SIDE
    • DAMAGE_WOBBLE_STRENGTH

      private static final TrackedData<Float> DAMAGE_WOBBLE_STRENGTH
    • BOAT_TYPE

      private static final TrackedData<Integer> BOAT_TYPE
    • LEFT_PADDLE_MOVING

      private static final TrackedData<Boolean> LEFT_PADDLE_MOVING
    • RIGHT_PADDLE_MOVING

      private static final TrackedData<Boolean> RIGHT_PADDLE_MOVING
    • BUBBLE_WOBBLE_TICKS

      private static final TrackedData<Integer> BUBBLE_WOBBLE_TICKS
    • paddlePhases

      private final float[] paddlePhases
    • velocityDecay

      private float velocityDecay
    • ticksUnderwater

      private float ticksUnderwater
    • yawVelocity

      private float yawVelocity
    • field_7708

      private int field_7708
    • x

      private double x
    • y

      private double y
    • z

      private double z
    • boatYaw

      private double boatYaw
    • boatPitch

      private double boatPitch
    • pressingLeft

      private boolean pressingLeft
    • pressingRight

      private boolean pressingRight
    • pressingForward

      private boolean pressingForward
    • pressingBack

      private boolean pressingBack
    • waterLevel

      private double waterLevel
    • field_7714

      private float field_7714
    • location

      private BoatEntity.Location location
    • lastLocation

      private BoatEntity.Location lastLocation
    • fallVelocity

      private double fallVelocity
    • onBubbleColumnSurface

      private boolean onBubbleColumnSurface
    • bubbleColumnIsDrag

      private boolean bubbleColumnIsDrag
    • bubbleWobbleStrength

      private float bubbleWobbleStrength
    • bubbleWobble

      private float bubbleWobble
    • lastBubbleWobble

      private float lastBubbleWobble
  • Constructor Details

    • BoatEntity

      public BoatEntity​(EntityType<? extends BoatEntity> type, World world)
    • BoatEntity

      public BoatEntity​(World world, double x, double y, double z)
  • Method Details

    • getEyeHeight

      protected float getEyeHeight​(EntityPose pose, EntityDimensions dimensions)
      Overrides:
      getEyeHeight in class Entity
    • canClimb

      protected boolean canClimb()
      Overrides:
      canClimb in class Entity
    • initDataTracker

      protected void initDataTracker()
      Specified by:
      initDataTracker in class Entity
    • collidesWith

      public boolean collidesWith​(Entity other)
      Overrides:
      collidesWith in class Entity
    • method_30959

      public static boolean method_30959​(Entity entity, Entity entity2)
    • isCollidable

      public boolean isCollidable()
      Overrides:
      isCollidable in class Entity
    • isPushable

      public boolean isPushable()
      Overrides:
      isPushable in class Entity
    • method_30633

      protected Vec3d method_30633​(Direction.Axis axis, class_5459.class_5460 class_5460)
      Overrides:
      method_30633 in class Entity
    • getMountedHeightOffset

      public double getMountedHeightOffset()
      Overrides:
      getMountedHeightOffset in class Entity
    • damage

      public boolean damage​(DamageSource source, float amount)
      Overrides:
      damage in class Entity
    • onBubbleColumnSurfaceCollision

      public void onBubbleColumnSurfaceCollision​(boolean drag)
      Overrides:
      onBubbleColumnSurfaceCollision in class Entity
    • pushAwayFrom

      public void pushAwayFrom​(Entity entity)
      Overrides:
      pushAwayFrom in class Entity
    • asItem

      public Item asItem()
    • animateDamage

      @Environment(CLIENT) public void animateDamage()
      Overrides:
      animateDamage in class Entity
    • collides

      public boolean collides()
      Overrides:
      collides in class Entity
    • updateTrackedPositionAndAngles

      @Environment(CLIENT) public void updateTrackedPositionAndAngles​(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate)
      Overrides:
      updateTrackedPositionAndAngles in class Entity
    • getMovementDirection

      public Direction getMovementDirection()
      Overrides:
      getMovementDirection in class Entity
    • tick

      public void tick()
      Overrides:
      tick in class Entity
    • handleBubbleColumn

      private void handleBubbleColumn()
    • getPaddleSoundEvent

      @Nullable protected SoundEvent getPaddleSoundEvent()
    • method_7555

      private void method_7555()
    • setPaddleMovings

      public void setPaddleMovings​(boolean leftMoving, boolean rightMoving)
    • interpolatePaddlePhase

      @Environment(CLIENT) public float interpolatePaddlePhase​(int paddle, float tickDelta)
    • checkLocation

      private BoatEntity.Location checkLocation()
    • method_7544

      public float method_7544()
    • method_7548

      public float method_7548()
    • checkBoatInWater

      private boolean checkBoatInWater()
    • getUnderWaterLocation

      @Nullable private BoatEntity.Location getUnderWaterLocation()
    • updateVelocity

      private void updateVelocity()
    • updatePaddles

      private void updatePaddles()
    • updatePassengerPosition

      public void updatePassengerPosition​(Entity passenger)
      Overrides:
      updatePassengerPosition in class Entity
    • updatePassengerForDismount

      public Vec3d updatePassengerForDismount​(LivingEntity passenger)
      Overrides:
      updatePassengerForDismount in class Entity
    • copyEntityData

      protected void copyEntityData​(Entity entity)
    • onPassengerLookAround

      @Environment(CLIENT) public void onPassengerLookAround​(Entity passenger)
      Overrides:
      onPassengerLookAround in class Entity
    • writeCustomDataToTag

      protected void writeCustomDataToTag​(CompoundTag tag)
      Specified by:
      writeCustomDataToTag in class Entity
    • readCustomDataFromTag

      protected void readCustomDataFromTag​(CompoundTag tag)
      Specified by:
      readCustomDataFromTag in class Entity
    • interact

      public ActionResult interact​(PlayerEntity player, Hand hand)
      Called when a player interacts with this entity.
      Overrides:
      interact in class Entity
      Parameters:
      player - the player
      hand - the hand the player used to interact with this entity
    • fall

      protected void fall​(double heightDifference, boolean onGround, BlockState landedState, BlockPos landedPosition)
      Overrides:
      fall in class Entity
    • isPaddleMoving

      public boolean isPaddleMoving​(int paddle)
    • setDamageWobbleStrength

      public void setDamageWobbleStrength​(float wobbleStrength)
    • getDamageWobbleStrength

      public float getDamageWobbleStrength()
    • setDamageWobbleTicks

      public void setDamageWobbleTicks​(int wobbleTicks)
    • getDamageWobbleTicks

      public int getDamageWobbleTicks()
    • setBubbleWobbleTicks

      private void setBubbleWobbleTicks​(int wobbleTicks)
    • getBubbleWobbleTicks

      private int getBubbleWobbleTicks()
    • interpolateBubbleWobble

      @Environment(CLIENT) public float interpolateBubbleWobble​(float tickDelta)
    • setDamageWobbleSide

      public void setDamageWobbleSide​(int side)
    • getDamageWobbleSide

      public int getDamageWobbleSide()
    • setBoatType

      public void setBoatType​(BoatEntity.Type type)
    • getBoatType

      public BoatEntity.Type getBoatType()
    • canAddPassenger

      protected boolean canAddPassenger​(Entity passenger)
      Overrides:
      canAddPassenger in class Entity
    • getPrimaryPassenger

      @Nullable public Entity getPrimaryPassenger()
      Overrides:
      getPrimaryPassenger in class Entity
    • setInputs

      @Environment(CLIENT) public void setInputs​(boolean pressingLeft, boolean pressingRight, boolean pressingForward, boolean pressingBack)
    • createSpawnPacket

      public Packet<?> createSpawnPacket()
      Specified by:
      createSpawnPacket in class Entity
    • isSubmergedInWater

      public boolean isSubmergedInWater()
      Returns whether this entity's hitbox is fully submerged in water.
      Overrides:
      isSubmergedInWater in class Entity
    • getPickBlockStack

      @Environment(CLIENT) public ItemStack getPickBlockStack()
      Overrides:
      getPickBlockStack in class Entity