Skip to content

Add max fish hook distance - #14472

Open
dawon wants to merge 1 commit into
PaperMC:mainfrom
dawon:feature/add-max-fish-hook-distance
Open

dawon wants to merge 1 commit into
PaperMC:mainfrom
dawon:feature/add-max-fish-hook-distance

Conversation

@dawon

@dawon dawon commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

One thing to consider is whether to store the value squared or not, I opted to sqrting it on the go, but if that means too much overhead, I will change it...

@dawon
dawon requested a review from a team as a code owner November 9, 2026 12:35
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Nov 9, 2026
@Doc94

Doc94 commented Nov 9, 2026

Copy link
Copy Markdown
Member

hmm depends for the future.. if mojang change the distance how easy is follow that... its more "easy" just keep the logic for distanceToSqr but i wanna hear another comments.

other thing... this now allow put high values... that cases works fine or need maybe set a max value?

@dawon

dawon commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

hmm depends for the future.. if mojang change the distance how easy is follow that... its more "easy" just keep the logic for distanceToSqr but i wanna hear another comments.

I had originally the squared value, but then the CraftFishHook implementation was kind of unreadable... but as said earlier, I have no issue go for the other variant

other thing... this now allow put high values... that cases works fine or need maybe set a max value?

Will test that

@dawon

dawon commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

other thing... this now allow put high values... that cases works fine or need maybe set a max value?

so when more than 64 blocks distant, the client considers the hook non existant and renders the item as it is not cast.... but when returned to the 64 block range it is rendered again normally... Should i limit it to 64 blocks or should I just note that in the JD?

I tried to find where in the client is this cap set but was unable...

@masmc05

masmc05 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Maybe it's server entity tracking/client entity view distance setting removing it?

@dawon
dawon force-pushed the feature/add-max-fish-hook-distance branch from d417104 to 6e6d47b Compare November 9, 2026 14:16
@dawon

dawon commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Maybe it's server entity tracking/client entity view distance setting removing it?

It is not being removed, when returned, it is still cast, only thing that changes the model property fishing rod cast basically is set to false, so the item is considered as not being used until you return to the 64 block range... I have tracking/view distance set to 10, presuming it is chunks, so it should be happening around 160 blocks? My client view/sim distance is set to 12 chunks...

how it looks (fishing hook is at cca Z: 0)
Image
Image

@Doc94

Doc94 commented Nov 9, 2026

Copy link
Copy Markdown
Member

other thing... this now allow put high values... that cases works fine or need maybe set a max value?

so when more than 64 blocks distant, the client considers the hook non existant and renders the item as it is not cast.... but when returned to the 64 block range it is rendered again normally... Should i limit it to 64 blocks or should I just note that in the JD?

I tried to find where in the client is this cap set but was unable...

its not from the method related to render?
https://mcsrc.dev/2/26.3/net/minecraft/world/entity/projectile/FishingHook#L148

@dawon

dawon commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

other thing... this now allow put high values... that cases works fine or need maybe set a max value?

so when more than 64 blocks distant, the client considers the hook non existant and renders the item as it is not cast.... but when returned to the 64 block range it is rendered again normally... Should i limit it to 64 blocks or should I just note that in the JD?

I tried to find where in the client is this cap set but was unable...

its not from the method related to render?
https://mcsrc.dev/2/26.3/net/minecraft/world/entity/projectile/FishingHook#L148

Yea, that must be it. I would still vote for noting that in jd, rather than strictly limiting that...

@Doc94

Doc94 commented Nov 9, 2026

Copy link
Copy Markdown
Member

other thing... this now allow put high values... that cases works fine or need maybe set a max value?

so when more than 64 blocks distant, the client considers the hook non existant and renders the item as it is not cast.... but when returned to the 64 block range it is rendered again normally... Should i limit it to 64 blocks or should I just note that in the JD?
I tried to find where in the client is this cap set but was unable...

its not from the method related to render?
mcsrc.dev/2/26.3/net/minecraft/world/entity/projectile/FishingHook#L148

Yea, that must be it. I would still vote for noting that in jd, rather than strictly limiting that...

yeah can be good just notice about the render thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

3 participants