public class BoatEntity extends Entity
| Modifier and Type | Class and Description |
|---|---|
static class |
BoatEntity.Status |
static class |
BoatEntity.Type |
Entity.IMoveCallback| Modifier and Type | Field and Description |
|---|---|
private boolean |
backInputDown |
private static DataParameter<java.lang.Integer> |
BOAT_TYPE |
private float |
boatGlide |
private static DataParameter<java.lang.Float> |
DAMAGE_TAKEN |
private float |
deltaRotation |
private static DataParameter<java.lang.Boolean> |
field_199704_e |
private static DataParameter<java.lang.Boolean> |
field_199705_f |
private boolean |
field_203060_aN |
private static DataParameter<java.lang.Integer> |
FORWARD_DIRECTION |
private boolean |
forwardInputDown |
private double |
lastYd |
private boolean |
leftInputDown |
private double |
lerpPitch |
private int |
lerpSteps |
private double |
lerpX |
private double |
lerpY |
private double |
lerpYaw |
private double |
lerpZ |
private float |
momentum |
private float |
outOfControlTicks |
private float[] |
paddlePositions |
private BoatEntity.Status |
previousStatus |
private float |
prevRockingAngle |
private boolean |
rightInputDown |
private boolean |
rocking |
private static DataParameter<java.lang.Integer> |
ROCKING_TICKS |
private float |
rockingAngle |
private float |
rockingIntensity |
private BoatEntity.Status |
status |
private static DataParameter<java.lang.Integer> |
TIME_SINCE_HIT |
private double |
waterLevel |
addedToChunk, cachedUniqueIdString, chunkCoordX, chunkCoordY, chunkCoordZ, collided, collidedHorizontally, collidedVertically, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, eyesInWater, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, hurtResistantTime, ignoreFrustumCheck, inLava, inPortal, inWater, isAirBorne, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, LOGGER, motionMultiplier, noClip, onGround, portalCounter, POSE, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, removed, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, submergedHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, worldDUMMY| Constructor and Description |
|---|
BoatEntity(EntityType<? extends BoatEntity> p_i50129_1_,
World p_i50129_2_) |
BoatEntity(World worldIn,
double x,
double y,
double z) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPassenger(Entity passenger) |
void |
applyEntityCollision(Entity entityIn) |
void |
applyOrientationToEntity(Entity entityToUpdate) |
protected void |
applyYawToEntity(Entity entityToUpdate) |
boolean |
attackEntityFrom(DamageSource source,
float amount) |
boolean |
canBeCollidedWith() |
boolean |
canBePushed() |
protected boolean |
canFitPassenger(Entity passenger) |
protected boolean |
canTriggerWalking() |
private boolean |
checkInWater() |
private void |
controlBoat() |
IPacket<?> |
createSpawnPacket() |
Direction |
getAdjustedHorizontalFacing() |
float |
getBoatGlide() |
private BoatEntity.Status |
getBoatStatus() |
BoatEntity.Type |
getBoatType() |
AxisAlignedBB |
getCollisionBoundingBox() |
AxisAlignedBB |
getCollisionBox(Entity entityIn) |
Entity |
getControllingPassenger() |
float |
getDamageTaken() |
int |
getForwardDirection() |
Item |
getItemBoat() |
double |
getMountedYOffset() |
protected SoundEvent |
getPaddleSound() |
boolean |
getPaddleState(int side) |
float |
getRockingAngle(float partialTicks) |
private int |
getRockingTicks() |
float |
getRowingTime(int side,
float limbSwing) |
int |
getTimeSinceHit() |
private BoatEntity.Status |
getUnderwaterStatus() |
float |
getWaterLevelAbove() |
void |
onEnterBubbleColumnWithAirAbove(boolean downwards) |
void |
performHurtAnimation() |
boolean |
processInitialInteract(PlayerEntity player,
Hand hand) |
protected void |
readAdditional(CompoundNBT compound) |
protected void |
registerData() |
void |
setBoatType(BoatEntity.Type boatType) |
void |
setDamageTaken(float damageTaken) |
void |
setForwardDirection(int forwardDirection) |
void |
setPaddleState(boolean left,
boolean right) |
void |
setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int posRotationIncrements,
boolean teleport) |
private void |
setRockingTicks(int p_203055_1_) |
void |
setTimeSinceHit(int timeSinceHit) |
void |
tick() |
private void |
tickLerp() |
protected void |
updateFallState(double y,
boolean onGroundIn,
BlockState state,
BlockPos pos) |
void |
updateInputs(boolean p_184442_1_,
boolean p_184442_2_,
boolean p_184442_3_,
boolean p_184442_4_) |
private void |
updateMotion() |
void |
updatePassenger(Entity passenger) |
private void |
updateRocking() |
protected void |
writeAdditional(CompoundNBT compound) |
addTag, addTrackingPlayer, addVelocity, allowLogging, applyEnchantments, applyPlayerInteraction, areEyesInFluid, areEyesInFluid, awardKillScore, baseTick, calculateUpVector, canBeAttackedWithItem, canBeRidden, canBeRiddenInWater, canExplosionDestroyBlock, canPassengerSteer, canRenderOnFire, canSwim, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkDespawn, collideBoundingBox, collideBoundingBoxHeuristically, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, detach, determineNextStepDistance, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, entityDropItem, entityDropItem, entityDropItem, entityDropItem, equals, extinguish, fillCrashReport, forceSetPosition, getAir, getAllowedMovement, getAlwaysRenderNameTagForRender, getArmorInventoryList, getBoundingBox, getBoundingBox, getBrightness, getCachedUniqueIdString, getCollisionBorderSize, getCommandSource, getCustomName, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getEyeHeight, getEyeHeight, getEyePosition, getFireImmuneTicks, getFireTimer, getFlag, getForward, getHeight, getHeldEquipment, getHighspeedSplashSound, getHorizontalFacing, getHoverEvent, getJumpFactor, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxAir, getMaxFallHeight, getMaxInPortalTime, getMirroredYaw, getMotion, getName, getOnPosition, getPassengers, getPermissionLevel, getPersistentData, getPitch, getPitchYaw, getPortalCooldown, getPose, getPosition, getPositionUnderneath, getPositionVec, getPositionVector, getPosX, getPosXRandom, getPosXWidth, getPosY, getPosYEye, getPosYHeight, getPosYRandom, getPosZ, getPosZRandom, getPosZWidth, getProfessionName, getPushReaction, getRecursivePassengers, getRenderBoundingBox, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getRotationYawHead, getScoreboardName, getSelfAndPassengers, getServer, getSize, getSoundCategory, getSpeedFactor, getSplashSound, getSubmergedHeight, getSwimSound, getTags, getTeam, getTeamColor, getTeleportDirection, getType, getUniqueID, getUpVector, getVectorForRotation, getWidth, getYaw, getYOffset, handleFluidAcceleration, handlePistonMovement, handleStatusUpdate, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hasPermissionLevel, hitByEntity, horizontalMag, ignoreItemEntityData, isActualySwimming, isAddedToWorld, isAlive, isBeingRidden, isBurning, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEntityEqual, isEntityInsideOpaqueBlock, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInvisible, isInvisibleToPlayer, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubbleColumn, isInWaterRainOrBubbleColumn, isLiving, isNonBoss, isOffsetPositionInLiquid, isOnePlayerRiding, isOnSameTeam, isOnScoreboardTeam, isPassenger, isPassenger, isPassenger, isPoseClear, isPushedByWater, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isVisuallySwimming, isWet, lookAt, makeFlySound, markVelocityChanged, maybeBackOffFromEdge, move, moveForced, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, notifyDataManagerChange, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onInsideBlock, onKillCommand, onKillEntity, onLivingFall, onRemovedFromWorld, onStruckByLightning, outOfWorld, pick, playFlySound, playSound, playStepSound, playSwimSound, positionRider, preparePlayerToSpawn, pushOutOfBlocks, read, recalculateSize, recenterBoundingBox, remove, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, replaceItemInInventory, repositionDirectPassengers, resetPositionToBB, revive, rotateTowards, sendMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFire, setFireTimer, setFlag, setGlowing, setHeadRotation, setInLava, setInvisible, setInvulnerable, setItemStackToSlot, setLocationAndAngles, setMotion, setMotion, setMotionMultiplier, setNoGravity, setOnFireFromLava, setPacketCoordinates, setPortal, setPose, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRawPosition, setRenderDistanceWeight, setRenderYawOffset, setRotation, setRotationYawHead, setSilent, setSneaking, setSprinting, setSwimming, setUniqueId, setVelocity, setWorld, shouldReceiveErrors, shouldReceiveFeedback, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, startRiding, stopRiding, teleportKeepLoaded, toString, updatePortal, updateRidden, updateSwimming, writeUnlessPassenger, writeUnlessRemoved, writeWithoutTypeIdareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsclone, finalize, getClass, notify, notifyAll, wait, wait, waitcanBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getPickedResult, serializeNBT, shouldRiderSitgetCapability, getCapabilityprivate static final DataParameter<java.lang.Integer> TIME_SINCE_HIT
private static final DataParameter<java.lang.Integer> FORWARD_DIRECTION
private static final DataParameter<java.lang.Float> DAMAGE_TAKEN
private static final DataParameter<java.lang.Integer> BOAT_TYPE
private static final DataParameter<java.lang.Boolean> field_199704_e
private static final DataParameter<java.lang.Boolean> field_199705_f
private static final DataParameter<java.lang.Integer> ROCKING_TICKS
private final float[] paddlePositions
private float momentum
private float outOfControlTicks
private float deltaRotation
private int lerpSteps
private double lerpX
private double lerpY
private double lerpZ
private double lerpYaw
private double lerpPitch
private boolean leftInputDown
private boolean rightInputDown
private boolean forwardInputDown
private boolean backInputDown
private double waterLevel
private float boatGlide
private BoatEntity.Status status
private BoatEntity.Status previousStatus
private double lastYd
private boolean rocking
private boolean field_203060_aN
private float rockingIntensity
private float rockingAngle
private float prevRockingAngle
public BoatEntity(EntityType<? extends BoatEntity> p_i50129_1_, World p_i50129_2_)
public BoatEntity(World worldIn, double x, double y, double z)
protected boolean canTriggerWalking()
canTriggerWalking in class Entityprotected void registerData()
registerData in class Entity@Nullable public AxisAlignedBB getCollisionBox(Entity entityIn)
getCollisionBox in class Entity@Nullable public AxisAlignedBB getCollisionBoundingBox()
getCollisionBoundingBox in class Entitypublic boolean canBePushed()
canBePushed in class Entitypublic double getMountedYOffset()
getMountedYOffset in class Entitypublic boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom in class Entitypublic void onEnterBubbleColumnWithAirAbove(boolean downwards)
onEnterBubbleColumnWithAirAbove in class Entitypublic void applyEntityCollision(Entity entityIn)
applyEntityCollision in class Entitypublic Item getItemBoat()
public void performHurtAnimation()
performHurtAnimation in class Entitypublic boolean canBeCollidedWith()
canBeCollidedWith in class Entitypublic void setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int posRotationIncrements,
boolean teleport)
setPositionAndRotationDirect in class Entitypublic Direction getAdjustedHorizontalFacing()
getAdjustedHorizontalFacing in class Entityprivate void updateRocking()
@Nullable protected SoundEvent getPaddleSound()
private void tickLerp()
public void setPaddleState(boolean left,
boolean right)
public float getRowingTime(int side,
float limbSwing)
private BoatEntity.Status getBoatStatus()
public float getWaterLevelAbove()
public float getBoatGlide()
private boolean checkInWater()
@Nullable private BoatEntity.Status getUnderwaterStatus()
private void updateMotion()
private void controlBoat()
public void updatePassenger(Entity passenger)
updatePassenger in class Entityprotected void applyYawToEntity(Entity entityToUpdate)
public void applyOrientationToEntity(Entity entityToUpdate)
applyOrientationToEntity in class Entityprotected void writeAdditional(CompoundNBT compound)
writeAdditional in class Entityprotected void readAdditional(CompoundNBT compound)
readAdditional in class Entitypublic boolean processInitialInteract(PlayerEntity player, Hand hand)
processInitialInteract in class Entityprotected void updateFallState(double y,
boolean onGroundIn,
BlockState state,
BlockPos pos)
updateFallState in class Entitypublic boolean getPaddleState(int side)
public void setDamageTaken(float damageTaken)
public float getDamageTaken()
public void setTimeSinceHit(int timeSinceHit)
public int getTimeSinceHit()
private void setRockingTicks(int p_203055_1_)
private int getRockingTicks()
public float getRockingAngle(float partialTicks)
public void setForwardDirection(int forwardDirection)
public int getForwardDirection()
public void setBoatType(BoatEntity.Type boatType)
public BoatEntity.Type getBoatType()
protected boolean canFitPassenger(Entity passenger)
canFitPassenger in class Entity@Nullable public Entity getControllingPassenger()
getControllingPassenger in class Entitypublic void updateInputs(boolean p_184442_1_,
boolean p_184442_2_,
boolean p_184442_3_,
boolean p_184442_4_)
public IPacket<?> createSpawnPacket()
createSpawnPacket in class Entityprotected void addPassenger(Entity passenger)
addPassenger in class Entity