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
,ICapabilityProviderImpl<Entity>
,ICapabilitySerializable<CompoundTag>
,IForgeBoat
,IForgeEntity
,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
ChestBoat
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.MovementEmission, Entity.RemovalReason
Nested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
private float
private float
private boolean
private float
private static final EntityDataAccessor<Integer>
private static final EntityDataAccessor<Float>
private static final EntityDataAccessor<Integer>
private static final EntityDataAccessor<Integer>
private static final EntityDataAccessor<Boolean>
private static final EntityDataAccessor<Boolean>
private static final 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 final int
static final int
static final double
private static final float
private final float[]
private Boat.Status
private static final 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_0_2, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5, DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0, ENTITY_COUNTER, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, forgeFluidTypeHeight, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, isInsidePortal, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, minorHorizontalCollision, moveDist, noCulling, noPhysics, PASSENGERS_TAG, portalEntrancePos, portalTime, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, verticalCollisionBelow, 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
animateHurt
(float p_265761_) 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
protected void
destroy
(DamageSource p_219862_) private void
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 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_) protected float
private Boat.Status
float
boolean
hasEnoughSpaceFor
(Entity p_273171_) 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_) protected void
positionRider
(Entity p_289552_, Entity.MoveFunction p_289571_) 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
setVariant
(Boat.Type p_38333_) void
tick()
private void
private void
tickLerp()
Methods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addTag, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canBeHitByProjectile, canChangeDimensions, canEnterPose, canFreeze, canRide, canSpawnSprintParticle, canSprint, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, causeFallDamage, changeDimension, changeDimension, checkBelowWorld, checkDespawn, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, fixupDimensions, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAllSlots, getArmorSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForCulling, getBoundingBoxForPose, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDimensionsForge, getDirection, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getHandHoldingItemAngle, getHandSlots, getId, getIndirectPassengers, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMaxHeightFluidType, getMyRidingOffset, getName, getNameTagOffsetY, getOnPos, getOnPos, getOnPosLegacy, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPortalCooldown, getPortalWaitTime, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, 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, getVisualRotationYInDegrees, getX, getX, getXRot, getY, getY, getYHeadRot, getYRot, getZ, getZ, handleDamageEvent, handleEntityEvent, handleInsidePortal, handleNetherPortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, ignoreExplosion, interactAt, is, isAddedToWorld, isAlive, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCurrentlyGlowing, isCustomNameVisible, isDescending, isDiscrete, isEffectiveAi, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInFluidType, isInFluidType, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWall, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isSwimming, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killedEntity, lavaHurt, lerpHeadTo, lerpMotion, level, limitPistonMovement, load, lookAt, makeBoundingBox, makeStuckInBlock, markHurt, maxUpStep, maybeBackOffFromEdge, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAddedToWorld, onBelowWorld, onClientRemoval, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onRemovedFromWorld, onSyncedDataUpdated, onSyncedDataUpdated, pick, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, processFlappingMovement, processPortalCooldown, push, reapplyPosition, recreateFromPacket, refreshDimensions, remove, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rideTick, rotate, save, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setItemSlot, setLevel, setLevelCallback, setMaxUpStep, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithKnownMovement, setPortalCooldown, 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, syncPacketPositionCodec, teleportRelative, teleportTo, teleportTo, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, trackingPosition, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming, waterSwimSound
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.IForgeBoat
canBoatInFluid, canBoatInFluid, shouldUpdateFluidWhileRiding
Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canSwimInFluidType, deserializeNBT, getClassification, getEyeHeightForge, getFluidFallDistanceModifier, getFluidMotionScale, getParts, getPickedResult, getSoundFromFluidType, getStepHeight, hasCustomOutlineRendering, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, serializeNBT, shouldRiderSit, shouldUpdateFluidWhileBoating
-
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:
-
PADDLE_RIGHT
public static final int PADDLE_RIGHT- See Also:
-
TIME_TO_EJECT
private static final int TIME_TO_EJECT- See Also:
-
PADDLE_SPEED
private static final float PADDLE_SPEED- See Also:
-
PADDLE_SOUND_TIME
public static final double PADDLE_SOUND_TIME- See Also:
-
BUBBLE_TIME
public static final int BUBBLE_TIME- See Also:
-
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
-
destroy
-
onAboveBubbleCol
public void onAboveBubbleCol(boolean p_38381_) - Overrides:
onAboveBubbleCol
in classEntity
-
push
-
getDropItem
-
animateHurt
public void animateHurt(float p_265761_) - 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() -
getSinglePassengerXOffset
protected float getSinglePassengerXOffset() -
hasEnoughSpaceFor
-
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() -
setVariant
-
getVariant
-
canAddPassenger
- Overrides:
canAddPassenger
in classEntity
-
getMaxPassengers
protected int getMaxPassengers() -
getControllingPassenger
- Overrides:
getControllingPassenger
in classEntity
-
setInput
public void setInput(boolean p_38343_, boolean p_38344_, boolean p_38345_, boolean p_38346_) -
isUnderWater
public boolean isUnderWater()- Overrides:
isUnderWater
in classEntity
-
addPassenger
- Overrides:
addPassenger
in classEntity
-
getPickResult
- Overrides:
getPickResult
in classEntity
-