public class FishingBobberEntity extends ProjectileEntity
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
FishingBobberEntity.PositionType |
(package private) static class |
FishingBobberEntity.State |
Entity.PositionUpdater| Modifier and Type | Field and 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 |
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, yawDUMMY| Modifier | Constructor and 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) |
getOwner, method_26962, onCollision, setOwner, setProperties, setVelocity, setVelocityClient, updateRotationaddPassenger, 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, wouldPoseNotCollideprivate static final TrackedData<Integer> HOOK_ENTITY_ID
private static final TrackedData<Boolean> CAUGHT_FISH
private final Random velocityRandom
private boolean caughtFish
private int outOfOpenWaterTicks
private int removalTimer
private int hookCountdown
private int waitCountdown
private int fishTravelCountdown
private float fishAngle
private boolean inOpenWater
private Entity hookedEntity
private FishingBobberEntity.State state
private final int luckOfTheSeaLevel
private final int lureLevel
private FishingBobberEntity(World world, PlayerEntity owner, int lureLevel, int luckOfTheSeaLevel)
@Environment(value=CLIENT) public FishingBobberEntity(World world, PlayerEntity thrower, double x, double y, double z)
public FishingBobberEntity(PlayerEntity thrower, World world, int lureLevel, int luckOfTheSeaLevel)
protected void initDataTracker()
initDataTracker in class Entitypublic void onTrackedDataSet(TrackedData<?> data)
onTrackedDataSet in class Entity@Environment(value=CLIENT) public boolean shouldRender(double distance)
shouldRender in class Entity@Environment(value=CLIENT)
public void updateTrackedPositionAndAngles(double x,
double y,
double z,
float yaw,
float pitch,
int interpolationSteps,
boolean interpolate)
updateTrackedPositionAndAngles in class Entitypublic void tick()
tick in class ProjectileEntityprivate boolean removeIfInvalid(PlayerEntity playerEntity)
private void checkForCollision()
protected boolean method_26958(Entity entity)
method_26958 in class ProjectileEntityprotected void onEntityHit(EntityHitResult entityHitResult)
onEntityHit in class ProjectileEntityprotected void onBlockHit(BlockHitResult blockHitResult)
onBlockHit in class ProjectileEntityprivate void updateHookedEntityId()
private void tickFishingLogic(BlockPos pos)
private boolean isOpenOrWaterAround(BlockPos pos)
private FishingBobberEntity.PositionType getPositionType(BlockPos start, BlockPos end)
private FishingBobberEntity.PositionType getPositionType(BlockPos pos)
public boolean isInOpenWater()
public void writeCustomDataToTag(CompoundTag tag)
writeCustomDataToTag in class ProjectileEntitypublic void readCustomDataFromTag(CompoundTag tag)
readCustomDataFromTag in class ProjectileEntitypublic int use(ItemStack usedItem)
@Environment(value=CLIENT) public void handleStatus(byte status)
handleStatus in class Entityprotected void pullHookedEntity()
@Nullable public PlayerEntity getPlayerOwner()
public boolean canUsePortals()
canUsePortals in class Entitypublic Packet<?> createSpawnPacket()
createSpawnPacket in class Entity