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:
#attack speed error
1 messages · Page 1 of 1 (latest)
you need to double any " that you use inside of a string, otherwise it won't properly parse it
also, not 100% sure about this but you might need to put the name and lore BEFORE you put the nbt
also with nbt from should be with nbt compound from (if you are using SkBee)
thanks, ill try it!
i tried doubling all of the " and it didn't work
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.""
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.
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 ?
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(?)
thanks, that worked, but do u know how to get rid of this?:
just add HideFlags: 2 to either the end or beginning of the NBT compound
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}]}"
no it should be outside of the AttributeModifiers part
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"
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
oh ok
just outside of the {[ of the AttributeModifiers
TYSM!!! IT WORKED! sry if i was bad at skript
its all good, its more just NBT syntax than skript kek