#Why isn't my tool modification script working?

14 messages · Page 1 of 1 (latest)

harsh hull
#

I'm trying to rebalance the axe, and the speed works fine but when I tried adding the line to change the damage it broke the script. I pretty much copied it directly from the wiki, so I'm not really sure what I could've done wrong

ItemEvents.modification(event => {
event.modify('minecraft:iron_axe', item => {
item.attackDamage = 6.0
item.attackSpeed = -3.2
})
})

cyan galleonBOT
#

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

visual rune
#

??codeblock

neat agateBOT
# visual rune ??codeblock

You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes

```js :arrow_left:

ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})

``` :arrow_left:

This example will look like this:

ServerEvents.recipes(event => {
  event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
visual rune
#

??helpyou

neat agateBOT
# visual rune ??helpyou

╰( ͡° ͜ʖ ͡° )つ──☆:・゚˜”°•.˜”°• Many Help •°”˜.•°”˜*
Please provide a description of your issue with as much detail as possible. If you have an issue with a script provide the script. Explain what you can see happening and what you expect to happen. Be specific!

Tell us what is happening, we already know it "doesn't work".
Avoid using words like "it", tell us exactly what "it" is.
Don't assume anyone knows what you are talking about, be specific.

Provide screenshots or video of the issue if possible.

Provide the log.

visual rune
#

Tbh it should have worked from what I can see

#

The negative

#

Remove the negative and just set it to 0.01 or sum

#

Why are you even trying to negate it

#

That makes 0 sense

harsh hull
#

I’m not trying to remove its speed, the way the speed works is weird. I want it to be at 1.2 but when I set the speed to 1.2 it sets it to 5.2 instead for some reason. So I just subtracted four and it worked. I mean technically it didn’t work because I suck at math and got 1.2-4 wrong somehow but when I changed it to -2.8 it worked

#

The speed isn’t the issue though because that line works perfectly, the log said the issue was with the attack damage modification

#

I’m not at my computer right now but I can provide the log in a couple minutes