Class Boat
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.entity.Entity
net.minecraft.world.entity.vehicle.VehicleEntity
net.minecraft.world.entity.vehicle.Boat
- All Implemented Interfaces:
CommandSource,SyncedDataHolder,VariantHolder<Boat.Type>,EntityAccess,Nameable,ScoreHolder,IAttachmentHolder,IBoatExtension,IEntityExtension,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
ChestBoat
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.MovementEmission, Entity.RemovalReasonNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate floatprivate floatprivate booleanprivate floatprivate static final EntityDataAccessor<Integer> private static final EntityDataAccessor<Boolean> private static final EntityDataAccessor<Boolean> private static final EntityDataAccessor<Integer> private floatprivate booleanprivate booleanprivate booleanprivate booleanprivate floatprivate booleanprivate floatprivate doubleprivate intprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate Boat.Statusprivate floatstatic final intstatic final intstatic final doubleprivate static final floatprivate final float[]private Boat.Statusprivate static final intprivate doubleFields inherited from class net.minecraft.world.entity.vehicle.VehicleEntity
DATA_ID_DAMAGE, DATA_ID_HURT, DATA_ID_HURTDIRFields inherited from class net.minecraft.world.entity.Entity
BASE_SAFE_FALL_DISTANCE, BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, CONTENTS_SLOT_INDEX, 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, zOldFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.commands.CommandSource
NULLFields inherited from interface net.minecraft.world.scores.ScoreHolder
WILDCARD, WILDCARD_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAdditionalSaveData(CompoundTag p_38359_) voidanimateHurt(float p_265761_) protected booleancanAddPassenger(Entity p_38390_) booleanbooleancanCollideWith(Entity p_38376_) static booleancanVehicleCollide(Entity p_38324_, Entity p_38325_) protected voidcheckFallDamage(double p_38307_, boolean p_38308_, BlockState p_38309_, BlockPos p_38310_) private booleanprotected voidclampRotation(Entity p_38322_) private voidprotected voiddefineSynchedData(SynchedEntityData.Builder p_326198_) private voidfloatgetBubbleAngle(float p_38353_) private intprotected doublegetDismountLocationForPassenger(LivingEntity p_38357_) floatprotected intprotected Entity.MovementEmissionprotected SoundEventbooleangetPaddleState(int p_38314_) protected Vec3getPassengerAttachmentPoint(Entity p_294665_, EntityDimensions p_295933_, float p_295585_) protected Vec3getRelativePortalPosition(Direction.Axis p_38335_, BlockUtil.FoundRectangle p_38336_) floatgetRowingTime(int p_38316_, float p_38317_) protected floatprivate Boat.Statusprotected ComponentfloatbooleanhasEnoughSpaceFor(Entity p_273171_) interact(Player p_38330_, InteractionHand p_38331_) booleanbooleanprivate Boat.StatusbooleandoublefloatdoublefloatdoublevoidlerpTo(double p_38299_, double p_38300_, double p_38301_, float p_38302_, float p_38303_, int p_38304_) voidonAboveBubbleCol(boolean p_38381_) voidonPassengerTurned(Entity p_38383_) protected voidpositionRider(Entity p_289552_, Entity.MoveFunction p_289571_) voidprotected voidreadAdditionalSaveData(CompoundTag p_38338_) private voidsetBubbleTime(int p_38367_) voidsetInput(boolean p_38343_, boolean p_38344_, boolean p_38345_, boolean p_38346_) voidsetPaddleState(boolean p_38340_, boolean p_38341_) voidsetVariant(Boat.Type p_38333_) voidtick()private voidprivate voidtickLerp()Methods inherited from class net.minecraft.world.entity.vehicle.VehicleEntity
destroy, destroy, getDamage, getHurtDir, getHurtTime, hurt, setDamage, setHurtDir, setHurtTime, shouldSourceDestroyMethods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, applyGravity, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canBeHitByProjectile, canChangeDimensions, canControlVehicle, canFreeze, canRide, canSpawnSprintParticle, canSprint, canTrample, captureDrops, captureDrops, causeFallDamage, changeDimension, changeDimension, checkBelowWorld, checkDespawn, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, deflection, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, fixupDimensions, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAttachments, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForCulling, getCapability, getCapability, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getCustomName, getDefaultPassengerAttachmentPoint, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getGravity, getHandHoldingItemAngle, getId, getInBlockState, getIndirectPassengers, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMaxHeightFluidType, getName, getNearestViewDirection, getOnPos, getOnPos, getOnPosLegacy, getPassengerClosestTo, getPassengerRidingPosition, 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, getUpVector, getUUID, getVehicle, getVehicleAttachmentPoint, 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, igniteForSeconds, igniteForTicks, 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, isInLiquid, 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, lerpPositionAndRotationStep, level, limitPistonMovement, load, lookAt, makeBoundingBox, makeStuckInBlock, markHurt, maxUpStep, maybeBackOffFromEdge, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAddedToWorld, onBelowWorld, onClientRemoval, onExplosionHit, 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, registryAccess, remove, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rideTick, rotate, save, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setData, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithKnownMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRot, 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, updateInWaterStateAndDoFluidPushing, updateSwimming, waterSwimSoundMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, removeData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.commands.CommandSource
alwaysAcceptsMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBoatExtension
canBoatInFluid, canBoatInFluidMethods inherited from interface net.neoforged.neoforge.common.extensions.IEntityExtension
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canSwimInFluidType, copyAttachmentsFrom, deserializeNBT, getClassification, getFluidFallDistanceModifier, getFluidMotionScale, getParts, getPickedResult, getSoundFromFluidType, hasCustomOutlineRendering, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, sendPairingData, serializeNBT, shouldRiderSitMethods inherited from interface net.minecraft.world.scores.ScoreHolder
getFeedbackDisplayName
-
Field Details
-
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
-
getMovementEmission
- Overrides:
getMovementEmissionin classEntity
-
defineSynchedData
- Overrides:
defineSynchedDatain classVehicleEntity
-
canCollideWith
- Overrides:
canCollideWithin classEntity
-
canVehicleCollide
-
canBeCollidedWith
public boolean canBeCollidedWith()- Overrides:
canBeCollidedWithin classEntity
-
isPushable
public boolean isPushable()- Overrides:
isPushablein classEntity
-
getRelativePortalPosition
protected Vec3 getRelativePortalPosition(Direction.Axis p_38335_, BlockUtil.FoundRectangle p_38336_) - Overrides:
getRelativePortalPositionin classEntity
-
getPassengerAttachmentPoint
protected Vec3 getPassengerAttachmentPoint(Entity p_294665_, EntityDimensions p_295933_, float p_295585_) - Overrides:
getPassengerAttachmentPointin classEntity
-
onAboveBubbleCol
public void onAboveBubbleCol(boolean p_38381_) - Overrides:
onAboveBubbleColin classEntity
-
push
-
getDropItem
- Specified by:
getDropItemin classVehicleEntity
-
animateHurt
public void animateHurt(float p_265761_) - Overrides:
animateHurtin classEntity
-
isPickable
public boolean isPickable()- Overrides:
isPickablein classEntity
-
lerpTo
public void lerpTo(double p_38299_, double p_38300_, double p_38301_, float p_38302_, float p_38303_, int p_38304_) -
lerpTargetX
public double lerpTargetX()- Overrides:
lerpTargetXin classEntity
-
lerpTargetY
public double lerpTargetY()- Overrides:
lerpTargetYin classEntity
-
lerpTargetZ
public double lerpTargetZ()- Overrides:
lerpTargetZin classEntity
-
lerpTargetXRot
public float lerpTargetXRot()- Overrides:
lerpTargetXRotin classEntity
-
lerpTargetYRot
public float lerpTargetYRot()- Overrides:
lerpTargetYRotin classEntity
-
getMotionDirection
- Overrides:
getMotionDirectionin 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
-
getDefaultGravity
protected double getDefaultGravity()- Overrides:
getDefaultGravityin classEntity
-
floatBoat
private void floatBoat() -
controlBoat
private void controlBoat() -
getSinglePassengerXOffset
protected float getSinglePassengerXOffset() -
hasEnoughSpaceFor
-
positionRider
- Overrides:
positionRiderin classEntity
-
getDismountLocationForPassenger
- Overrides:
getDismountLocationForPassengerin classEntity
-
clampRotation
-
onPassengerTurned
- Overrides:
onPassengerTurnedin classEntity
-
addAdditionalSaveData
- Specified by:
addAdditionalSaveDatain classEntity
-
readAdditionalSaveData
- Specified by:
readAdditionalSaveDatain classEntity
-
interact
-
checkFallDamage
protected void checkFallDamage(double p_38307_, boolean p_38308_, BlockState p_38309_, BlockPos p_38310_) - Overrides:
checkFallDamagein classEntity
-
getPaddleState
public boolean getPaddleState(int p_38314_) -
setBubbleTime
private void setBubbleTime(int p_38367_) -
getBubbleTime
private int getBubbleTime() -
getBubbleAngle
public float getBubbleAngle(float p_38353_) -
setVariant
- Specified by:
setVariantin interfaceVariantHolder<Boat.Type>
-
getVariant
- Specified by:
getVariantin interfaceVariantHolder<Boat.Type>
-
canAddPassenger
- Overrides:
canAddPassengerin classEntity
-
getMaxPassengers
protected int getMaxPassengers() -
getControllingPassenger
- Overrides:
getControllingPassengerin classEntity
-
setInput
public void setInput(boolean p_38343_, boolean p_38344_, boolean p_38345_, boolean p_38346_) -
getTypeName
- Overrides:
getTypeNamein classEntity
-
isUnderWater
public boolean isUnderWater()- Overrides:
isUnderWaterin classEntity
-
getPickResult
- Overrides:
getPickResultin classEntity
-