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 more conditions #205

Open
wants to merge 15 commits into
base: 1.21.x/dev
Choose a base branch
from
Open

Add more conditions #205

wants to merge 15 commits into from

Conversation

Dueris
Copy link

@Dueris Dueris commented Feb 11, 2024

This PR adds a few more entity, item, and block conditions

new Entity Conditions:

  • "has_ai" : returns if the entity currently has ai enabled
  • "disables_shield" : returns if the entity is allowed to disable a shield, like a Ravager
  • "riptiding" : returns if the entity is currently riptiding with a trident
  • "age" : a comparison condition for checking what age in ticks the entity has
  • "crawling" : returns if the entity is actively crawling
  • "ridable_in_water" : returns if the entity will not dismount its passengers in water

new Block Conditions:

  • "redstone_input" : a comparison condition for the redstone input of the block
  • "redstone_output" : a comparison condition for the redstone output of the block
  • "requires_tool" : returns if the block requires a tool to break
  • "piston_behavior": returns if the block piston behavior matches the one provided(possible values are: normal, destroy, block, ignore, push_only)

new Item Conditions:

  • "rarity" : returns if the item rarity matches the one provided
  • "stackable" : returns if the item is stackable
  • "used_on_release" : returns if the item is used on release, like a bow for example(iirc)

Copy link
Collaborator

@eggohito eggohito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some nitpicks:

  • The action/condition types should use its own class (most that don't are pretty much old ones). You can use other action/condition types as a reference on how it should look like.
  • All things related to command tags (the tags added via the /tag command) should already be handled in Add stuff related to command tags #180, so you can remove them in this PR

@Dueris
Copy link
Author

Dueris commented Mar 4, 2024

Just saw this, I will get to work asap, ty!

Copy link
Author

@Dueris Dueris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All fixed!

@Dueris
Copy link
Author

Dueris commented Mar 4, 2024

I am gonna do a quick change to make it so that it also has a comparison condition for the redstone output, aswell as input.

Powered condition will be RedstoneInput condition prob aswell

@Dueris Dueris requested a review from eggohito March 5, 2024 22:01
Copy link
Collaborator

@eggohito eggohito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some more nitpicks. The others look good to me!

@Dueris Dueris requested a review from eggohito March 7, 2024 18:07
@Dueris
Copy link
Author

Dueris commented Mar 7, 2024

Fixed! I also added 2 more Conditions I was working on yesterday and forgot to commit, so I applied the changes you requested to those aswell 👍

@Dueris
Copy link
Author

Dueris commented Mar 7, 2024

The descriptions for the 2 conditions are in the main comment at the top

@Dueris Dueris changed the title Add more actions & conditions Add more conditions Mar 12, 2024
@eggohito eggohito added this to the 2.12.x milestone Mar 31, 2024
@eggohito eggohito changed the base branch from 1.20 to 1.20.4/dev May 17, 2024 04:41
@eggohito eggohito changed the base branch from 1.20.4/dev to 1.21.x/dev August 23, 2024 11:59
@eggohito eggohito removed this from the 2.12.x milestone Jan 7, 2025
@eggohito eggohito added this to the 2.13.x milestone Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants