-
Notifications
You must be signed in to change notification settings - Fork 4
add inventory ticker #391
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
base: master
Are you sure you want to change the base?
add inventory ticker #391
Conversation
You system doesn't address the main point of different tick speeds: reducing the number of inventory iterations/item comparisons. rn it just loops over everything at the same tick speed |
Sorry misread nvm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't allow for arbitrary tick speeds right?
pylon-core/src/main/kotlin/io/github/pylonmc/pylon/core/item/PylonInventoryTicker.kt
Outdated
Show resolved
Hide resolved
pylon-core/src/main/kotlin/io/github/pylonmc/pylon/core/item/base/PylonInventoryItem.kt
Outdated
Show resolved
Hide resolved
no, we don't want arbitrary tick speeds since the number of comparisons increases along the order of nDistinctTickSpeeds * nPlayers, so if we have a bunch of different addons each with their own tick speeds, then we have to check every item again just for that addon's speed. I talked with Idra about this and we decided that these 3 speeds would fulfill 99% of use cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hit "approve" on accident 💀
pylon-core/src/main/kotlin/io/github/pylonmc/pylon/core/item/base/PylonInventoryItem.kt
Show resolved
Hide resolved
pylon-core/src/main/kotlin/io/github/pylonmc/pylon/core/item/base/PylonInventoryItem.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Seggan <[email protected]>
…on-core into add-inventory-ticker
oop there's a bug where health talisman health doesn't get removed since there's no onStopTick or something like that, do not merge |
bug has been fixed, not going to add an onStopTick method since that's just unneeded abstraction overhead in a lot of cases |
pylon-core/src/main/kotlin/io/github/pylonmc/pylon/core/item/base/PylonInventoryItem.kt
Outdated
Show resolved
Hide resolved
…ase/PylonInventoryItem.kt Co-authored-by: Seggan <[email protected]>
Closes #380