Class FishingHook
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.entity.Entity
net.minecraft.world.entity.projectile.Projectile
net.minecraft.world.entity.projectile.FishingHook
- All Implemented Interfaces:
- CommandSource,- SyncedDataHolder,- TraceableEntity,- EntityAccess,- Nameable,- ScoreHolder,- IAttachmentHolder,- IEntityExtension,- INBTSerializable<CompoundTag>
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescription(package private) static enum(package private) static enumNested classes/interfaces inherited from class net.minecraft.world.entity.EntityEntity.MoveFunction, Entity.MovementEmission, Entity.RemovalReasonNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolderAttachmentHolder.AsField
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate booleanprivate FishingHook.FishHookStateprivate static final EntityDataAccessor<Boolean> private static final EntityDataAccessor<Integer> private floatprivate Entityprivate intprivate static final org.slf4j.Loggerprivate final intprivate final intprivate static final intprivate intprivate booleanprivate intprivate final RandomSourceprivate intprivate intFields inherited from class net.minecraft.world.entity.EntityBASE_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.AttachmentHolderATTACHMENTS_NBT_KEYFields inherited from interface net.minecraft.commands.CommandSourceNULLFields inherited from interface net.minecraft.world.scores.ScoreHolderWILDCARD, WILDCARD_NAME
- 
Constructor SummaryConstructorsModifierConstructorDescriptionFishingHook(EntityType<? extends FishingHook> p_150138_, Level p_150139_) privateFishingHook(EntityType<? extends FishingHook> p_150141_, Level p_150142_, int p_150143_, int p_150144_) FishingHook(Player p_37106_, Level p_37107_, int p_37108_, int p_37109_) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAdditionalSaveData(CompoundTag p_37161_) private booleancalculateOpenWater(BlockPos p_37159_) booleanprotected booleancanHitEntity(Entity p_37135_) private voidcatchingFish(BlockPos p_37146_) private voidprotected voiddefineSynchedData(SynchedEntityData.Builder p_326397_) protected Entity.MovementEmissionprivate FishingHook.OpenWaterTypegetOpenWaterTypeForArea(BlockPos p_37148_, BlockPos p_37149_) private FishingHook.OpenWaterTypegetOpenWaterTypeForBlock(BlockPos p_37164_) voidhandleEntityEvent(byte p_37123_) booleanvoidlerpTo(double p_37127_, double p_37128_, double p_37129_, float p_37130_, float p_37131_, int p_37132_) voidprotected voidonHitBlock(BlockHitResult p_37142_) protected voidonHitEntity(EntityHitResult p_37144_) voidonSyncedDataUpdated(EntityDataAccessor<?> p_37153_) protected voidpullEntity(Entity p_150156_) voidreadAdditionalSaveData(CompoundTag p_37151_) voidrecreateFromPacket(ClientboundAddEntityPacket p_150150_) voidremove(Entity.RemovalReason p_150146_) intprivate voidsetHookedEntity(Entity p_150158_) voidbooleanshouldRenderAtSqrDistance(double p_37125_) private booleanshouldStopFishing(Player p_37137_) voidtick()private voidupdateOwnerInfo(FishingHook p_150148_) Methods inherited from class net.minecraft.world.entity.projectile.Projectiledeflect, getEffectSource, getMovementToShoot, getOwner, getPickRadius, hitTargetOrDeflectSelf, isPickable, lerpMotion, lerpRotation, mayBreak, mayInteract, onDeflection, onHit, ownedBy, restoreFrom, shoot, shootFromRotation, updateRotationMethods inherited from class net.minecraft.world.entity.EntityabsMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, animateHurt, applyGravity, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canCollideWith, canControlVehicle, canFreeze, canRide, canSpawnSprintParticle, canSprint, canTrample, captureDrops, captureDrops, causeFallDamage, changeDimension, changeDimension, checkBelowWorld, checkDespawn, checkFallDamage, 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, getAirSupply, getAttachments, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockSpeedFactor, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForCulling, getCapability, getCapability, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getControllingPassenger, getCustomName, getDefaultGravity, getDefaultPassengerAttachmentPoint, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDismountLocationForPassenger, 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, getMotionDirection, getName, getNearestViewDirection, getOnPos, getOnPos, getOnPosLegacy, getPassengerAttachmentPoint, getPassengerClosestTo, getPassengerRidingPosition, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, getPersistentData, getPickResult, getPistonPushReaction, getPortalCooldown, getPortalWaitTime, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, getRandomX, getRandomY, getRandomZ, getRelativePortalPosition, 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, getVehicleAttachmentPoint, getViewScale, getViewVector, getViewXRot, getViewYRot, getVisualRotationYInDegrees, getX, getX, getXRot, getY, getY, getYHeadRot, getYRot, getZ, getZ, handleDamageEvent, handleInsidePortal, handleNetherPortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, hurt, igniteForSeconds, igniteForTicks, ignoreExplosion, interact, 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, isPushable, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killedEntity, lavaHurt, lerpHeadTo, lerpPositionAndRotationStep, lerpTargetX, lerpTargetXRot, lerpTargetY, lerpTargetYRot, lerpTargetZ, level, limitPistonMovement, load, lookAt, makeBoundingBox, makeStuckInBlock, markHurt, maxUpStep, maybeBackOffFromEdge, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onBelowWorld, onExplosionHit, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, onSyncedDataUpdated, pick, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, processPortalCooldown, push, push, reapplyPosition, refreshDimensions, registryAccess, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, 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, 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.AttachmentHolderdeserializeAttachments, getData, getExistingData, hasAttachments, hasData, removeData, serializeAttachmentsMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.commands.CommandSourcealwaysAcceptsMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHoldergetData, getExistingData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IEntityExtensioncanBeRiddenUnderFluidType, 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.ScoreHoldergetFeedbackDisplayName
- 
Field Details- 
LOGGERprivate static final org.slf4j.Logger LOGGER
- 
syncronizedRandom
- 
bitingprivate boolean biting
- 
outOfWaterTimeprivate int outOfWaterTime
- 
MAX_OUT_OF_WATER_TIMEprivate static final int MAX_OUT_OF_WATER_TIME- See Also:
 
