NemesisEye/docs/Nodes.md
Adrian Victor 1fbc200936
Some checks failed
Build / build (push) Has been cancelled
Add TAKE_LECTERN_BOOK action.
2026-06-17 17:21:41 -03:00

1.8 KiB

Nodes

Nodes narrow down even further if an action can be done or not. A node needs properties to know what it should check against, for example, a HIT node needs a list of blocks that it will check if the player is holding; while a USE_ENCHANTMENT node needs a mapping of enchantment to level. Some nodes like GLYDE don't need a value and will ignore if you provide one.

nodes:
  - [HIT]:
      values:
        - 'GOLD_SWORD'
  - [USE_ENCHANTMENT]:
      values:
        - "UNBREAKING": "1"
  - [GLYDE]

Available nodes

INTERACT

Triggered on InteractionEvent, returns true when the provided list contains the material used to interact.

HIT

Triggered on EntityDamageByEntityEvent, returns true when the provided list contains the material used to hit.

PLACE

Triggered on BlockPlaceEvent, returns true when the provided list contains the material being placed.

BREAK

Triggered on BlockBreakEvent, returns true when the provided list contains the material used to break.

EQUIP

Triggered on InventoryClickEvent and PlayerInteractEvent (only if item is an armor), returns true when the provided list contains the material being equipped.

GLYDE

Triggered on PlayerMoveEvent, returns true if player is gliding.

USE_ENCHANTMENT

Triggered on BlockBreakEvent and onEntityDamageByEntityEvent, returns true when the used item has an enchantment matching the provided mapping of enchantment-level.

FORMBLOCK

Triggered on BlockFormEvent (ex. triggers when snow is formed from rain), returns true when the block being formed is in the provided list of materials.

ENDERMAN_ATTACK_PLAYER

Triggered on EndermanAttackPlayerEvent (from actions other than hitting the Enderman), returns true.

TAKE_LECTURN_BOOK

Triggered on PlayerTakeLecturnBookEvent, returns true.