Package net.minecraft.entity.item
Class BoatEntity
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<Entity>
-
- net.minecraft.entity.Entity
-
- net.minecraft.entity.item.BoatEntity
-
- All Implemented Interfaces:
ICommandSource,INameable,ICapabilityProvider,ICapabilitySerializable<CompoundNBT>,IForgeEntity,INBTSerializable<CompoundNBT>
public class BoatEntity extends Entity
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBoatEntity.Statusstatic classBoatEntity.Type-
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.IMoveCallback
-
-
Field Summary
Fields Modifier and Type Field Description private floatbubbleAngleprivate floatbubbleAngleOprivate booleanbubbleColumnDirectionIsDownprivate floatbubbleMultiplierprivate static DataParameter<java.lang.Integer>DATA_ID_BUBBLE_TIMEprivate static DataParameter<java.lang.Float>DATA_ID_DAMAGEprivate static DataParameter<java.lang.Integer>DATA_ID_HURTprivate static DataParameter<java.lang.Integer>DATA_ID_HURTDIRprivate static DataParameter<java.lang.Boolean>DATA_ID_PADDLE_LEFTprivate static DataParameter<java.lang.Boolean>DATA_ID_PADDLE_RIGHTprivate static DataParameter<java.lang.Integer>DATA_ID_TYPEprivate floatdeltaRotationprivate booleaninputDownprivate booleaninputLeftprivate booleaninputRightprivate booleaninputUpprivate floatinvFrictionprivate booleanisAboveBubbleColumnprivate floatlandFrictionprivate doublelastYdprivate intlerpStepsprivate doublelerpXprivate doublelerpXRotprivate doublelerpYprivate doublelerpYRotprivate doublelerpZprivate BoatEntity.StatusoldStatusprivate floatoutOfControlTicksprivate float[]paddlePositionsprivate BoatEntity.Statusstatusprivate doublewaterLevel-
Fields inherited from class net.minecraft.entity.Entity
blocksBuilding, boardingCooldown, DATA_POSE, DATA_SHARED_FLAGS_ID, ENTITY_COUNTER, entityData, fallDistance, firstTick, fluidHeight, fluidOnEyes, forcedLoading, glowing, hasImpulse, horizontalCollision, hurtMarked, inChunk, invulnerableTime, isInsidePortal, level, LOGGER, maxUpStep, moveDist, noCulling, noPhysics, onGround, portalEntrancePos, portalTime, pushthrough, random, removed, stringUUID, stuckSpeedMultiplier, tickCount, uuid, verticalCollision, walkDist, walkDistO, wasEyeInWater, wasTouchingWater, xChunk, xo, xOld, xRot, xRotO, yChunk, yo, yOld, yRot, yRotO, zChunk, zo, zOld
-
Fields inherited from interface net.minecraft.command.ICommandSource
NULL
-
-
Constructor Summary
Constructors Constructor Description BoatEntity(EntityType<? extends BoatEntity> p_i50129_1_, World p_i50129_2_)BoatEntity(World p_i1705_1_, double p_i1705_2_, double p_i1705_4_, double p_i1705_6_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAdditionalSaveData(CompoundNBT p_213281_1_)protected voidaddPassenger(Entity passenger)voidanimateHurt()protected booleancanAddPassenger(Entity p_184219_1_)booleancanBeCollidedWith()booleancanCollideWith(Entity p_241849_1_)static booleancanVehicleCollide(Entity p_242378_0_, Entity p_242378_1_)protected voidcheckFallDamage(double p_184231_1_, boolean p_184231_3_, BlockState p_184231_4_, BlockPos p_184231_5_)private booleancheckInWater()protected voidclampRotation(Entity p_184454_1_)private voidcontrolBoat()protected voiddefineSynchedData()private voidfloatBoat()IPacket<?>getAddEntityPacket()BoatEntity.TypegetBoatType()floatgetBubbleAngle(float p_203056_1_)private intgetBubbleTime()EntitygetControllingPassenger()floatgetDamage()Vector3dgetDismountLocationForPassenger(LivingEntity p_230268_1_)ItemgetDropItem()protected floatgetEyeHeight(Pose p_213316_1_, EntitySize p_213316_2_)floatgetGroundFriction()intgetHurtDir()intgetHurtTime()DirectiongetMotionDirection()protected SoundEventgetPaddleSound()booleangetPaddleState(int p_184457_1_)doublegetPassengersRidingOffset()protected Vector3dgetRelativePortalPosition(Direction.Axis p_241839_1_, TeleportationRepositioner.Result p_241839_2_)floatgetRowingTime(int p_184448_1_, float p_184448_2_)private BoatEntity.StatusgetStatus()floatgetWaterLevelAbove()booleanhurt(DamageSource p_70097_1_, float p_70097_2_)ActionResultTypeinteract(PlayerEntity p_184230_1_, Hand p_184230_2_)protected booleanisMovementNoisy()booleanisPickable()booleanisPushable()private BoatEntity.StatusisUnderwater()booleanisUnderWater()voidlerpTo(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_)voidonAboveBubbleCol(boolean p_203002_1_)voidonPassengerTurned(Entity p_184190_1_)voidpositionRider(Entity p_184232_1_)voidpush(Entity p_70108_1_)protected voidreadAdditionalSaveData(CompoundNBT p_70037_1_)private voidsetBubbleTime(int p_203055_1_)voidsetDamage(float p_70266_1_)voidsetHurtDir(int p_70269_1_)voidsetHurtTime(int p_70265_1_)voidsetInput(boolean p_184442_1_, boolean p_184442_2_, boolean p_184442_3_, boolean p_184442_4_)voidsetPaddleState(boolean p_184445_1_, boolean p_184445_2_)voidsetType(BoatEntity.Type p_184458_1_)voidtick()private voidtickBubbleColumn()private voidtickLerp()-
Methods inherited from class net.minecraft.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addTag, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canChangeDimensions, canEnterPose, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, causeFallDamage, changeDimension, changeDimension, checkAndResetForcedChunkAdditionFlag, checkAndResetUpdateChunkPos, checkDespawn, checkInsideBlocks, clearFire, closerThan, collideBoundingBox, collideBoundingBoxHeuristically, collideBoundingBoxLegacy, copyPosition, createCommandSourceStack, createHoverEvent, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, getAirSupply, getAllSlots, getArmorSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBoundingBox, getBoundingBoxForCulling, getBoundingBoxForPose, getBrightness, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyePosition, getEyeY, getFireImmuneTicks, getFluidHeight, getFluidJumpThreshold, getForward, getHandSlots, getHorizontalDistanceSqr, getId, getIndirectPassengers, getLeashOffset, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMyRidingOffset, getName, getOnPos, getPacketCoordinates, getPassengers, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPortalWaitTime, getPose, getPosition, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getViewYRot, getX, getX, getY, getY, getYHeadRot, getZ, getZ, handleEntityEvent, handleInsidePortal, handleNetherPortal, hasCustomName, hashCode, hasIndirectPassenger, hasOnePlayerPassenger, hasPassenger, hasPassenger, hasPermissions, ignoreExplosion, interactAt, is, isAddedToWorld, isAlive, isAlliedTo, isAlliedTo, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFree, isGlowing, isIgnoringBlockTriggers, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWall, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPushedByFluid, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killed, lavaHurt, lerpHeadTo, lerpMotion, limitPistonMovement, load, lookAt, makeFlySound, makeStuckInBlock, markHurt, maybeBackOffFromEdge, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAddedToWorld, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onRemovedFromWorld, onSyncedDataUpdated, outOfWorld, pick, playerTouch, playFlySound, playSound, playStepSound, playSwimSound, position, processPortalCooldown, push, reapplyPosition, refreshDimensions, remove, remove, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetPos, restoreFrom, revive, rideableUnderWater, rideTick, rotate, save, saveAsPassenger, saveWithoutId, sendMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setGlowing, setId, setInvisible, setInvulnerable, setItemSlot, setLevel, setLocationFromBoundingbox, setNoGravity, setOnGround, setPacketCoordinates, setPacketCoordinates, setPortalCooldown, setPos, setPosAndOldPos, setPose, setPosRaw, setRemainingFireTicks, setRot, setSecondsOnFire, setSharedFlag, setShiftKeyDown, setSilent, setSlot, setSprinting, setSwimming, setUUID, setViewScale, setYBodyRot, setYHeadRot, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, shouldShowName, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopRiding, stopSeenByPlayer, teleportTo, teleportToWithTicket, thunderHit, toString, turn, unRide, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming
-
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getDimensionsForge, getEntity, getEyeHeightForge, getParts, getPickedResult, isMultipartEntity, serializeNBT, shouldRiderSit
-
-
-
-
Field Detail
-
DATA_ID_HURT
private static final DataParameter<java.lang.Integer> DATA_ID_HURT
-
DATA_ID_HURTDIR
private static final DataParameter<java.lang.Integer> DATA_ID_HURTDIR
-
DATA_ID_DAMAGE
private static final DataParameter<java.lang.Float> DATA_ID_DAMAGE
-
DATA_ID_TYPE
private static final DataParameter<java.lang.Integer> DATA_ID_TYPE
-
DATA_ID_PADDLE_LEFT
private static final DataParameter<java.lang.Boolean> DATA_ID_PADDLE_LEFT
-
DATA_ID_PADDLE_RIGHT
private static final DataParameter<java.lang.Boolean> DATA_ID_PADDLE_RIGHT
-
DATA_ID_BUBBLE_TIME
private static final DataParameter<java.lang.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 Detail
-
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 Detail
-
getEyeHeight
protected float getEyeHeight(Pose p_213316_1_, EntitySize p_213316_2_)
- Overrides:
getEyeHeightin classEntity
-
isMovementNoisy
protected boolean isMovementNoisy()
- Overrides:
isMovementNoisyin classEntity
-
defineSynchedData
protected void defineSynchedData()
- Specified by:
defineSynchedDatain classEntity
-
canCollideWith
public boolean canCollideWith(Entity p_241849_1_)
- Overrides:
canCollideWithin classEntity
-
canBeCollidedWith
public boolean canBeCollidedWith()
- Overrides:
canBeCollidedWithin classEntity
-
isPushable
public boolean isPushable()
- Overrides:
isPushablein classEntity
-
getRelativePortalPosition
protected Vector3d getRelativePortalPosition(Direction.Axis p_241839_1_, TeleportationRepositioner.Result p_241839_2_)
- Overrides:
getRelativePortalPositionin classEntity
-
getPassengersRidingOffset
public double getPassengersRidingOffset()
- Overrides:
getPassengersRidingOffsetin classEntity
-
hurt
public boolean hurt(DamageSource p_70097_1_, float p_70097_2_)
-
onAboveBubbleCol
public void onAboveBubbleCol(boolean p_203002_1_)
- Overrides:
onAboveBubbleColin classEntity
-
getDropItem
public Item getDropItem()
-
animateHurt
public void animateHurt()
- Overrides:
animateHurtin classEntity
-
isPickable
public boolean isPickable()
- Overrides:
isPickablein classEntity
-
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_)
-
getMotionDirection
public Direction getMotionDirection()
- Overrides:
getMotionDirectionin classEntity
-
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:
positionRiderin classEntity
-
getDismountLocationForPassenger
public Vector3d getDismountLocationForPassenger(LivingEntity p_230268_1_)
- Overrides:
getDismountLocationForPassengerin classEntity
-
clampRotation
protected void clampRotation(Entity p_184454_1_)
-
onPassengerTurned
public void onPassengerTurned(Entity p_184190_1_)
- Overrides:
onPassengerTurnedin classEntity
-
addAdditionalSaveData
protected void addAdditionalSaveData(CompoundNBT p_213281_1_)
- Specified by:
addAdditionalSaveDatain classEntity
-
readAdditionalSaveData
protected void readAdditionalSaveData(CompoundNBT p_70037_1_)
- Specified by:
readAdditionalSaveDatain classEntity
-
interact
public ActionResultType interact(PlayerEntity p_184230_1_, Hand p_184230_2_)
-
checkFallDamage
protected void checkFallDamage(double p_184231_1_, boolean p_184231_3_, BlockState p_184231_4_, BlockPos p_184231_5_)- Overrides:
checkFallDamagein classEntity
-
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:
canAddPassengerin classEntity
-
getControllingPassenger
@Nullable public Entity getControllingPassenger()
- Overrides:
getControllingPassengerin classEntity
-
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:
getAddEntityPacketin classEntity
-
isUnderWater
public boolean isUnderWater()
- Overrides:
isUnderWaterin classEntity
-
addPassenger
protected void addPassenger(Entity passenger)
- Overrides:
addPassengerin classEntity
-
-