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 class
BoatEntity.Status
static class
BoatEntity.Type
-
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.IMoveCallback
-
-
Field Summary
Fields Modifier and Type Field Description private float
bubbleAngle
private float
bubbleAngleO
private boolean
bubbleColumnDirectionIsDown
private float
bubbleMultiplier
private static DataParameter<java.lang.Integer>
DATA_ID_BUBBLE_TIME
private static DataParameter<java.lang.Float>
DATA_ID_DAMAGE
private static DataParameter<java.lang.Integer>
DATA_ID_HURT
private static DataParameter<java.lang.Integer>
DATA_ID_HURTDIR
private static DataParameter<java.lang.Boolean>
DATA_ID_PADDLE_LEFT
private static DataParameter<java.lang.Boolean>
DATA_ID_PADDLE_RIGHT
private static DataParameter<java.lang.Integer>
DATA_ID_TYPE
private float
deltaRotation
private boolean
inputDown
private boolean
inputLeft
private boolean
inputRight
private boolean
inputUp
private float
invFriction
private boolean
isAboveBubbleColumn
private float
landFriction
private double
lastYd
private int
lerpSteps
private double
lerpX
private double
lerpXRot
private double
lerpY
private double
lerpYRot
private double
lerpZ
private BoatEntity.Status
oldStatus
private float
outOfControlTicks
private float[]
paddlePositions
private BoatEntity.Status
status
private double
waterLevel
-
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 void
addAdditionalSaveData(CompoundNBT p_213281_1_)
protected void
addPassenger(Entity passenger)
void
animateHurt()
protected boolean
canAddPassenger(Entity p_184219_1_)
boolean
canBeCollidedWith()
boolean
canCollideWith(Entity p_241849_1_)
static boolean
canVehicleCollide(Entity p_242378_0_, Entity p_242378_1_)
protected void
checkFallDamage(double p_184231_1_, boolean p_184231_3_, BlockState p_184231_4_, BlockPos p_184231_5_)
private boolean
checkInWater()
protected void
clampRotation(Entity p_184454_1_)
private void
controlBoat()
protected void
defineSynchedData()
private void
floatBoat()
IPacket<?>
getAddEntityPacket()
BoatEntity.Type
getBoatType()
float
getBubbleAngle(float p_203056_1_)
private int
getBubbleTime()
Entity
getControllingPassenger()
float
getDamage()
Vector3d
getDismountLocationForPassenger(LivingEntity p_230268_1_)
Item
getDropItem()
protected float
getEyeHeight(Pose p_213316_1_, EntitySize p_213316_2_)
float
getGroundFriction()
int
getHurtDir()
int
getHurtTime()
Direction
getMotionDirection()
protected SoundEvent
getPaddleSound()
boolean
getPaddleState(int p_184457_1_)
double
getPassengersRidingOffset()
protected Vector3d
getRelativePortalPosition(Direction.Axis p_241839_1_, TeleportationRepositioner.Result p_241839_2_)
float
getRowingTime(int p_184448_1_, float p_184448_2_)
private BoatEntity.Status
getStatus()
float
getWaterLevelAbove()
boolean
hurt(DamageSource p_70097_1_, float p_70097_2_)
ActionResultType
interact(PlayerEntity p_184230_1_, Hand p_184230_2_)
protected boolean
isMovementNoisy()
boolean
isPickable()
boolean
isPushable()
private BoatEntity.Status
isUnderwater()
boolean
isUnderWater()
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_)
void
onAboveBubbleCol(boolean p_203002_1_)
void
onPassengerTurned(Entity p_184190_1_)
void
positionRider(Entity p_184232_1_)
void
push(Entity p_70108_1_)
protected void
readAdditionalSaveData(CompoundNBT p_70037_1_)
private void
setBubbleTime(int p_203055_1_)
void
setDamage(float p_70266_1_)
void
setHurtDir(int p_70269_1_)
void
setHurtTime(int p_70265_1_)
void
setInput(boolean p_184442_1_, boolean p_184442_2_, boolean p_184442_3_, boolean p_184442_4_)
void
setPaddleState(boolean p_184445_1_, boolean p_184445_2_)
void
setType(BoatEntity.Type p_184458_1_)
void
tick()
private void
tickBubbleColumn()
private void
tickLerp()
-
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:
getEyeHeight
in classEntity
-
isMovementNoisy
protected boolean isMovementNoisy()
- Overrides:
isMovementNoisy
in classEntity
-
defineSynchedData
protected void defineSynchedData()
- Specified by:
defineSynchedData
in classEntity
-
canCollideWith
public boolean canCollideWith(Entity p_241849_1_)
- Overrides:
canCollideWith
in classEntity
-
canBeCollidedWith
public boolean canBeCollidedWith()
- Overrides:
canBeCollidedWith
in classEntity
-
isPushable
public boolean isPushable()
- Overrides:
isPushable
in classEntity
-
getRelativePortalPosition
protected Vector3d getRelativePortalPosition(Direction.Axis p_241839_1_, TeleportationRepositioner.Result p_241839_2_)
- Overrides:
getRelativePortalPosition
in classEntity
-
getPassengersRidingOffset
public double getPassengersRidingOffset()
- Overrides:
getPassengersRidingOffset
in classEntity
-
hurt
public boolean hurt(DamageSource p_70097_1_, float p_70097_2_)
-
onAboveBubbleCol
public void onAboveBubbleCol(boolean p_203002_1_)
- Overrides:
onAboveBubbleCol
in classEntity
-
getDropItem
public Item getDropItem()
-
animateHurt
public void animateHurt()
- Overrides:
animateHurt
in classEntity
-
isPickable
public boolean isPickable()
- Overrides:
isPickable
in 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:
getMotionDirection
in 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:
positionRider
in classEntity
-
getDismountLocationForPassenger
public Vector3d getDismountLocationForPassenger(LivingEntity p_230268_1_)
- Overrides:
getDismountLocationForPassenger
in classEntity
-
clampRotation
protected void clampRotation(Entity p_184454_1_)
-
onPassengerTurned
public void onPassengerTurned(Entity p_184190_1_)
- Overrides:
onPassengerTurned
in classEntity
-
addAdditionalSaveData
protected void addAdditionalSaveData(CompoundNBT p_213281_1_)
- Specified by:
addAdditionalSaveData
in classEntity
-
readAdditionalSaveData
protected void readAdditionalSaveData(CompoundNBT p_70037_1_)
- Specified by:
readAdditionalSaveData
in 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:
checkFallDamage
in 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:
canAddPassenger
in classEntity
-
getControllingPassenger
@Nullable public Entity getControllingPassenger()
- Overrides:
getControllingPassenger
in 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:
getAddEntityPacket
in classEntity
-
isUnderWater
public boolean isUnderWater()
- Overrides:
isUnderWater
in classEntity
-
addPassenger
protected void addPassenger(Entity passenger)
- Overrides:
addPassenger
in classEntity
-
-