Package net.minecraft.entity.projectile
Class FishingBobberEntity
java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.projectile.ProjectileEntity
net.minecraft.entity.projectile.FishingBobberEntity
- All Implemented Interfaces:
CommandOutput
,Nameable
public class FishingBobberEntity extends ProjectileEntity
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
FishingBobberEntity.PositionType
(package private) static class
FishingBobberEntity.State
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.PositionUpdater
-
Field Summary
Fields Modifier and Type Field Description private static TrackedData<Boolean>
CAUGHT_FISH
private boolean
caughtFish
private float
fishAngle
private int
fishTravelCountdown
private static TrackedData<Integer>
HOOK_ENTITY_ID
private int
hookCountdown
private Entity
hookedEntity
private boolean
inOpenWater
private int
luckOfTheSeaLevel
private int
lureLevel
private int
outOfOpenWaterTicks
private int
removalTimer
private FishingBobberEntity.State
state
private Random
velocityRandom
private int
waitCountdown
Fields inherited from class net.minecraft.entity.Entity
age, chunkX, chunkY, chunkZ, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, removed, ridingCooldown, stepHeight, submergedInWater, teleporting, timeUntilRegen, touchingWater, updateNeeded, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yaw
Fields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY
-
Constructor Summary
Constructors Modifier Constructor Description FishingBobberEntity(PlayerEntity thrower, World world, int lureLevel, int luckOfTheSeaLevel)
FishingBobberEntity(World world, PlayerEntity thrower, double x, double y, double z)
private
FishingBobberEntity(World world, PlayerEntity owner, int lureLevel, int luckOfTheSeaLevel)
-
Method Summary
Modifier and Type Method Description protected boolean
canClimb()
boolean
canUsePortals()
private void
checkForCollision()
Packet<?>
createSpawnPacket()
Entity
getHookedEntity()
PlayerEntity
getPlayerOwner()
private FishingBobberEntity.PositionType
getPositionType(BlockPos pos)
private FishingBobberEntity.PositionType
getPositionType(BlockPos start, BlockPos end)
void
handleStatus(byte status)
protected void
initDataTracker()
boolean
isInOpenWater()
private boolean
isOpenOrWaterAround(BlockPos pos)
protected boolean
method_26958(Entity entity)
protected void
onBlockHit(BlockHitResult blockHitResult)
protected void
onEntityHit(EntityHitResult entityHitResult)
void
onTrackedDataSet(TrackedData<?> data)
protected void
pullHookedEntity()
void
readCustomDataFromTag(CompoundTag tag)
void
remove()
private boolean
removeIfInvalid(PlayerEntity playerEntity)
boolean
shouldRender(double distance)
void
tick()
private void
tickFishingLogic(BlockPos pos)
private void
updateHookedEntityId()
void
updateTrackedPositionAndAngles(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate)
int
use(ItemStack usedItem)
void
writeCustomDataToTag(CompoundTag tag)
Methods inherited from class net.minecraft.entity.projectile.ProjectileEntity
getOwner, method_26962, onCollision, setOwner, setProperties, setVelocity, setVelocityClient, updateRotation
Methods inherited from class net.minecraft.entity.Entity
addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, adjustSingleAxisMovementForCollisions, afterSpawn, animateDamage, applyMirror, applyRotation, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeRiddenInWater, canBeSpectated, canExplosionDestroyBlock, canFly, canStartRiding, changeLookDirection, checkBlockCollision, checkDespawn, collides, collidesWith, copyFrom, copyPositionAndRotation, damage, dealDamage, destroy, detach, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, entityDataRequiresOperator, equals, equip, equipStack, extinguish, fall, fromTag, getAir, getArmorItems, getBlockPos, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeHeight, getEyeY, getFireTicks, getFlag, getFluidHeight, getHeadYaw, getHeight, getHeightOffset, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getItemsEquipped, getItemsHand, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMaxNetherPortalTime, getMountedHeightOffset, getMovementDirection, getName, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPistonBehavior, getPitch, getPos, getPose, getPrimaryPassenger, getRandomBodyY, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTags, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStandingEyeHeight, getSwimSound, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getVelocityMultiplier, getVisibilityBoundingBox, getWidth, getX, getY, getYaw, getZ, handleAttack, handleFallDamage, hasCustomName, hashCode, hasNetherPortalCooldown, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasVehicle, hasWings, interact, interactAt, isAlive, isAttackable, isChunkPosUpdateRequested, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isPartOf, isPushable, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, lookAt, method_29239, method_29241, method_29919, method_30076, method_30330, method_30632, method_30633, method_30634, method_30950, method_30951, method_31166, move, moveToBoundingBoxCenter, moveToWorld, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onPlayerCollision, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, playFlySound, playSound, playStepSound, playSwimSound, populateCrashReport, pushAwayFrom, pushOutOfBlocks, raycast, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, removeAllPassengers, removePassenger, removeScoreboardTag, requestTeleport, resetNetherPortalCooldown, resetPosition, saveSelfToTag, saveToTag, scheduleVelocityUpdate, sendSystemMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFireTicks, setFlag, setGlowing, setHeadYaw, setInNetherPortal, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setOnGround, setPos, setPose, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setWorld, setYaw, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRenderName, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, startRiding, stopRiding, streamPassengersRecursively, teleport, teleportRequested, tickNetherPortal, tickNetherPortalCooldown, tickRiding, toListTag, toListTag, toString, toTag, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollide
-
Field Details
-
HOOK_ENTITY_ID
-
CAUGHT_FISH
-
velocityRandom
-
caughtFish
private boolean caughtFish -
outOfOpenWaterTicks
private int outOfOpenWaterTicks -
removalTimer
private int removalTimer -
hookCountdown
private int hookCountdown -
waitCountdown
private int waitCountdown -
fishTravelCountdown
private int fishTravelCountdown -
fishAngle
private float fishAngle -
inOpenWater
private boolean inOpenWater -
hookedEntity
-
state
-
luckOfTheSeaLevel
private final int luckOfTheSeaLevel -
lureLevel
private final int lureLevel
-
-
Constructor Details
-
FishingBobberEntity
-
FishingBobberEntity
@Environment(CLIENT) public FishingBobberEntity(World world, PlayerEntity thrower, double x, double y, double z) -
FishingBobberEntity
public FishingBobberEntity(PlayerEntity thrower, World world, int lureLevel, int luckOfTheSeaLevel)
-
-
Method Details
-
initDataTracker
protected void initDataTracker()- Specified by:
initDataTracker
in classEntity
-
onTrackedDataSet
- Overrides:
onTrackedDataSet
in classEntity
-
shouldRender
@Environment(CLIENT) public boolean shouldRender(double distance)- Overrides:
shouldRender
in classEntity
-
updateTrackedPositionAndAngles
@Environment(CLIENT) public void updateTrackedPositionAndAngles(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate)- Overrides:
updateTrackedPositionAndAngles
in classEntity
-
tick
public void tick()- Overrides:
tick
in classProjectileEntity
-
removeIfInvalid
-
checkForCollision
private void checkForCollision() -
method_26958
- Overrides:
method_26958
in classProjectileEntity
-
onEntityHit
- Overrides:
onEntityHit
in classProjectileEntity
-
onBlockHit
- Overrides:
onBlockHit
in classProjectileEntity
-
updateHookedEntityId
private void updateHookedEntityId() -
tickFishingLogic
-
isOpenOrWaterAround
-
getPositionType
-
getPositionType
-
isInOpenWater
public boolean isInOpenWater() -
writeCustomDataToTag
- Overrides:
writeCustomDataToTag
in classProjectileEntity
-
readCustomDataFromTag
- Overrides:
readCustomDataFromTag
in classProjectileEntity
-
use
-
handleStatus
@Environment(CLIENT) public void handleStatus(byte status)- Overrides:
handleStatus
in classEntity
-
pullHookedEntity
protected void pullHookedEntity() -
canClimb
protected boolean canClimb() -
remove
public void remove() -
getPlayerOwner
-
getHookedEntity
-
canUsePortals
public boolean canUsePortals()- Overrides:
canUsePortals
in classEntity
-
createSpawnPacket
- Specified by:
createSpawnPacket
in classEntity
-