Enchantments
Creating an Enchantment
# The maximum chance (out of 100) this enchant can have to activate.
max-chance: 100
# The level this enchant starts with when a player first gets the tool.
starting-level: 0
# The maximum level this enchant can be upgraded to.
max-level: 1000
# The material to display in GUIs. Can be a standard material, a player head texture, or a placeholder.
material: "texture-eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGE5OTUzY2U5NDVkYTZlMmZiODAwMzBlNzU0ZmE4ZTA5MmM0ZTllY2QwNTQ4ZjkzOGMzNDk3YTgwOGU0MWE0OCJ9fX0="
# Type of enchant. 'CUSTOM' for complex actions, 'EFFECT' for simple potion effects.
type: 'custom'
# The ID of the tool this enchant belongs to.
tool: 'crop-tool'
# The friendly name for display purposes.
display-name: 'Barn'
# The cost to upgrade the enchant.
cost:
currency: farm-coins
starting-cost: 100
increase-cost-by: 500
# The sequence of actions to perform when the enchant procs.
actions:
spawn-cow:
type: 'spawn-entity'
entity: 'COW'
entity-id: 'my_cow' # A temporary ID to reference this cow in later actions
pos: '{enchant_pos}'
add-goal:
type: 'add-goal'
entity: 'my_cow'
goal: 'move-to-pos'
pos: '%edtools_randompos_{enchant_pos}|15,0,15%'
speed: 0.3
break-blocks-loop:
type: 'loop'
ticks-between: 5
loop-count: 40
parallel: false
actions:
break_blocks:
type: 'break-blocks'
radius-pos: '{my_cow:pos}' # Use the spawned cow's position
x-radius: 3
z-radius: 3
affect-sell: true
remove-entity:
type: 'remove-entity'
entity: 'my_cow'Enchant Actions
Action Type
Description
Key Parameters
Last updated