apace100 / apoli

MIT License
40 stars 46 forks source link

Add stuff related to command tags #180

Closed eggohito closed 6 months ago

eggohito commented 1 year ago

This PR adds a new entity condition type: has_command_tag, which checks if an entity has (the specified) command tags. This is also compatible with the fields of eggolib's has_tag entity condition type.

[!NOTE] If none of the fields are present, this entity condition type will check if the entity has command tags instead.

Field Type Default Description
command_tag String optional If specified, checks if the entity has this command tag.
command_tags Array of Strings optional If specified, checks if the entity has these command tags.

This PR also used to add a CCA component, apoli:command_tags, for storing the entity's command tags, but it has since been removed (in 3/29/2024) in favor of using a data tracker to save on entity NBT data space (it used to store the entity's command tags twice, which was pretty bloaty.)