public class BoatEntity extends Entity
Modifier and Type | Class and Description |
---|---|
static class |
BoatEntity.Location |
static class |
BoatEntity.Type |
Entity.PositionUpdater
age, chunkX, chunkY, chunkZ, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, removed, ridingCooldown, stepHeight, submergedInWater, teleporting, timeUntilRegen, touchingWater, updateNeeded, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yaw
DUMMY
Constructor and Description |
---|
BoatEntity(EntityType<? extends BoatEntity> type,
World world) |
BoatEntity(World world,
double x,
double y,
double z) |
Modifier and Type | Method and 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() |
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) |
addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, adjustSingleAxisMovementForCollisions, afterSpawn, applyMirror, applyRotation, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAvoidTraps, canBeRiddenInWater, canBeSpectated, canExplosionDestroyBlock, canFly, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, copyFrom, copyPositionAndRotation, dealDamage, destroy, detach, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, entityDataRequiresOperator, equals, equip, equipStack, extinguish, fromTag, getAir, getArmorItems, getBlockPos, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeY, getFireTicks, getFlag, getFluidHeight, getHeadYaw, getHeight, getHeightOffset, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getItemsEquipped, getItemsHand, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMaxNetherPortalTime, 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, isChunkPosUpdateRequested, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isPartOf, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, lookAt, method_29239, method_29241, method_29919, method_30076, method_30330, method_30632, method_30634, method_30950, method_30951, method_31166, move, moveToBoundingBoxCenter, moveToWorld, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onKilledOther, onPlayerCollision, 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, setGlowing, setHeadYaw, setInNetherPortal, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setOnGround, setPos, setPose, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setWorld, setYaw, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldRenderName, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, startRiding, stopRiding, streamPassengersRecursively, teleport, teleportRequested, tickNetherPortal, tickNetherPortalCooldown, tickRiding, toListTag, toListTag, toString, toTag, updateKilledAdvancementCriterion, updateMovementInFluid, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollide
private static final TrackedData<Integer> DAMAGE_WOBBLE_TICKS
private static final TrackedData<Integer> DAMAGE_WOBBLE_SIDE
private static final TrackedData<Float> DAMAGE_WOBBLE_STRENGTH
private static final TrackedData<Integer> BOAT_TYPE
private static final TrackedData<Boolean> LEFT_PADDLE_MOVING
private static final TrackedData<Boolean> RIGHT_PADDLE_MOVING
private static final TrackedData<Integer> BUBBLE_WOBBLE_TICKS
private final float[] paddlePhases
private float velocityDecay
private float ticksUnderwater
private float yawVelocity
private int field_7708
private double x
private double y
private double z
private double boatYaw
private double boatPitch
private boolean pressingLeft
private boolean pressingRight
private boolean pressingForward
private boolean pressingBack
private double waterLevel
private float field_7714
private BoatEntity.Location location
private BoatEntity.Location lastLocation
private double fallVelocity
private boolean onBubbleColumnSurface
private boolean bubbleColumnIsDrag
private float bubbleWobbleStrength
private float bubbleWobble
private float lastBubbleWobble
public BoatEntity(EntityType<? extends BoatEntity> type, World world)
public BoatEntity(World world, double x, double y, double z)
protected float getEyeHeight(EntityPose pose, EntityDimensions dimensions)
getEyeHeight
in class Entity
protected void initDataTracker()
initDataTracker
in class Entity
public boolean collidesWith(Entity other)
collidesWith
in class Entity
public boolean isCollidable()
isCollidable
in class Entity
public boolean isPushable()
isPushable
in class Entity
protected Vec3d method_30633(Direction.Axis axis, class_5459.class_5460 class_5460)
method_30633
in class Entity
public double getMountedHeightOffset()
getMountedHeightOffset
in class Entity
public boolean damage(DamageSource source, float amount)
public void onBubbleColumnSurfaceCollision(boolean drag)
onBubbleColumnSurfaceCollision
in class Entity
public void pushAwayFrom(Entity entity)
pushAwayFrom
in class Entity
public Item asItem()
@Environment(value=CLIENT) public void animateDamage()
animateDamage
in class Entity
@Environment(value=CLIENT) public void updateTrackedPositionAndAngles(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate)
updateTrackedPositionAndAngles
in class Entity
public Direction getMovementDirection()
getMovementDirection
in class Entity
private void handleBubbleColumn()
@Nullable protected SoundEvent getPaddleSoundEvent()
private void method_7555()
public void setPaddleMovings(boolean leftMoving, boolean rightMoving)
@Environment(value=CLIENT) public float interpolatePaddlePhase(int paddle, float tickDelta)
private BoatEntity.Location checkLocation()
public float method_7544()
public float method_7548()
private boolean checkBoatInWater()
@Nullable private BoatEntity.Location getUnderWaterLocation()
private void updateVelocity()
private void updatePaddles()
public void updatePassengerPosition(Entity passenger)
updatePassengerPosition
in class Entity
public Vec3d updatePassengerForDismount(LivingEntity passenger)
updatePassengerForDismount
in class Entity
protected void copyEntityData(Entity entity)
@Environment(value=CLIENT) public void onPassengerLookAround(Entity passenger)
onPassengerLookAround
in class Entity
protected void writeCustomDataToTag(CompoundTag tag)
writeCustomDataToTag
in class Entity
protected void readCustomDataFromTag(CompoundTag tag)
readCustomDataFromTag
in class Entity
public ActionResult interact(PlayerEntity player, Hand hand)
protected void fall(double heightDifference, boolean onGround, BlockState landedState, BlockPos landedPosition)
public boolean isPaddleMoving(int paddle)
public void setDamageWobbleStrength(float wobbleStrength)
public float getDamageWobbleStrength()
public void setDamageWobbleTicks(int wobbleTicks)
public int getDamageWobbleTicks()
private void setBubbleWobbleTicks(int wobbleTicks)
private int getBubbleWobbleTicks()
@Environment(value=CLIENT) public float interpolateBubbleWobble(float tickDelta)
public void setDamageWobbleSide(int side)
public int getDamageWobbleSide()
public void setBoatType(BoatEntity.Type type)
public BoatEntity.Type getBoatType()
protected boolean canAddPassenger(Entity passenger)
canAddPassenger
in class Entity
@Nullable public Entity getPrimaryPassenger()
getPrimaryPassenger
in class Entity
@Environment(value=CLIENT) public void setInputs(boolean pressingLeft, boolean pressingRight, boolean pressingForward, boolean pressingBack)
public Packet<?> createSpawnPacket()
createSpawnPacket
in class Entity
public boolean isSubmergedInWater()
isSubmergedInWater
in class Entity