-
Notifications
You must be signed in to change notification settings - Fork 46
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
Several fixes / changes to the holder
item action
#132
Conversation
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.
I don't quite see the point in keeping InventoryUtil#deduplicateSlots
when we aren't using it anymore and when it's private.
If it is still used, please tell me and I'll approve. I can't quite check properly on my phone.
I feel like we could potentially implement these optimisations to the other InventoryUtil
methods too.
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.
The above is invalid, please ignore it.
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.
Looks good! I agree on adding a path alias for it, though identifier aliasing is currently not perfect (it doesn't have a priority system of some sort similar to Prioritized.CallInstance<?>
)
Agreed on having a path alias. |
# Conflicts: # src/main/java/io/github/apace100/apoli/mixin/LivingEntityMixin.java # src/main/java/io/github/apace100/apoli/util/InventoryUtil.java
This PR includes several changes regarding the holder item action:
InventoryUtil#forEachStack
method to not allocate a new set each callsetHolder
to our duck interface'sEntityLinkedItemStack#setEntity
. This is better because it does not change vanilla semantics of the holder field.holder
toholder_action
and theentity_action
field toaction
. This is to make it in line with other actions, likeequipped_item_action
,passenger_action
, etc. I feel this is okay since the action hasn't been released for too long and is probably still barely used. If you think this is too late for that change, we could add an alias using the old names for backwards compatibility and make an announcement asking people to change over to the new names quickly.Thanks Pug for pointing out the optimization potential with the method.