Origins (Fabric)

Origins (Fabric)

15M Downloads

entity_action_chosen of action_on_callback not called in situation mentioned by wiki

Alluysl opened this issue ยท 0 comments

commented

The page https://origins.readthedocs.io/en/latest/power_types/action_on_callback/ states that if execute_chosen_when_orb is set to false, entity_action_chosen should still be called "when the player chooses an origin for the first time or their origin was reset to origins:empty via a command". The first part is true but the second is not: even setting all layers to origins:empty via commands and exiting then rejoining the world and picking all layers again (including the origin of course), is not calling entity_action_chosen if execute_chosen_when_orb is set to false. I believe this is an error on the side of the actual behavior and not the wiki.

By the way I'll make a pull request on the wiki repo to clarify that wiki page because it lacks specificity and detail imo (also the example is pre-onLost so it's outdated).

Research done:

Y or N is whether execute_chosen_when_orb is true or not
The tests were made using origin classes which show behavior related to layers

- Created a new world
- Chose callback origin on origin layer
-> Y entity_action_added
-> N entity_action_added
- Validated last layer
-> Y entity_action_chosen
-> N entity_action_chosen
- /origin set @s origins:origin origins:human
-> Y entity_action_removed
-> Y entity_action_lost
-> N entity_action_removed
-> N entity_action_lost
- /origin set @s origins:origin <callback origin>
-> Y entity_action_added
-> N entity_action_added
- /origin set @s origins:origin origins:human
-> Y entity_action_removed
-> Y entity_action_lost
-> N entity_action_removed
-> N entity_action_lost
- /origin set @s origins:origin <callback origin>
-> Y entity_action_added
-> N entity_action_added
- /origin set @s origins:origin origins:empty
-> Y entity_action_removed
-> Y entity_action_lost
-> N entity_action_removed
-> N entity_action_lost
- /origin set @s origins:origin <callback origin>
-> Y entity_action_added
-> N entity_action_added
- Orb of Origin (on click)
-> Y entity_action_removed
-> Y entity_action_lost
-> N entity_action_removed
-> N entity_action_lost
- Orb of Origin (on selecting the callback on the origin layer)
-> Y entity_action_added
-> N entity_action_added
- Orb of Origin (on validating the last layer)
-> Y entity_action_chosen

- Created a new world
- Chose human on origin layer and chose last layer
- /origin set @s origins:origin <callback origin>
-> Y entity_action_added
-> N entity_action_added
- Orb of Origin (on click)
-> Y entity_action_removed
-> Y entity_action_lost
-> N entity_action_removed
-> N entity_action_lost
- Orb of Origin (on selecting the callback origin on the origin layer)
-> Y entity_action_added
-> N entity_action_added
- Orb of Origin (on validating the last layer)
-> Y entity_action_chosen

- Created a new world
- Chose human on origin layer and validated last layer
- Orb of Origin (click)
- Orb of Origin (on selecting the callback origin on the origin layer)
-> Y entity_action_added
-> N entity_action_added
- Orb of Origin (on validating the last layer)
-> Y entity_action_chosen

- Created a new world
- Chose callback origin on origin layer
-> Y entity_action_added
-> N entity_action_added
- Validated last layer
-> Y entity_action_chosen
-> N entity_action_chosen
- Quit the world
-> Y entity_action_removed
-> N entity_action_removed
- Rejoined the world
-> Y entity_action_added
-> N entity_action_added
- /origin set @s origins:origin origins:empty
-> Y entity_action_removed
-> Y entity_action_lost
-> N entity_action_removed
-> N entity_action_lost
- /origin set @s origins-classes:class origins:empty
- Orb of Origin (click)
- Orb of Origin (on selecting the callback origin on the origin layer)
-> Y entity_action_added
-> N entity_action_added
- Orb of Origin (on validating the last layer)
-> Y entity_action_chosen
- Pressed show origin keybind
- Clicked choose
- Chose callback origin
-> Y entity_action_added
-> N entity_action_added
- Pressed show origin keybind
- Switched to other layer
- Clicked choose
- Chose nitwit
-> Y entity_action_chosen
- /origin set @s origins:origin origins:empty
-> Y entity_action_removed
-> Y entity_action_lost
-> N entity_action_removed
-> N entity_action_lost
- /origin set @s origins-classes:class origins:empty
- Quit and rejoined the world
- Chose the callback origin on the origin layer
-> Y entity_action_added
-> N entity_action_added
- Validated last layer
-> Y entity_action_chosen