Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reach ring #64

Merged
merged 2 commits into from
Dec 7, 2024
Merged

Conversation

Shadow1590
Copy link

Fixes #18125
I kind of fixed this a while back but then forgot about it.

The problem was with how the reach ring gets applied on world load. It gets applied in onWornTick and adds the hash of the player to the ring. On a server this was fine because the data is not shared. In singleplayer the server part sets the hash first and when the client checks it it finds the player hash already set so it does not apply it.

Idk if this is the best way to fix it but it works :)

@wlhlm
Copy link
Member

wlhlm commented Dec 6, 2024

I've looked at this and it fixes the issue just fine as you say. Thanks! It's just I think, ideally, this wouldn't have to be stored in the NBT tags at all as it's just runtime information for the mod to know if it needs to run setup on first tick. There is the rare chance where the player hashcode could get reused between world loads.

I know this just does what Botania was already doing.

@Shadow1590
Copy link
Author

Ok, so i thought about this and, first thing that came to mind was to add a method in baubles that gets called only on the first tick but that would be a much bigger task and i havent found another bauble that would benefit from that.
And with the saving it as a runtime information im not really sure how to do that.
Would that be some kind of i guess a static data structure that would know wheter the the given player was given the effect of the ring on the server/client?

@Dream-Master Dream-Master merged commit 13d5384 into GTNewHorizons:master Dec 7, 2024
1 check passed
@Shadow1590 Shadow1590 deleted the fixReachRing branch December 29, 2024 09:52
@Shadow1590 Shadow1590 mentioned this pull request Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Botania's ring of far reach doesn't activate after world start
4 participants