#How can I change the tier of an existing tool?

3 messages · Page 1 of 1 (latest)

brazen widget
#

I am trying to change stone tools into copper tools. I got textures, and lang changes done. All that is left is to change the durability and the repair material.

I can do this to change the durability:

event.modify('minecraft:stone_sword', mod => {
  mod.maxDamage = 256;
});

But if I try to do this to change the whole tier (and therefore get the right repair material):

event.modify('minecraft:stone_sword', mod => {
  mod.tier = tier => {
    tier.uses = 256
    tier.attackDamageBonus = 2.0
    tier.speed = 4.0
    tier.level = 1
    tier.enchantmentValue = 5
    tier.repairIngredient = 'minecraft:copper_ingot'
  };
});

Then it does not work, but I get no errors.

winged quartzBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

naive bear
#

What I like to do:

//Create an item
event.create('ae2:fluix_cutting_knife', 'sword').tier('fluix').unstackable().group('tools')
//Create custom tier for it
ItemEvents.toolTierRegistry(event =>{
    event.add('fluix', tier =>{
        tier.uses = 512
        tier.speed = 0.3
        tier.attackDamageBonus = 0.3
        tier.level = 2
        tier.enchantmentValue = 6
        tier.repairIngredient = 'ae2:fluix_crystal'
    })
})```
You can also use `event.create` with existing items to add custom tiers that way