Package net.minecraft.entity.vehicle
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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BoatEntity.Location
static class
BoatEntity.Type
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.PositionUpdater, Entity.RemovalReason
-
Field Summary
Fields inherited from class net.minecraft.entity.Entity
age, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, inPowderSnow, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, ridingCooldown, stepHeight, submergedInWater, timeUntilRegen, touchingWater, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yaw
Fields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY
-
Constructor Summary
Constructors Constructor Description BoatEntity(EntityType<? extends BoatEntity> type, World world)
BoatEntity(World world, double x, double y, double z)
-
Method Summary
Modifier and Type Method Description void
animateDamage()
Item
asItem()
protected boolean
canAddPassenger(Entity passenger)
protected boolean
canClimb()
private boolean
checkBoatInWater()
private BoatEntity.Location
checkLocation()
boolean
collides()
boolean
collidesWith(Entity other)
protected void
copyEntityData(Entity entity)
Packet<?>
createSpawnPacket()
boolean
damage(DamageSource source, float amount)
protected void
fall(double heightDifference, boolean onGround, BlockState landedState, BlockPos landedPosition)
BoatEntity.Type
getBoatType()
private int
getBubbleWobbleTicks()
int
getDamageWobbleSide()
float
getDamageWobbleStrength()
int
getDamageWobbleTicks()
protected float
getEyeHeight(EntityPose pose, EntityDimensions dimensions)
double
getMountedHeightOffset()
Direction
getMovementDirection()
protected SoundEvent
getPaddleSoundEvent()
ItemStack
getPickBlockStack()
Entity
getPrimaryPassenger()
private BoatEntity.Location
getUnderWaterLocation()
private void
handleBubbleColumn()
protected void
initDataTracker()
ActionResult
interact(PlayerEntity player, Hand hand)
Called when a player interacts with this entity.float
interpolateBubbleWobble(float tickDelta)
float
interpolatePaddlePhase(int paddle, float tickDelta)
boolean
isCollidable()
boolean
isPaddleMoving(int paddle)
boolean
isPushable()
boolean
isSubmergedInWater()
Returns whether this entity's hitbox is fully submerged in water.protected Vec3d
method_30633(Direction.Axis axis, class_5459.class_5460 class_5460)
static boolean
method_30959(Entity entity, Entity entity2)
float
method_7544()
float
method_7548()
private void
method_7555()
void
onBubbleColumnSurfaceCollision(boolean drag)
void
onPassengerLookAround(Entity passenger)
void
pushAwayFrom(Entity entity)
protected void
readCustomDataFromTag(CompoundTag tag)
void
setBoatType(BoatEntity.Type type)
private void
setBubbleWobbleTicks(int wobbleTicks)
void
setDamageWobbleSide(int side)
void
setDamageWobbleStrength(float wobbleStrength)
void
setDamageWobbleTicks(int wobbleTicks)
void
setInputs(boolean pressingLeft, boolean pressingRight, boolean pressingForward, boolean pressingBack)
void
setPaddleMovings(boolean leftMoving, boolean rightMoving)
void
tick()
private void
updatePaddles()
Vec3d
updatePassengerForDismount(LivingEntity passenger)
void
updatePassengerPosition(Entity passenger)
void
updateTrackedPositionAndAngles(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate)
private void
updateVelocity()
protected void
writeCustomDataToTag(CompoundTag tag)
Methods inherited from class net.minecraft.entity.Entity
addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, adjustSingleAxisMovementForCollisions, afterSpawn, applyMirror, applyRotation, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAvoidTraps, canBeRiddenInWater, canBeSpectated, canExplosionDestroyBlock, canFly, canFreeze, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, copyFrom, copyPositionAndRotation, dealDamage, destroy, detach, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, entityDataRequiresOperator, equals, equipStack, extinguish, fromTag, getAir, getArmorItems, getBlockPos, getBlockX, getBlockY, getBlockZ, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getChunkPos, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeY, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHeadYaw, getHeight, getHeightOffset, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getItemsEquipped, getItemsHand, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMaxNetherPortalTime, getMinFreezeDamageTicks, getName, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPistonBehavior, getPitch, getPos, getPose, getRandomBodyY, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTags, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStandingEyeHeight, getSwimSound, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getVelocityMultiplier, getVisibilityBoundingBox, getWidth, getX, getY, getYaw, getZ, handleAttack, handleFallDamage, handleStatus, hasCustomName, hashCode, hasNetherPortalCooldown, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasVehicle, hasWings, interactAt, isAlive, isAttackable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isFreezing, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isPartOf, isPlayer, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, lookAt, method_29241, method_29919, method_30076, method_30330, method_30632, method_30634, method_30950, method_30951, method_31166, method_31473, method_31744, method_31746, method_31748, method_32318, method_32875, method_32877, method_33189, move, moveToBoundingBoxCenter, moveToWorld, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onKilledOther, onPlayerCollision, onSpawnPacket, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, onTrackedDataSet, playFlySound, playSound, playStepSound, playSwimSound, populateCrashReport, pushOutOfBlocks, raycast, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, remove, removeAllPassengers, removePassenger, removeScoreboardTag, requestTeleport, resetNetherPortalCooldown, resetPosition, saveSelfToTag, saveToTag, scheduleVelocityUpdate, sendSystemMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFireTicks, setFlag, setFrozenTicks, setGlowing, setHeadYaw, setInNetherPortal, setInPowderSnow, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setOnGround, setPos, setPose, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setYaw, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldRenderName, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, startRiding, stopRiding, streamPassengersRecursively, teleport, tickNetherPortal, tickNetherPortalCooldown, tickRiding, toListTag, toListTag, toString, toTag, unsetRemoved, updateKilledAdvancementCriterion, updateMovementInFluid, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollide
-
Field Details
-
DAMAGE_WOBBLE_TICKS
-
DAMAGE_WOBBLE_SIDE
-
DAMAGE_WOBBLE_STRENGTH
-
BOAT_TYPE
-
LEFT_PADDLE_MOVING
-
RIGHT_PADDLE_MOVING
-
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
-
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
-
BoatEntity
-
-
Method Details
-
getEyeHeight
- Overrides:
getEyeHeight
in classEntity
-
canClimb
protected boolean canClimb() -
initDataTracker
protected void initDataTracker()- Specified by:
initDataTracker
in classEntity
-
collidesWith
- Overrides:
collidesWith
in classEntity
-
method_30959
-
isCollidable
public boolean isCollidable()- Overrides:
isCollidable
in classEntity
-
isPushable
public boolean isPushable()- Overrides:
isPushable
in classEntity
-
method_30633
- Overrides:
method_30633
in classEntity
-
getMountedHeightOffset
public double getMountedHeightOffset()- Overrides:
getMountedHeightOffset
in classEntity
-
damage
-
onBubbleColumnSurfaceCollision
public void onBubbleColumnSurfaceCollision(boolean drag)- Overrides:
onBubbleColumnSurfaceCollision
in classEntity
-
pushAwayFrom
- Overrides:
pushAwayFrom
in classEntity
-
asItem
-
animateDamage
@Environment(CLIENT) public void animateDamage()- Overrides:
animateDamage
in classEntity
-
collides
public boolean collides() -
updateTrackedPositionAndAngles
@Environment(CLIENT) public void updateTrackedPositionAndAngles(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate)- Overrides:
updateTrackedPositionAndAngles
in classEntity
-
getMovementDirection
- Overrides:
getMovementDirection
in classEntity
-
tick
public void tick() -
handleBubbleColumn
private void handleBubbleColumn() -
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
-
method_7544
public float method_7544() -
method_7548
public float method_7548() -
checkBoatInWater
private boolean checkBoatInWater() -
getUnderWaterLocation
-
updateVelocity
private void updateVelocity() -
updatePaddles
private void updatePaddles() -
updatePassengerPosition
- Overrides:
updatePassengerPosition
in classEntity
-
updatePassengerForDismount
- Overrides:
updatePassengerForDismount
in classEntity
-
copyEntityData
-
onPassengerLookAround
- Overrides:
onPassengerLookAround
in classEntity
-
writeCustomDataToTag
- Specified by:
writeCustomDataToTag
in classEntity
-
readCustomDataFromTag
- Specified by:
readCustomDataFromTag
in classEntity
-
interact
Called when a player interacts with this entity. -
fall
protected void fall(double heightDifference, boolean onGround, BlockState landedState, BlockPos landedPosition) -
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
-
getBoatType
-
canAddPassenger
- Overrides:
canAddPassenger
in classEntity
-
getPrimaryPassenger
- Overrides:
getPrimaryPassenger
in classEntity
-
setInputs
@Environment(CLIENT) public void setInputs(boolean pressingLeft, boolean pressingRight, boolean pressingForward, boolean pressingBack) -
createSpawnPacket
- Specified by:
createSpawnPacket
in classEntity
-
isSubmergedInWater
public boolean isSubmergedInWater()Returns whether this entity's hitbox is fully submerged in water.- Overrides:
isSubmergedInWater
in classEntity
-
getPickBlockStack
- Overrides:
getPickBlockStack
in classEntity
-