Replies: 2 comments 2 replies
-
|
You might be interested in #21408 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Did you see the API added in #21284 at the last minute? This feels like it's very close to what you're asking for, but perhaps I'm missing something? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The Awesome
I've come round to the
EntityEventapi in most parts ofbeet, thanks @Diddykonga i think you're right its best not to think of theEventtype literally as a 'payload', reflecting on the lovely flat nature of html events helped with this as well.My pattern for non-default types is getting
newto return aFnOnce.The Tricky
There are some cases that
EntityEventjust wasn't able to fit, for example the behavior treeOutcometype is beautifully simple and my attempts to shoehorn it in resulted in an obscure mess for triggers, consumers and cases where the event needs to be stored for later triggering (target not yet known).I tried a generic
EntityEventcontainer with anOutcomepayload but that results in a mismatch between the trigger and consumer type, so instead ive implemented the discussedEntityTargetTriggerpattern.I'm a big fan of the
Triggerapi its super powerful, the challenge is that entity-specific usage requires extension methods for commands, world and anywhereEntityEventis being handled which feels like going against the grain of the intended api.Maybe too early to say at this point but the implementation got me wondering if this kind of custom entity-specific event could be more officially supported, ie
commands.observeandcommands.triggercould accept a more generalIntoEntityTargetEvent<M>or something.Beta Was this translation helpful? Give feedback.
All reactions