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

Do not trigger task check for all inventory slots #90

Merged
merged 1 commit into from Mar 15, 2023

Conversation

greesyB
Copy link
Member

@greesyB greesyB commented Mar 14, 2023

Closes GTNewHorizons/GT-New-Horizons-Modpack#12107

Only trigger completion checks on changes to the main 36-slot inventory. Previously chargeable armors would trigger these checks on each tick they drained or were charged. This showed up in server profiling.

Before:
image

After (even while spamming drop to simulate potential normal inventory changes):
image

@Dream-Master Dream-Master requested review from a team March 15, 2023 08:24
@Dream-Master Dream-Master merged commit a8eb2f4 into master Mar 15, 2023
1 check passed
@Dream-Master Dream-Master deleted the fix/inventory-change-lag branch March 15, 2023 17:21
DrParadox7 pushed a commit to DrParadox7/BetterQuesting that referenced this pull request Jul 1, 2023
jchung01 added a commit to jchung01/BetterQuesting that referenced this pull request Feb 14, 2024
Rongmario pushed a commit to CleanroomMC/BetterQuesting that referenced this pull request Feb 17, 2024
* Faster TaskRetrieval::detect - reduce allocations
(GTNewHorizons/StandardQuestingPack#18)

* Only scan player inventories once per game tick instead of on every change
(GTNewHorizons/StandardQuestingPack#18)

* Do not trigger task check for all inventory slots
(GTNewHorizons#90)

* Prevent processing events from fake players
(GTNewHorizons/StandardQuestingPack#10)

* Reorder event conditions
* Be consistent with PlayerInteractEvent checks
* Simplify synchronized block to state check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants