Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stuff related to command tags #180

Merged
merged 7 commits into from
May 19, 2024
Merged

Conversation

eggohito
Copy link
Collaborator

@eggohito eggohito commented Nov 5, 2023

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.)

@eggohito eggohito force-pushed the feat/synced_command_tags branch from 1a04440 to f4183e8 Compare February 23, 2024 15:17
+ Added a CCA synced component for command tags; allows for checking for command tags in the client
+ Added `has_command_tag` entity condition type
@eggohito eggohito force-pushed the feat/synced_command_tags branch from 547c3d7 to 55039e8 Compare February 23, 2024 15:35
@eggohito eggohito mentioned this pull request Feb 23, 2024
@eggohito eggohito added this to the 2.12.x milestone Feb 28, 2024
@eggohito eggohito added the pending: merge This will be merged soon label May 19, 2024
@eggohito eggohito changed the base branch from 1.20 to 1.20.4/dev May 19, 2024 13:25
@eggohito eggohito merged commit 242d00c into 1.20.4/dev May 19, 2024
@eggohito eggohito deleted the feat/synced_command_tags branch May 19, 2024 14:25
@eggohito eggohito added pending: merge This will be merged soon and removed pending: merge This will be merged soon labels Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending: merge This will be merged soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant