Skip to content

feat: Add Effect set_unbreakable.#261

Merged
Exanthiax merged 2 commits intomasterfrom
feat/set_unbreakable
Apr 24, 2026
Merged

feat: Add Effect set_unbreakable.#261
Exanthiax merged 2 commits intomasterfrom
feat/set_unbreakable

Conversation

@CallumJohnson
Copy link
Copy Markdown
Contributor

Minimal - make the holder item unbreakable while the effect is active

effects:
  - id: set_unbreakable

Full example with all options shown explicitly

effects:
  - id: set_unbreakable
    args:
      value: true               # true = unbreakable, false = remove the flag
      slot: holder              # target the item that provides this effect
      persist_on_disable: true  # keep unbreakable after the effect turns off

Make the player's helmet unbreakable while holding the item

effects:
  - id: set_unbreakable
    args:
      slot: helmet

Temporarily make mainhand unbreakable on trigger, then revert when disabled

effects:
  - id: set_unbreakable
    args:
      slot: mainhand
      persist_on_disable: false  # removes unbreakable flag when effect ends

Remove the unbreakable flag from the holder item

effects:
  - id: set_unbreakable
    args:
      value: false

Copy link
Copy Markdown
Member

@Exanthiax Exanthiax left a comment

Choose a reason for hiding this comment

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

Great!

@Exanthiax Exanthiax merged commit 953e974 into master Apr 24, 2026
1 of 2 checks passed
@CallumJohnson CallumJohnson deleted the feat/set_unbreakable branch April 24, 2026 18:00
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