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 classBoatEntity.Locationstatic classBoatEntity.TypeNested 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, yawFields 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 voidanimateDamage()ItemasItem()protected booleancanAddPassenger(Entity passenger)protected booleancanClimb()private booleancheckBoatInWater()private BoatEntity.LocationcheckLocation()booleancollides()booleancollidesWith(Entity other)protected voidcopyEntityData(Entity entity)Packet<?>createSpawnPacket()booleandamage(DamageSource source, float amount)protected voidfall(double heightDifference, boolean onGround, BlockState landedState, BlockPos landedPosition)BoatEntity.TypegetBoatType()private intgetBubbleWobbleTicks()intgetDamageWobbleSide()floatgetDamageWobbleStrength()intgetDamageWobbleTicks()protected floatgetEyeHeight(EntityPose pose, EntityDimensions dimensions)doublegetMountedHeightOffset()DirectiongetMovementDirection()protected SoundEventgetPaddleSoundEvent()ItemStackgetPickBlockStack()EntitygetPrimaryPassenger()private BoatEntity.LocationgetUnderWaterLocation()private voidhandleBubbleColumn()protected voidinitDataTracker()ActionResultinteract(PlayerEntity player, Hand hand)Called when a player interacts with this entity.floatinterpolateBubbleWobble(float tickDelta)floatinterpolatePaddlePhase(int paddle, float tickDelta)booleanisCollidable()booleanisPaddleMoving(int paddle)booleanisPushable()booleanisSubmergedInWater()Returns whether this entity's hitbox is fully submerged in water.protected Vec3dmethod_30633(Direction.Axis axis, class_5459.class_5460 class_5460)static booleanmethod_30959(Entity entity, Entity entity2)floatmethod_7544()floatmethod_7548()private voidmethod_7555()voidonBubbleColumnSurfaceCollision(boolean drag)voidonPassengerLookAround(Entity passenger)voidpushAwayFrom(Entity entity)protected voidreadCustomDataFromTag(CompoundTag tag)voidsetBoatType(BoatEntity.Type type)private voidsetBubbleWobbleTicks(int wobbleTicks)voidsetDamageWobbleSide(int side)voidsetDamageWobbleStrength(float wobbleStrength)voidsetDamageWobbleTicks(int wobbleTicks)voidsetInputs(boolean pressingLeft, boolean pressingRight, boolean pressingForward, boolean pressingBack)voidsetPaddleMovings(boolean leftMoving, boolean rightMoving)voidtick()private voidupdatePaddles()Vec3dupdatePassengerForDismount(LivingEntity passenger)voidupdatePassengerPosition(Entity passenger)voidupdateTrackedPositionAndAngles(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate)private voidupdateVelocity()protected voidwriteCustomDataToTag(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:
getEyeHeightin classEntity
-
canClimb
protected boolean canClimb() -
initDataTracker
protected void initDataTracker()- Specified by:
initDataTrackerin classEntity
-
collidesWith
- Overrides:
collidesWithin classEntity
-
method_30959
-
isCollidable
public boolean isCollidable()- Overrides:
isCollidablein classEntity
-
isPushable
public boolean isPushable()- Overrides:
isPushablein classEntity
-
method_30633
- Overrides:
method_30633in classEntity
-
getMountedHeightOffset
public double getMountedHeightOffset()- Overrides:
getMountedHeightOffsetin classEntity
-
damage
-
onBubbleColumnSurfaceCollision
public void onBubbleColumnSurfaceCollision(boolean drag)- Overrides:
onBubbleColumnSurfaceCollisionin classEntity
-
pushAwayFrom
- Overrides:
pushAwayFromin classEntity
-
asItem
-
animateDamage
@Environment(CLIENT) public void animateDamage()- Overrides:
animateDamagein 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:
updateTrackedPositionAndAnglesin classEntity
-
getMovementDirection
- Overrides:
getMovementDirectionin 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:
updatePassengerPositionin classEntity
-
updatePassengerForDismount
- Overrides:
updatePassengerForDismountin classEntity
-
copyEntityData
-
onPassengerLookAround
- Overrides:
onPassengerLookAroundin classEntity
-
writeCustomDataToTag
- Specified by:
writeCustomDataToTagin classEntity
-
readCustomDataFromTag
- Specified by:
readCustomDataFromTagin 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:
canAddPassengerin classEntity
-
getPrimaryPassenger
- Overrides:
getPrimaryPassengerin classEntity
-
setInputs
@Environment(CLIENT) public void setInputs(boolean pressingLeft, boolean pressingRight, boolean pressingForward, boolean pressingBack) -
createSpawnPacket
- Specified by:
createSpawnPacketin classEntity
-
isSubmergedInWater
public boolean isSubmergedInWater()Returns whether this entity's hitbox is fully submerged in water.- Overrides:
isSubmergedInWaterin classEntity
-
getPickBlockStack
- Overrides:
getPickBlockStackin classEntity
-