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.