Page cover image

Other Mechanics

The different mechanics available by default and their configurations sorted by category

Miscellaneous

Backpack

This allows you to turn any item into a backpack.

This mechanic might cause duplication issues! If you find any please open a bug-report and we will fix them as soon as possible!\

backpack:
  itemname: backpack
  material: PAPER
  Components:
    max_stack_size: 1
  Mechanics:
    backpack:
      rows: 4
      title: "<red>Backpack"                      #Optional, Default: "Backpack"
      open_sound: "entity.shulker.open"       #Optional, Default: "entity.shulker.open"
      close_sound: "entity.shulker.close"     #Optional, Default: "entity.shulker.close"

Misc Mechanic

This mechanic has a bunch of small changes you can make to your item. What they each do should be pretty self-explanatory.

myitem:
  Mechanics:
    misc:
      breaks_from_cactus: true
      burns_in_fire: true
      burns_in_lava: true
      disable_vanilla_interactions: false
      can_strip_logs: false
      piglins_ignore_when_equipped: false
      compostable: false
      allow_in_vanilla_recipes: true

Commands

This allows you to execute commands (as the console, a player or op player). If this option is not often the most elegant it has the merit of simplifying a lot of things. You can create a cooldown between usages, check if the player has a specific permission and use the item (understand decrease its amount by one when the command is performed).

myitem:
  Mechanics:
    commands:
      cooldown: 5 # example cooldown in seconds. This is optional
      permission: "my.awesome.perm" # required permission. This is optional
      one_usage: true # should the amount decrease when used? Default: false
      console:
        # e.g. to kill the player
        - "kill %p%"
      player:
        # e.g. the player performs /spawn
        - "spawn"
      opped_player:
        # e.g. the player gives himself a diamond sword
        - "give diamond_sword 1"

Armor Effects

This allows you to bind a Potion Effect to an armor (or a hat) so that when you equip it you'll get the effect. Here is a list of all potion effect types available.

myitem:
  Mechanics:
    armor_effects:
      night_vision: # the potion effect type
        duration: 10
        amplifier: 0
        ambient: true # Makes potion effect produce more, translucent, particles.
        particles: true # whether this effect has particles or not
        icon: true # whether this effect has an icon or not

You can also make an effect only apply if the entire set it equipped.

myitem:
  Mechanics:
    armor_effects:
      night_vision:
        requires_full_set: true
        ...

clickAction

This mechanic allows you to run various events when a player clicks a block or furniture. It is very customizable, so it also has a dedicated tutorial page.

ItemType

With this mechanic, you can change the item type detected by NexoBlocks. Make sure to use a type declared inside the block mechanic.

myitem:
  Mechanics:
    itemtype:
      value: SUPER_MATERIAL # your itemType

Soulbound

With this mechanic, you can avoid the players to lose their item when they die.

myitem:
  Mechanics:
    soulbound:
      lose_chance: 0

Custom mechanic

This mechanic allows you to customize events, conditions and actions. Since it is a quite rspecial mechanic, it has its dedicated tutorial page.

Combat

Thor

Have you ever dreamed of being able to throw lightning bolts? This is for you.

myitem:
 Mechanics:
   thor:
    lightning_bolts_amount: 5
    random_location_variation: 1.5
    delay: 20000 # in milliseconds (20000ms = 20s)
  • lightning_bolts_amount: how many lightning bolts will be spawned?

  • random_location_variation: the random variation range between bolts (in blocks)

  • delay: delay between usage in milliseconds (1000ms = 1s)

Lifesteal

Want to steal hearts to your opponents when you hit them?

myitem:
  Mechanics:
    lifesteal:
      amount: 2 # the amount of 1/2 hearts that you'll steal to your opponents

EnergyBlast

EnergyBlast is a very cool mechanic that creates a cone of particles to attack entities.

myitem:
  Mechanics:
    energyblast:
      delay: 20000
      length: 5
      damage: 10.0
      particle:
        type: REDSTONE #Only REDSTONE particle can change size and color.
        size: 1
        color:
          red: 0
          green: 255
          blue: 255

Witherskull

Send wither skulls when right clicking!

myitem:
  Mechanics:
    witherskull:
      charged: false # a charged skull can break blocks
      delay: 3000 # in milliseconds (3000ms = 3s)

Farming

Harvesting

Harvesting allows you to recolt and replant automatically wheat in a certain radius.

myitem:
  Mechanics:
    harvesting:
      cooldown: 10000 # 10 seconds between usages
      radius: 5 # blocks surrounding the clicked block
      height: 3 # high

Smelting

Smelting allows you to instantly melt iron and gold ores when you mine them. This supports fortune and silktouch.

myitem:
  Mechanics:
    smelting:
      enabled: true
      play_sound: true

Last updated