#What's the easiest way to make a tool tier that has the exact same stats as a vanilla tier

41 messages · Page 1 of 1 (latest)

wraith crag
#

For example, I want to create a opy of the stone tool set

echo nicheBOT
#

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

dense timber
#

why would you need to do this? isn't it easier just to use the same tier?

wraith crag
#

Can I create a tool that uses the stone tier but has a separate repair item?

rapid token
#

Yeah just used item modification to change it afterwards

wraith crag
#

tool tier modification is broken :/

#
ItemEvents.toolTierRegistry (event => {
    event.add('flint', tier => {
      tier.uses = 59
      tier.speed = 2.0
      tier.attackDamageBonus = 0.0
      tier.level = 0
      tier.enchantmentValue = 15
      tier.repairIngredient = 'minecraft:flint'
    })
})``` So I copied the stats of wooden tools from the minecraft wiki
#
    event.create('modpack:flint_axe', 'axe').tier('flint').displayName("Flint Axe")
    event.create('modpack:flint_pickaxe', 'pickaxe').tier('flint').displayName("Flint Pickaxe")
    event.create('modpack:flint_shovel', 'shovel').tier('flint').displayName("Flint Shovel")
    event.create('modpack:flint_hoe', 'hoe').tier('flint').displayName("Flint Hoe")
    event.create('modpack:flint_sword', 'sword').tier('flint').displayName("Flint Sword")```
#

Some of the tools have different stats compared to their vanilla couterparts and some are completely broken

cunning sandal
#

sec lemme grab my script, i have a working flint tier

#
ItemEvents.toolTierRegistry(event => {
    event.add('flint', tier => {
        tier.uses = 32
        tier.speed = 2
        tier.attackDamageBonus = 1.0
        tier.level = 0
        tier.enchantmentValue = 5
        tier.repairIngredient = 'minecraft:flint'
    })
})```
wraith crag
cunning sandal
#

whats the attack stat of a wooden hoe?

cunning sandal
#

what about the other tools

#

what is your flint axe damage

#

hmm actually

#

sec

cunning sandal
willow flumeBOT
#

[Quote ➤](#1172568760788451359 message) js ItemEvents.modification(event => { //defining the sword we want to modify event.modify(`minecraft:diamond_sword`, item => { //boost is the amount we want to add to the diamond sword's current damage, eventually totaling 10 (diamond sword has 7 by default) let boost = 3 //attribute is the item's current attribute, we need this so we can use it in the addAttribute later let attribute = item.getAttributes("generic.attack_damage").get(0) //we need to remove the sword's current attribute so we overwrite the whole attribute of the sword item.removeAttribute("generic.attack_damage", attribute.id) //here we add the final attribute, the attribute.id in this case will be the attribute's UUID //this here (attribute.amount + boost) is adding our boost (in this case its set to 3) to the current attack damage //of the sword, attribute.operation will grab the operation of the sword's generic.attack_damage(whatever the mod/minecraft) //decided to use for it, in this case it is addition item.addAttribute("generic.attack_damage", attribute.id, attribute.name, attribute.amount + boost, attribute.operation) }); })

wraith crag
cunning sandal
#

this is a workaround because tiers doesnt work

cunning sandal
#

frankly the other item.attackDamage in the other method doesnt work for most modded items either

wraith crag
cunning sandal
#

yeah tier creation works

#

tier modification doesnt

wraith crag
#

I tried to use speed and speedBaseline on the axe (with a speed of 0.9 by default) and I got some weird results

#

speed(0.8) didn't do anything

#

speedbaseline(0.8) made it go to 4.something

#

speedbaseline(-0.1) made it 3.9

#

I don't get how any of this works, I dont know why the values are what they are by default

cunning sandal
#

well, most modded items anyways

#

also the attack speed is different than the flat value you see in the tooltip

wraith crag
#

Ugh why is this so complicated I just want them to have the same stats as wooden tools

cunning sandal
#

it seems like the hoe is the only tool that needs changing though right?

#

and if the other tools are being weird too then worst cases scenario you only have to change the attributes of what, 5 items?