#attack speed error

1 messages · Page 1 of 1 (latest)

lapis orchid
#

I am trying to make my item have a -1000000 attack speed and I cant seem to get it to work. This is the code: give player carrot on a stick with custom model data 2 with nbt from "{AttributeModifiers:[{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:-1000000,Operation:0,UUID:[I;-1539450748,1950895094,-1261034484,2021254507],Slot:"mainhand"}]} 1" named "&4Assault Rifle" with lore "&6[Left Click to fire] [Right Click to aim]" and "&4Type: &cFully-automatic."
and here is the error:

faint shuttle
lapis orchid
#

i tried doubling all of the " and it didn't work

lapis orchid
# faint shuttle you need to double any `"` that you use inside of a string, otherwise it won't p...

was this the correct wayt to do it?give player carrot on a stick with custom model data 2 with nbt compound from ""{AttributeModifiers:[{AttributeName:""generic.attack_speed"",Name:""generic.attack_speed"",Amount:-1000000,Operation:0,UUID:[I;-1539450748,1950895094,-1261034484,2021254507],Slot:""mainhand""}]} 1"" named ""&4Assault Rifle"" with lore ""&6[Left Click to fire] [Right Click to aim]"" and ""&4Type: &cFully-automatic.""

faint shuttle
#

oh not every quote needs to be doubled, only the ones INSIDE of the quotes of the nbt string, so only the ones for the generic_attack_speed etc.

lapis orchid
#

oh, thanks!

#

that got rid of the error, thanks for your help!

#

actually it didnt work, even tho it has no error.

#

it didnt have the -1000000 attackspeed

#

do you know why @faint shuttle ?

faint shuttle
#

ok i somehow managed to get it to work, but i really dont know why.

#

give player carrot on a stick named "&4Assault Rifle" with lore "&6[Left Click to fire] [Right Click to aim]" and "&4Type: &cFully-automatic." with custom model data 2 with nbt compound from "{AttributeModifiers:[{AttributeName:""generic.attack_speed"",Name:""GENERIC.ATTACK_SPEED"",Amount:-1000.0,Operation:0,UUID:[I; 42853, 1689024593, -201178, -1559272105],Slot:""mainhand""}]}"

#

i think it had to do with the fact that the Amount was supposed to be a double(?)

lapis orchid
#

thanks, that worked, but do u know how to get rid of this?:

faint shuttle
#

just add HideFlags: 2 to either the end or beginning of the NBT compound

lapis orchid
#

ok, thanks!

#

at the end like this? "{AttributeModifiers:[{AttributeName:""generic.attack_speed"",Name:""GENERIC.ATTACK_SPEED"",Amount:-1000.0,Operation:0,UUID:[I; 42853, 1689024593, -201178, -1559272105],Slot:""mainhand"",HideFlags: 2}]}"

faint shuttle
#

no it should be outside of the AttributeModifiers part

lapis orchid
#

ok

#

i did that and it just got rid of the -1000 attack speed

#

like it still has normal attack speed

#

"{AttributeModifiers:[{AttributeName:""generic.attack_speed"",Name:""GENERIC.ATTACK_SPEED"",Amount:-1000.0,Operation:0,UUID:[I; 42853, 1689024593, -201178, -1559272105],Slot:""mainhand""}]}HideFlags: 2"

faint shuttle
#
with nbt compound from "{AttributeModifiers:[{AttributeName:""generic.attack_speed"",Name:""GENERIC.ATTACK_SPEED"",Amount:-1000.0,Operation:0,UUID:[I; 42853, 1689024593, -201178, -1559272105],Slot:""mainhand""}],HideFlags: 2}"

#

it still has to be in the brackets

lapis orchid
#

oh ok

faint shuttle
#

just outside of the {[ of the AttributeModifiers

lapis orchid
#

TYSM!!! IT WORKED! sry if i was bad at skript

faint shuttle
#

its all good, its more just NBT syntax than skript kek