EventValues - add an option to use changers#7512
Conversation
|
Showcase: on consume:
send "Before: %event-item%"
set event-item to 1 of stick
send "After: %event-item%"Screen.Recording.2025-01-22.at.10.42.50.PM.mov |
APickledWalrus
left a comment
There was a problem hiding this comment.
The code itself seems fine. I'm wondering how this might interact with existing event value expressions, such as https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/expressions/ExprItem.java. It appears there would be a difference with set the item to ... and set the event-item to ...
I'll be honest, this didn't cross my mind. Ill test and get back to you. EDIT: |
- As per pickle's request
NotSoDelayed
left a comment
There was a problem hiding this comment.
Room for adding JUnit tests? (Expecting to exceed beyond the limit of the sky)
* EventValues - add an option to use changers * EventValueExpression - cleanup * EventConverter - repackage * EventValueExpression - strip out some null delta checks * EventConverter - moved to group with EventValues - As per pickle's request * Add junit test * EventValueExpression - return after converter to prevent changer from also running
Description
This PR aims to add the ability to have changers for event-values.
NOTES:
event-itemin the consume event. TESTED HEAVILY with both a single value and array. Works nicely.Target Minecraft Versions: any
Requirements: none
Related Issues: #7485