Add click_phase
and priority
fields to item_on_item
power type
#229
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR changes the
click_type
field, and adds the newclick_phases
andpriority
fields to theitem_on_item
power type:Note
Powers with a priority value of equal or greater than 1 will be executed and override the original action of clicking an item stack with the cursor item stack, or clicking an item stack in a slot...
...while powers with a priority value of equal or less than -1 will only be executed if the original action of clicking an item stack with the cursor item stack, or clicking an item stack in a slot has failed (or if the item doesn't have any.)
click_types
["secondary"]
"primary"
), right-clicking ("secondary"
), or both, an item.(This is a replacement for the
click_type
field, but the power type still supports it.)click_phases
"slot"
priority
0
A stack click phase is a string that determines the phase when clicking an item on a slot in inventories.
Note
The listed values are ordered based on priority, with
"cursor"
being first and"slot"
being last."cursor"
"slot"
Here's an example that overrides the action of placing item stacks in a bundle when using the bundle on an item stack:
And another example that would override the action of placing item stacks in a bundle when using an item stack on a bundle: