Class BoatEntity

All Implemented Interfaces:
ICommandSource, INameable, ICapabilityProvider, ICapabilitySerializable<CompoundNBT>, IForgeEntity, INBTSerializable<CompoundNBT>

public class BoatEntity extends Entity
  • Field Details

    • DATA_ID_HURT

      private static final DataParameter<Integer> DATA_ID_HURT
    • DATA_ID_HURTDIR

      private static final DataParameter<Integer> DATA_ID_HURTDIR
    • DATA_ID_DAMAGE

      private static final DataParameter<Float> DATA_ID_DAMAGE
    • DATA_ID_TYPE

      private static final DataParameter<Integer> DATA_ID_TYPE
    • DATA_ID_PADDLE_LEFT

      private static final DataParameter<Boolean> DATA_ID_PADDLE_LEFT
    • DATA_ID_PADDLE_RIGHT

      private static final DataParameter<Boolean> DATA_ID_PADDLE_RIGHT
    • DATA_ID_BUBBLE_TIME

      private static final DataParameter<Integer> DATA_ID_BUBBLE_TIME
    • paddlePositions

      private final float[] paddlePositions
    • invFriction

      private float invFriction
    • outOfControlTicks

      private float outOfControlTicks
    • deltaRotation

      private float deltaRotation
    • lerpSteps

      private int lerpSteps
    • lerpX

      private double lerpX
    • lerpY

      private double lerpY
    • lerpZ

      private double lerpZ
    • lerpYRot

      private double lerpYRot
    • lerpXRot

      private double lerpXRot
    • inputLeft

      private boolean inputLeft
    • inputRight

      private boolean inputRight
    • inputUp

      private boolean inputUp
    • inputDown

      private boolean inputDown
    • waterLevel

      private double waterLevel
    • landFriction

      private float landFriction
    • status

      private BoatEntity.Status status
    • oldStatus

      private BoatEntity.Status oldStatus
    • lastYd

      private double lastYd
    • isAboveBubbleColumn

      private boolean isAboveBubbleColumn
    • bubbleColumnDirectionIsDown

      private boolean bubbleColumnDirectionIsDown
    • bubbleMultiplier

      private float bubbleMultiplier
    • bubbleAngle

      private float bubbleAngle
    • bubbleAngleO

      private float bubbleAngleO
  • Constructor Details

    • BoatEntity

      public BoatEntity(EntityType<? extends BoatEntity> p_i50129_1_, World p_i50129_2_)
    • BoatEntity

      public BoatEntity(World p_i1705_1_, double p_i1705_2_, double p_i1705_4_, double p_i1705_6_)
  • Method Details

    • getEyeHeight

      protected float getEyeHeight(Pose p_213316_1_, EntitySize p_213316_2_)
      Overrides:
      getEyeHeight in class Entity
    • isMovementNoisy

      protected boolean isMovementNoisy()
      Overrides:
      isMovementNoisy in class Entity
    • defineSynchedData

      protected void defineSynchedData()
      Specified by:
      defineSynchedData in class Entity
    • canCollideWith

      public boolean canCollideWith(Entity p_241849_1_)
      Overrides:
      canCollideWith in class Entity
    • canVehicleCollide

      public static boolean canVehicleCollide(Entity p_242378_0_, Entity p_242378_1_)
    • canBeCollidedWith

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

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

      protected Vector3d getRelativePortalPosition(Direction.Axis p_241839_1_, TeleportationRepositioner.Result p_241839_2_)
      Overrides:
      getRelativePortalPosition in class Entity
    • getPassengersRidingOffset

      public double getPassengersRidingOffset()
      Overrides:
      getPassengersRidingOffset in class Entity
    • hurt

      public boolean hurt(DamageSource p_70097_1_, float p_70097_2_)
      Overrides:
      hurt in class Entity
    • onAboveBubbleCol

      public void onAboveBubbleCol(boolean p_203002_1_)
      Overrides:
      onAboveBubbleCol in class Entity
    • push

      public void push(Entity p_70108_1_)
      Overrides:
      push in class Entity
    • getDropItem

      public Item getDropItem()
    • animateHurt

      public void animateHurt()
      Overrides:
      animateHurt in class Entity
    • isPickable

      public boolean isPickable()
      Overrides:
      isPickable in class Entity
    • lerpTo

      public void lerpTo(double p_180426_1_, double p_180426_3_, double p_180426_5_, float p_180426_7_, float p_180426_8_, int p_180426_9_, boolean p_180426_10_)
      Overrides:
      lerpTo in class Entity
    • getMotionDirection

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

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

      private void tickBubbleColumn()
    • getPaddleSound

      @Nullable protected SoundEvent getPaddleSound()
    • tickLerp

      private void tickLerp()
    • setPaddleState

      public void setPaddleState(boolean p_184445_1_, boolean p_184445_2_)
    • getRowingTime

      public float getRowingTime(int p_184448_1_, float p_184448_2_)
    • getStatus

      private BoatEntity.Status getStatus()
    • getWaterLevelAbove

      public float getWaterLevelAbove()
    • getGroundFriction

      public float getGroundFriction()
    • checkInWater

      private boolean checkInWater()
    • isUnderwater

      @Nullable private BoatEntity.Status isUnderwater()
    • floatBoat

      private void floatBoat()
    • controlBoat

      private void controlBoat()
    • positionRider

      public void positionRider(Entity p_184232_1_)
      Overrides:
      positionRider in class Entity
    • getDismountLocationForPassenger

      public Vector3d getDismountLocationForPassenger(LivingEntity p_230268_1_)
      Overrides:
      getDismountLocationForPassenger in class Entity
    • clampRotation

      protected void clampRotation(Entity p_184454_1_)
    • onPassengerTurned

      public void onPassengerTurned(Entity p_184190_1_)
      Overrides:
      onPassengerTurned in class Entity
    • addAdditionalSaveData

      protected void addAdditionalSaveData(CompoundNBT p_213281_1_)
      Specified by:
      addAdditionalSaveData in class Entity
    • readAdditionalSaveData

      protected void readAdditionalSaveData(CompoundNBT p_70037_1_)
      Specified by:
      readAdditionalSaveData in class Entity
    • interact

      public ActionResultType interact(PlayerEntity p_184230_1_, Hand p_184230_2_)
      Overrides:
      interact in class Entity
    • checkFallDamage

      protected void checkFallDamage(double p_184231_1_, boolean p_184231_3_, BlockState p_184231_4_, BlockPos p_184231_5_)
      Overrides:
      checkFallDamage in class Entity
    • getPaddleState

      public boolean getPaddleState(int p_184457_1_)
    • setDamage

      public void setDamage(float p_70266_1_)
    • getDamage

      public float getDamage()
    • setHurtTime

      public void setHurtTime(int p_70265_1_)
    • getHurtTime

      public int getHurtTime()
    • setBubbleTime

      private void setBubbleTime(int p_203055_1_)
    • getBubbleTime

      private int getBubbleTime()
    • getBubbleAngle

      public float getBubbleAngle(float p_203056_1_)
    • setHurtDir

      public void setHurtDir(int p_70269_1_)
    • getHurtDir

      public int getHurtDir()
    • setType

      public void setType(BoatEntity.Type p_184458_1_)
    • getBoatType

      public BoatEntity.Type getBoatType()
    • canAddPassenger

      protected boolean canAddPassenger(Entity p_184219_1_)
      Overrides:
      canAddPassenger in class Entity
    • getControllingPassenger

      @Nullable public Entity getControllingPassenger()
      Overrides:
      getControllingPassenger in class Entity
    • setInput

      public void setInput(boolean p_184442_1_, boolean p_184442_2_, boolean p_184442_3_, boolean p_184442_4_)
    • getAddEntityPacket

      public IPacket<?> getAddEntityPacket()
      Specified by:
      getAddEntityPacket in class Entity
    • isUnderWater

      public boolean isUnderWater()
      Overrides:
      isUnderWater in class Entity
    • addPassenger

      protected void addPassenger(Entity passenger)
      Overrides:
      addPassenger in class Entity