Class Boat
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<Entity>
net.minecraft.world.entity.Entity
net.minecraft.world.entity.vehicle.Boat
- All Implemented Interfaces:
CommandSource
,EntityAccess
,Nameable
,ICapabilityProvider
,ICapabilitySerializable<CompoundTag>
,IForgeEntity
,INBTSerializable<CompoundTag>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.MovementEmission, Entity.RemovalReason
-
Field Summary
Modifier and TypeFieldDescriptionstatic int
private float
private float
private boolean
private float
private static EntityDataAccessor<Integer>
private static EntityDataAccessor<Float>
private static EntityDataAccessor<Integer>
private static EntityDataAccessor<Integer>
private static EntityDataAccessor<Boolean>
private static EntityDataAccessor<Boolean>
private static EntityDataAccessor<Integer>
private float
private boolean
private boolean
private boolean
private boolean
private float
private boolean
private float
private double
private int
private double
private double
private double
private double
private double
private Boat.Status
private float
static int
static int
static double
private static double
private float[]
private Boat.Status
private static int
private double
Fields inherited from class net.minecraft.world.entity.Entity
BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, BREATHING_DISTANCE_BELOW_EYES, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, DELTA_AFFECTED_BY_BLOCKS_BELOW, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, fluidOnEyes, flyDist, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, isInsidePortal, level, LOGGER, MAX_ENTITY_TAG_COUNT, maxUpStep, moveDist, noCulling, noPhysics, onGround, PASSENGERS_TAG, portalEntrancePos, portalTime, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, walkDist, walkDistO, wasEyeInWater, wasInPowderSnow, wasOnFire, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOld
Fields inherited from interface net.minecraft.commands.CommandSource
NULL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAdditionalSaveData(CompoundTag p_38359_)
protected void
addPassenger(Entity passenger)
void
protected boolean
canAddPassenger(Entity p_38390_)
boolean
boolean
canCollideWith(Entity p_38376_)
static boolean
canVehicleCollide(Entity p_38324_, Entity p_38325_)
protected void
checkFallDamage(double p_38307_, boolean p_38308_, BlockState p_38309_, BlockPos p_38310_)
private boolean
protected void
clampRotation(Entity p_38322_)
private void
protected void
private void
Packet<?>
float
getBubbleAngle(float p_38353_)
private int
float
getDismountLocationForPassenger(LivingEntity p_38357_)
protected float
getEyeHeight(Pose p_38327_, EntityDimensions p_38328_)
float
int
int
protected Entity.MovementEmission
protected SoundEvent
boolean
getPaddleState(int p_38314_)
double
protected Vec3
getRelativePortalPosition(Direction.Axis p_38335_, BlockUtil.FoundRectangle p_38336_)
float
getRowingTime(int p_38316_, float p_38317_)
private Boat.Status
float
boolean
hurt(DamageSource p_38319_, float p_38320_)
interact(Player p_38330_, InteractionHand p_38331_)
boolean
boolean
private Boat.Status
boolean
void
lerpTo(double p_38299_, double p_38300_, double p_38301_, float p_38302_, float p_38303_, int p_38304_, boolean p_38305_)
void
onAboveBubbleCol(boolean p_38381_)
void
onPassengerTurned(Entity p_38383_)
void
positionRider(Entity p_38379_)
void
protected void
readAdditionalSaveData(CompoundTag p_38338_)
private void
setBubbleTime(int p_38367_)
void
setDamage(float p_38312_)
void
setHurtDir(int p_38363_)
void
setHurtTime(int p_38355_)
void
setInput(boolean p_38343_, boolean p_38344_, boolean p_38345_, boolean p_38346_)
void
setPaddleState(boolean p_38340_, boolean p_38341_)
void
void
tick()
private void
private void
tickLerp()
Methods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addTag, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canChangeDimensions, canEnterPose, canFreeze, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, causeFallDamage, changeDimension, changeDimension, checkDespawn, checkInsideBlocks, checkOutOfWorld, chunkPosition, clearFire, closerThan, collideBoundingBox, collideBoundingBoxHeuristically, collideBoundingBoxLegacy, copyPosition, createCommandSourceStack, createHoverEvent, discard, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, eyeBlockPosition, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, gameEvent, gameEvent, gameEvent, gameEvent, getAirSupply, getAllSlots, getArmorSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForCulling, getBoundingBoxForPose, getBrightness, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getForward, getGameEventListenerRegistrar, getHandSlots, getId, getIndirectPassengers, getLeashOffset, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMyRidingOffset, getName, getOnPos, getPacketCoordinates, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPortalWaitTime, getPose, getPosition, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSlot, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getViewYRot, getX, getX, getXRot, getY, getY, getYHeadRot, getYRot, getZ, getZ, handleEntityEvent, handleInsidePortal, handleNetherPortal, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, ignoreExplosion, interactAt, is, isAddedToWorld, isAlive, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCurrentlyGlowing, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFlapping, isFree, isFullyFrozen, isIgnoringBlockTriggers, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWall, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killed, lavaHurt, lerpHeadTo, lerpMotion, limitPistonMovement, load, lookAt, makeBoundingBox, makeStuckInBlock, markHurt, maybeBackOffFromEdge, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, occludesVibrations, onAddedToWorld, onClientRemoval, onFlap, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onRemovedFromWorld, onSyncedDataUpdated, outOfWorld, pick, playEntityOnFireExtinguishedSound, playerTouch, playSound, playStepSound, playSwimSound, position, processFlappingMovement, processPortalCooldown, push, reapplyPosition, recreateFromPacket, refreshDimensions, remove, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, restoreFrom, revive, rideableUnderWater, rideTick, rotate, save, saveAsPassenger, saveWithoutId, sendMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setItemSlot, setLevelCallback, setNoGravity, setOldPosAndRot, setOnGround, setPacketCoordinates, setPacketCoordinates, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRot, setSecondsOnFire, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSprinting, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYBodyRot, setYHeadRot, setYRot, shouldBeSaved, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, shouldShowName, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopRiding, stopSeenByPlayer, teleportTo, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, tryCheckInsideBlocks, turn, unRide, unsetRemoved, 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.minecraft.commands.CommandSource
alwaysAccepts
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getParts, getPickedResult, isMultipartEntity, serializeNBT, shouldRiderSit
-
Field Details
-
DATA_ID_HURT
-
DATA_ID_HURTDIR
-
DATA_ID_DAMAGE
-
DATA_ID_TYPE
-
DATA_ID_PADDLE_LEFT
-
DATA_ID_PADDLE_RIGHT
-
DATA_ID_BUBBLE_TIME
-
PADDLE_LEFT
public static final int PADDLE_LEFT- See Also:
- Constant Field Values
-
PADDLE_RIGHT
public static final int PADDLE_RIGHT- See Also:
- Constant Field Values
-
TIME_TO_EJECT
private static final int TIME_TO_EJECT- See Also:
- Constant Field Values
-
PADDLE_SPEED
private static final double PADDLE_SPEED- See Also:
- Constant Field Values
-
PADDLE_SOUND_TIME
public static final double PADDLE_SOUND_TIME- See Also:
- Constant Field Values
-
BUBBLE_TIME
public static final int BUBBLE_TIME- See Also:
- Constant Field Values
-
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
-
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 Details
-
Boat
-
Boat
-
-
Method Details
-
getEyeHeight
- Overrides:
getEyeHeight
in classEntity
-
getMovementEmission
- Overrides:
getMovementEmission
in classEntity
-
defineSynchedData
protected void defineSynchedData()- Specified by:
defineSynchedData
in classEntity
-
canCollideWith
- Overrides:
canCollideWith
in classEntity
-
canVehicleCollide
-
canBeCollidedWith
public boolean canBeCollidedWith()- Overrides:
canBeCollidedWith
in classEntity
-
isPushable
public boolean isPushable()- Overrides:
isPushable
in classEntity
-
getRelativePortalPosition
protected Vec3 getRelativePortalPosition(Direction.Axis p_38335_, BlockUtil.FoundRectangle p_38336_)- Overrides:
getRelativePortalPosition
in classEntity
-
getPassengersRidingOffset
public double getPassengersRidingOffset()- Overrides:
getPassengersRidingOffset
in classEntity
-
hurt
-
onAboveBubbleCol
public void onAboveBubbleCol(boolean p_38381_)- Overrides:
onAboveBubbleCol
in classEntity
-
push
-
getDropItem
-
animateHurt
public void animateHurt()- Overrides:
animateHurt
in classEntity
-
isPickable
public boolean isPickable()- Overrides:
isPickable
in classEntity
-
lerpTo
public void lerpTo(double p_38299_, double p_38300_, double p_38301_, float p_38302_, float p_38303_, int p_38304_, boolean p_38305_) -
getMotionDirection
- Overrides:
getMotionDirection
in classEntity
-
tick
public void tick() -
tickBubbleColumn
private void tickBubbleColumn() -
getPaddleSound
-
tickLerp
private void tickLerp() -
setPaddleState
public void setPaddleState(boolean p_38340_, boolean p_38341_) -
getRowingTime
public float getRowingTime(int p_38316_, float p_38317_) -
getStatus
-
getWaterLevelAbove
public float getWaterLevelAbove() -
getGroundFriction
public float getGroundFriction() -
checkInWater
private boolean checkInWater() -
isUnderwater
-
floatBoat
private void floatBoat() -
controlBoat
private void controlBoat() -
positionRider
- Overrides:
positionRider
in classEntity
-
getDismountLocationForPassenger
- Overrides:
getDismountLocationForPassenger
in classEntity
-
clampRotation
-
onPassengerTurned
- Overrides:
onPassengerTurned
in classEntity
-
addAdditionalSaveData
- Specified by:
addAdditionalSaveData
in classEntity
-
readAdditionalSaveData
- Specified by:
readAdditionalSaveData
in classEntity
-
interact
-
checkFallDamage
protected void checkFallDamage(double p_38307_, boolean p_38308_, BlockState p_38309_, BlockPos p_38310_)- Overrides:
checkFallDamage
in classEntity
-
getPaddleState
public boolean getPaddleState(int p_38314_) -
setDamage
public void setDamage(float p_38312_) -
getDamage
public float getDamage() -
setHurtTime
public void setHurtTime(int p_38355_) -
getHurtTime
public int getHurtTime() -
setBubbleTime
private void setBubbleTime(int p_38367_) -
getBubbleTime
private int getBubbleTime() -
getBubbleAngle
public float getBubbleAngle(float p_38353_) -
setHurtDir
public void setHurtDir(int p_38363_) -
getHurtDir
public int getHurtDir() -
setType
-
getBoatType
-
canAddPassenger
- Overrides:
canAddPassenger
in classEntity
-
getControllingPassenger
- Overrides:
getControllingPassenger
in classEntity
-
setInput
public void setInput(boolean p_38343_, boolean p_38344_, boolean p_38345_, boolean p_38346_) -
getAddEntityPacket
- Specified by:
getAddEntityPacket
in classEntity
-
isUnderWater
public boolean isUnderWater()- Overrides:
isUnderWater
in classEntity
-
addPassenger
- Overrides:
addPassenger
in classEntity
-
getPickResult
- Overrides:
getPickResult
in classEntity
-