mojira.dev
MC-237383

attribute generic attack damage does not work on a carrot on a stick against players

I /gave myself a a carrot on a stick with the attribute of generic attack damage of 7. it works as expected against mobs but it does the normal (for a carrot on a stick) damage against players

 

Command: give @a[tag=Click] minecraft:carrot_on_a_stick{Base:{Type:"SWORD",Rarity:"RARE",RarityColor:'

{"text":"","color":"blue"}

',Enchantments:[],AnvilUses:0,RepairCost:0,Reforge:"",Damage:100,BaseDamage:100,Strength:100,BaseStrength:100,Abilities:[
{Name:"Instant Transmission",Activation:"RIGHT CLICK",Type:"Item Ability"}]},HideFlags:63,Unbreakable:1b,Description:['[
{"text":"Item Ability: ","color":"gold","italic":false},
{"text":"Instant Transmission","color":"gold","italic":false},
{"text":" RIGHT CLICK","color":"yellow","italic":false,"bold":true}]','[
{"text":"Teleport ","color":"gray","italic":false},
{"text":"12 blocks ","color":"green","italic":false},
{"text":"ahead of","color":"gray","italic":false}]','[
{"text":"you and gain +50 ","color":"gray","italic":false},
{"text":"Speed","color":"white","italic":false}]','[
{"text":"for ","color":"gray","italic":false},
{"text":"3 seconds","color":"green","italic":false}]','[
{"text":"Mana cost: ","color":"dark_gray","italic":false},
{"text":"50","color":"dark_aqua","italic":false}]','[
{"text":""}]'],display:{Name:'[

{"text":"Aspect of the End","color":"blue","italic":false}

]',Lore:['[
{"text":"Damage: ","color":"gray","italic":false},
{"text":"+100","color":"red","italic":false}]','[
{"text":"Strength: ","color":"gray","italic":false},
{"text":"+100","color":"red","italic":false}]','[
{"text":""}]','[
{"text":"Item Ability: ","color":"gold","italic":false},
{"text":"Instant Transmission","color":"gold","italic":false},
{"text":" RIGHT CLICK","color":"yellow","italic":false,"bold":true}]','[
{"text":"Teleport ","color":"gray","italic":false},
{"text":"8 blocks ","color":"green","italic":false},
{"text":"ahead of","color":"gray","italic":false}]','[
{"text":"you and gain +50 ","color":"gray","italic":false},
{"text":"Speed","color":"white","italic":false}]','[
{"text":"for ","color":"gray","italic":false},
{"text":"3 seconds","color":"green","italic":false}]','[
{"text":""}]','[
{"text":"This item can be reforged!","color":"dark_gray","italic":false}]','[
{"text":"RARE SWORD","color":"blue","italic":false,"bold":true}]']},CustomModelData:1,tp:1a+,attribute:minecraft.generic.attack.damage,amount:7}+

Comments 4

Please provide the command used, and, if possible, a video showing the issue.

Your command is not using any enchantments or attribute modifiers... (you do provide data, but completely incorrectly, they have no effect)

look near the botom, the last thing is attribute:minecraft.generic.attack.damage,amount:7} but yes most of the stuff is just lore

 

Edit: I bolded and underlined the attribute

 

That is not at all how you add attributes to an item. Please do not use the bug tracker for assistance with commands

Rohidip_Rider

(Unassigned)

Unconfirmed

(Unassigned)

1.17.1

Retrieved