From 0fbc481ab3a1f45e1894783bd9e746912cf51a43 Mon Sep 17 00:00:00 2001 From: KonSola5 <125081901+KonSola5@users.noreply.github.com> Date: Fri, 23 Jan 2026 21:51:31 +0100 Subject: [PATCH 1/3] Add updated examples for tiers --- wiki/tutorials/custom-tiers/page.kubedoc | 71 ++++++++++++++++++------ 1 file changed, 54 insertions(+), 17 deletions(-) diff --git a/wiki/tutorials/custom-tiers/page.kubedoc b/wiki/tutorials/custom-tiers/page.kubedoc index fa8a78d1..08f65c85 100644 --- a/wiki/tutorials/custom-tiers/page.kubedoc +++ b/wiki/tutorials/custom-tiers/page.kubedoc @@ -3,33 +3,70 @@ They are not reloadable without restarting the game. # Tool Tiers +|> 1.21.1 ```js ItemEvents.toolTierRegistry(event => { - event.add('tier_id', tier => { - tier.uses = 250 - tier.speed = 6 - tier.attackDamageBonus = 2 - tier.level = 2 - tier.enchantmentValue = 14 - tier.repairIngredient = '#forge:ingots/iron' - }) + event.add('tier_id', tier => { + tier.uses = 250 + tier.speed = 6 + tier.attackDamageBonus = 2 + tier.incorrectBlocksForDropsTag = '#minecraft:incorrect_for_iron_tool' + tier.enchantmentValue = 14 + tier.repairIngredient = '#forge:ingots/iron' + }) }) ``` +<||> 1.19.2 - 1.20.1 +```js +ItemEvents.toolTierRegistry(event => { + event.add('tier_id', tier => { + tier.uses = 250 + tier.speed = 6 + tier.attackDamageBonus = 2 + tier.level = 2 + tier.enchantmentValue = 14 + tier.repairIngredient = '#forge:ingots/iron' + }) +}) +``` +<| # Armor Tiers +|> 1.21.1 +```js +StartupEvents.registry('armor_material', event => { + event + .create('tier_id') + // How many armor points does each piece of armor contribute. You can also use 'body' to create a piece of armor + // which gives armor points regardless of where it is worn. + .defense({ boots: 2, leggings: 5, chestplate: 6, helmet: 2 }) + // The enchantment value. + .enchantmentValue(9) + // The equip sound. It may be a string representing a sound. + .equipSound('minecraft:item.armor.equip_iron') + // A **supplier** of the repair ingredient to use. It's a function that returns an Ingredient. + .repairIngredient(() => Ingredient.of('#forge:ingots/iron')) + // Armor toughness. Diamond has 2, Netherite has 3. + .toughness(0) + // Knockback resistance. Netherite has 0.1. + .knockbackResistance(0) +}) +``` +<||> 1.19.2 - 1.20.1 ```js ItemEvents.armorTierRegistry(event => { - event.add('tier_id', tier => { - tier.durabilityMultiplier = 15 // Each slot will be multiplied with [13, 15, 16, 11] - tier.slotProtections = [2, 5, 6, 2] // Slot indicies are [FEET, LEGS, BODY, HEAD] - tier.enchantmentValue = 9 - tier.equipSound = 'minecraft:item.armor.equip_iron' - tier.repairIngredient = '#forge:ingots/iron' - tier.toughness = 0 // diamond has 2, netherite 3 - tier.knockbackResistance = 0 - }) + event.add('tier_id', tier => { + tier.durabilityMultiplier = 15 // Each slot will be multiplied with [13, 15, 16, 11] + tier.slotProtections = [2, 5, 6, 2] // Slot indicies are [FEET, LEGS, BODY, HEAD] + tier.enchantmentValue = 9 + tier.equipSound = 'minecraft:item.armor.equip_iron' + tier.repairIngredient = '#forge:ingots/iron' + tier.toughness = 0 // diamond has 2, netherite 3 + tier.knockbackResistance = 0 + }) }) ``` +<| For default values see [[/tutorials/item-modification|item modification tutorial]]. \ No newline at end of file From 37642d552ee3c32e6674789261cfc584e3a484e5 Mon Sep 17 00:00:00 2001 From: KonSola5 <125081901+KonSola5@users.noreply.github.com> Date: Tue, 3 Feb 2026 13:01:44 +0100 Subject: [PATCH 2/3] Bad hash! --- wiki/tutorials/custom-tiers/page.kubedoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wiki/tutorials/custom-tiers/page.kubedoc b/wiki/tutorials/custom-tiers/page.kubedoc index 08f65c85..f871e2bf 100644 --- a/wiki/tutorials/custom-tiers/page.kubedoc +++ b/wiki/tutorials/custom-tiers/page.kubedoc @@ -10,7 +10,7 @@ ItemEvents.toolTierRegistry(event => { tier.uses = 250 tier.speed = 6 tier.attackDamageBonus = 2 - tier.incorrectBlocksForDropsTag = '#minecraft:incorrect_for_iron_tool' + tier.incorrectBlocksForDropsTag = 'minecraft:incorrect_for_iron_tool' tier.enchantmentValue = 14 tier.repairIngredient = '#forge:ingots/iron' }) @@ -69,4 +69,4 @@ ItemEvents.armorTierRegistry(event => { ``` <| -For default values see [[/tutorials/item-modification|item modification tutorial]]. \ No newline at end of file +For default values see [[/tutorials/item-modification|item modification tutorial]]. From e801922b2e7af4c18a509cd5ac56217e88e73c16 Mon Sep 17 00:00:00 2001 From: KonSola5 <125081901+KonSola5@users.noreply.github.com> Date: Sat, 20 Jun 2026 12:16:35 +0200 Subject: [PATCH 3/3] NeoForge uses `c` tags, also change `body` description --- wiki/tutorials/custom-tiers/page.kubedoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wiki/tutorials/custom-tiers/page.kubedoc b/wiki/tutorials/custom-tiers/page.kubedoc index f871e2bf..12453c8c 100644 --- a/wiki/tutorials/custom-tiers/page.kubedoc +++ b/wiki/tutorials/custom-tiers/page.kubedoc @@ -12,7 +12,7 @@ ItemEvents.toolTierRegistry(event => { tier.attackDamageBonus = 2 tier.incorrectBlocksForDropsTag = 'minecraft:incorrect_for_iron_tool' tier.enchantmentValue = 14 - tier.repairIngredient = '#forge:ingots/iron' + tier.repairIngredient = '#c:ingots/iron' }) }) ``` @@ -38,15 +38,15 @@ ItemEvents.toolTierRegistry(event => { StartupEvents.registry('armor_material', event => { event .create('tier_id') - // How many armor points does each piece of armor contribute. You can also use 'body' to create a piece of armor - // which gives armor points regardless of where it is worn. + // How many armor points does each piece of armor contribute. + // 'body' can be also used to represent a piece of horse armor (covering whole body). .defense({ boots: 2, leggings: 5, chestplate: 6, helmet: 2 }) // The enchantment value. .enchantmentValue(9) // The equip sound. It may be a string representing a sound. .equipSound('minecraft:item.armor.equip_iron') // A **supplier** of the repair ingredient to use. It's a function that returns an Ingredient. - .repairIngredient(() => Ingredient.of('#forge:ingots/iron')) + .repairIngredient(() => Ingredient.of('#c:ingots/iron')) // Armor toughness. Diamond has 2, Netherite has 3. .toughness(0) // Knockback resistance. Netherite has 0.1.