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

1.19.X/Improve flying scrolls performance #460

Merged

Conversation

leafreynolds
Copy link
Contributor

👋 Heya. Just a pull request improving the performance of the flying scrolls. Because block scanning is expensive, the function checking if there's a beacon nearby was drastically slowing down our server. Especially when multiple people were using their scrolls at the same time.

I've offloaded these checks to happen once per second, depending on the player's tick count. Fabulous scroll was also checking if it was in range of a beacon twice in the same function, so cleaned that up too.

To account for fabulous scroll only checking in range once per 20 ticks instead of per single tick, the probability of xp consumption was increased by 20.

@leafreynolds leafreynolds force-pushed the 1.19.X/scroll_performance branch from 97a6266 to a45d31a Compare December 2, 2023 04:44
@leafreynolds leafreynolds changed the title Improve flying scrolls performance 1.19.X/Improve flying scrolls performance Dec 7, 2023
@Aizistral
Copy link
Member

Since work is already done I'll merge 1.19 version too, but keep in mind that I don't plan to release more mod updates for 1.19.

@Aizistral Aizistral merged commit 910c64e into Aizistral-Studios:1.19.X Dec 22, 2023
2 of 4 checks passed
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.

2 participants