Skip to content

Creating Custom Items

Wouter Pauwels edited this page Jul 30, 2024 · 5 revisions

Starting from Minecraft 1.20.6, Artifacts allows the creation of custom items through the artifacts:abilities item component. The component is a list of entries, each containing a type field, which specifies the ability type to use, and optionally some additional fields depending on the ability type used. For example, the following command spawns an Iron Helmet that allows the player to double jump, and applies 5 seconds of haste every time the player takes damage:

/give @a iron_helmet[
  artifacts:abilities=[
    {type:"artifacts:double_jump"}, 
    {type:"artifacts:apply_mob_effect_after_damage", duration: 5, mob_effect:haste}
  ]
]

The abilities component can be applied to armor items, or items that can be equipped in a curio/trinket slot. To make an item equippable in a slot, the corresponding item tag must be added to it. More information can be found on the Curios Wiki or Trinkets Wiki.

The latest version of Artifacts has the following ability types:

artifacts:apply_cooldown_after_damage

Applies a cooldown to the item when the entity wearing it takes damage. (Note that not all abilities will stop functioning when the item is on cooldown)

  • cooldown: The amount of time the item goes on cooldown for, in seconds
  • tag (Optional): A damage type tag to filter on

artifacts:apply_mob_effect_after_damage

Applies a mob effect to the entity after it takes damage.

  • mob_effect: A mob effect id
  • level (Default: 1): The level of the mob effect
  • duration: The duration of the mob effect, in seconds
  • tag (Optional): A damage type tag to filter on

artifacts:apply_mob_effect_after_eating

Applies a mob effect to the entity after it eats an item, the duration of which depends on the amount of food points that were restored.

  • mob_effect: A mob effect id
  • level (Default: 1): The level of the mob effect
  • duration: The duration the mob effect lasts in seconds, per food point consumed

artifacts:attacks_absorb_damage

Causes melee attacks to absorb a portion of the damage dealt.

  • absorption_ratio: The proportion of damage dealt that is absorbed
  • absorption_chance: The chance that damage is absorbed when attacking an entity
  • max_damage_absorbed: The maximum amount of damage that can be absorbed in a single hit

artifacts:attacks_inflict_mob_effect

Applies a mob effect to entities attacked by the entity with this ability. Only affects melee attacks.

  • mob_effect: A mob effect id
  • level (Default: 1): The level of the mob effect
  • duration: The duration the mob effect lasts in seconds
  • cooldown (Default: 0): The duration in seconds the item goes on cooldown for after successfully inflicting the effect
  • chance (Default: 1): The probability that the effect is inflicted after an attack

artifacts:attract_items

Attracts nearby items to the entity

artifacts:attribute_modifier

Applies an attribute modifier to the entity with this ability.

  • attribute: An attribute id
  • amount: The attribute modifier amount
  • operation: The operation of the attribute modifier. Can be either add_value, add_multiplied_base or add_multiplied_total.
  • id: An identifier for this attribute modifier. Note that this identifier must be unique such that it does not conflict with other attribute modifiers.
  • ignore_cooldown (Default: true): Whether this attribute modifier should still be active when the item is on cooldown

artifacts:custom_tooltip

Adds a custom tooltip to the item.

  • tooltip: A text component, can be a string

artifacts:damage_immunity

Makes the player immune to a specific type of damage

  • tag: A damage type tag to filter on

artifacts:double_jump

Allows players to double jump.

  • sprint_jump_horizontal_velocity (Default: 0): The amount of extra horizontal velocity that is applied when double jumping while sprinting
  • sprint_jump_vertical_velocity (Default: 0): The amount of extra vertical velocity that is applied when double jumping while sprinting

artifacts:ender_pearls_cost_hunger

Causes ender pearls not to be consumed, but cost hunger instead.

  • cost: The amount of hunger points it costs to throw an ender pearl
  • cooldown (Default: 0): The duration ender pearls go on cooldown for, in addition to the default 1 second cooldown

artifacts:grow_plants_after_eating

Causes a bone meal effect to be applied when the player eats an item while standing on grass.

artifacts:increase_enchantment_level

Increases current the enchantment level of specific enchantments for the entity with this ability. Currently supported enchantments are Fortune, Looting, Luck of the Sea and Lure.

  • enchantment: An enchantment id
  • level (Default: 1): The amount to increase the enchantment level by.

artifacts:limited_water_breathing

Applies a water breathing effect with a limited duration when the player is not submerged.

  • duration: The duration the water breathing effect lasts for

artifacts:make_piglins_neutral

Makes piglins neutral, similar to gold armor.

artifacts:mob_effect

Applies a permanent mob effect to the entity.

  • mob_effect: A mob effect id
  • level (Default: 1): The level of the mob effect

artifacts:modify_hurt_sound

Plays an additional sound effect when the entity gets hurt.

  • sound: A sound event id

artifacts:night_vision

Applies a night vision effect to the player.

  • strength (Default: 1): Determines how strong the night vision effect is.

artifacts:nullify_ender_pearl_damage

Nullifies the damage from ender pearls.

artifacts:remove_bad_effects

Reduces the duration of effects in the artifacts:antidote_vessel_cancellable tag

  • duration: The duration in seconds that negative effects are reduced to

artifacts:replenish_hunger_on_grass

Replenishes hunger when the entity is standint on grass

  • duration: The duration in seconds it takes to regenerate a single food point

artifacts:scare_creepers

Makes nearby creepers run away from the entity.

artifacts:set_attackers_on_fire

Lights attacking entities on fire with some probability.

  • chance: The chance an attacking entity is lit on fire
  • cooldown (Default: 0): The amount of time in seconds the item goes on cooldown for after successfully lighting an entity on fire
  • duration: The duration attacking entities are set on fire for
  • grant_fire_resistance (Default: true): Whether the ability grants a temporary fire resistance effect after lighting an entity on fire

artifacts:sinking

Causes the entities movement to be unaffected by fluids.

artifacts:smelt_ores

Smelts ores mined by the entity.

artifacts:sneak_on_fluids

Allows the wearer to stand on fluids while sneaking.

artifacts:sprint_on_fluids

Allows the wearer to walk on fluids while sprinting.

artifacts:strike_attackers_with_lightning

Strikes attacking entities with lightning.

  • chance: The chance an attacking entity is struck with lightning
  • cooldown (Default: 0): The amount of time in seconds the item goes on cooldown for after succesfully striking an entity with lightning

artifacts:swim_in_air

Allows the player to swim in air.

  • flight_duration: The duration in seconds the player can swim in air before needing to recharge
  • recharge_duration: The amount of time it takes to recharge this ability

artifacts:teleport_on_death

Teleports the entity to a random location if the entity would otherwise die.

  • teleportation_chance: The chance the ability activates when the entity dies
  • health_restored (Default: 10): The amount of health points to restore when the ability activates
  • cooldown (Default: 0): The amount of time the item goes on cooldown for when the ability activates
  • consume: Wether the item is consumed when the ability activates

artifacts:thorns

Damages attacking entities.

  • chance: The chance an attacking entity is damaged
  • cooldown (Default: 0): The amount of time in seconds the item goes on cooldown for after successfully damaging an attacker
  • min_damage: The minimum amount of damage dealt
  • max_damage: The maximum amount of damage dealt

artifacts:upgrade_tool_tier

Upgrades the players base tool tier.

  • tier: The tier the player's base mining level is upgraded to. Can be one of wood, stone, iron, diamond or netherite.

artifacts:walk_on_powdered_snow

Allows the entity to walk on powdered snow.