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

Implement enchant item action #1420

Merged
merged 2 commits into from
Nov 1, 2024
Merged

Implement enchant item action #1420

merged 2 commits into from
Nov 1, 2024

Conversation

Pablete1234
Copy link
Member

Works similar to replace-item action, but instead of replacing the item enchants it with a level which can be variables/formulas

<enchant-item enchantment="efficiency" level="some_var+1" ignore-metadata="true">
  <find material="diamond_pickaxe"/>
</enchant-item>

The inner element find is an item definition of what to search for in the inventory. Works the same as replace-item, where you can define extra item matching attributes like ignore-metadata and such.

Ontop of that you have the attributes:
enchantment the enchantment to apply
level a formula that says what level. Like all formulas it can be just a constant too like level="5"

Signed-off-by: Pablo Herrera <[email protected]>
@Pablete1234 Pablete1234 merged commit 3dd6af7 into dev Nov 1, 2024
2 checks passed
@Pablete1234 Pablete1234 deleted the enchant-action branch November 1, 2024 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants