#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)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
why would you need to do this? isn't it easier just to use the same tier?
Can I create a tool that uses the stone tier but has a separate repair item?
Yeah just used item modification to change it afterwards
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
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'
})
})```
The stats still seem a bit off...
whats the attack stat of a wooden hoe?
#1172568760788451359 message you can actually manually change the tool's attributes like this
[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) }); })
I'm a bit confused, how is that different from this?
this is a workaround because tiers doesnt work
frankly the other item.attackDamage in the other method doesnt work for most modded items either
I thought that was only modification??
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
this works for vanilla items, not for modded i believe
well, most modded items anyways
also the attack speed is different than the flat value you see in the tooltip
Ugh why is this so complicated I just want them to have the same stats as wooden tools
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?
this script essentially does the same thing the item modification script does i believe #1173344984506835084 message