- 
DATA_HOOKED_ENTITY
- 
DATA_BITING
- 
lifeprivate int life
- 
nibbleprivate int nibble
- 
timeUntilLuredprivate int timeUntilLured
- 
timeUntilHookedprivate int timeUntilHooked
- 
fishAngleprivate float fishAngle
- 
openWaterprivate boolean openWater
- 
hookedIn
- 
currentState
- 
luckprivate final int luck
- 
lureSpeedprivate final int lureSpeed
 
- 
- 
Constructor Details- 
FishingHookprivate FishingHook(EntityType<? extends FishingHook> p_150141_, Level p_150142_, int p_150143_, int p_150144_) 
- 
FishingHook
- 
FishingHook
 
- 
- 
Method Details- 
defineSynchedData- Specified by:
- defineSynchedDatain class- Entity
 
- 
onSyncedDataUpdated- Specified by:
- onSyncedDataUpdatedin interface- SyncedDataHolder
- Overrides:
- onSyncedDataUpdatedin class- Entity
 
- 
shouldRenderAtSqrDistancepublic boolean shouldRenderAtSqrDistance(double p_37125_) - Overrides:
- shouldRenderAtSqrDistancein class- Entity
 
- 
lerpTopublic void lerpTo(double p_37127_, double p_37128_, double p_37129_, float p_37130_, float p_37131_, int p_37132_) 
- 
tickpublic void tick()- Overrides:
- tickin class- Projectile
 
- 
shouldStopFishing
- 
checkCollisionprivate void checkCollision()
- 
canHitEntity- Overrides:
- canHitEntityin class- Projectile
 
- 
onHitEntity- Overrides:
- onHitEntityin class- Projectile
 
- 
onHitBlock- Overrides:
- onHitBlockin class- Projectile
 
- 
setHookedEntity
- 
catchingFish
- 
calculateOpenWater
- 
getOpenWaterTypeForArea
- 
getOpenWaterTypeForBlock
- 
isOpenWaterFishingpublic boolean isOpenWaterFishing()
- 
addAdditionalSaveData- Overrides:
- addAdditionalSaveDatain class- Projectile
 
- 
readAdditionalSaveData- Overrides:
- readAdditionalSaveDatain class- Projectile
 
- 
retrieve
- 
handleEntityEventpublic void handleEntityEvent(byte p_37123_) - Overrides:
- handleEntityEventin class- Entity
 
- 
pullEntity
- 
getMovementEmission- Overrides:
- getMovementEmissionin class- Entity
 
- 
remove
- 
onClientRemovalpublic void onClientRemoval()- Overrides:
- onClientRemovalin class- Entity
 
- 
setOwner- Overrides:
- setOwnerin class- Projectile
 
- 
updateOwnerInfo
- 
getPlayerOwner
- 
getHookedIn
- 
canChangeDimensionspublic boolean canChangeDimensions()- Overrides:
- canChangeDimensionsin class- Entity
 
- 
getAddEntityPacket- Overrides:
- getAddEntityPacketin class- Projectile
 
- 
recreateFromPacket- Overrides:
- recreateFromPacketin class- Projectile
 
 
-