#applying a special effect from an object in your hand

24 messages · Page 1 of 1 (latest)

hardy arch
#

I want to make sure that if the item is in the player's left hand, he is given a passive effect, for example + 50% damage or +20% movement speed. I know how to apply the effect of the potion event.server.run Command Silent(), but is it possible to do not the effect of the potion, namely the effect in % ?

past pondBOT
#

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

last dock
#

U can just add attributes to items

/give @p shears{AttributeModifiers:[{AttributeName:"generic.attack_damage",Amount:1.5,Slot:mainhand,Operation:1,Name:"generic.attack_damage",UUID:[I;-123713,18962,102933,-37924]},{AttributeName:"generic.movement_speed",Amount:1.2,Slot:mainhand,Operation:1,Name:"generic.movement_speed",UUID:[I;-123713,19062,102933,-38124]}]} 1```
hardy arch
#

ooh that's great, but how do I get a list of all the available commands of that type?

last dock
#

the only thing u have to do is create a recipe that adds that as NBT to an item -> thus people can craft said item

hardy arch
#

didn't understand what you mean. to make nbt for the subject so that the effect is issued?

last dock
#

u want to tie it to an item right?

#
event.remove({id: 'minecraft:diamond_sword'})
    event.shaped(Item.of('minecraft:diamond_sword', '{AttributeModifiers:[{Amount:1.5d,AttributeName:"generic.attack_damage",Name:"generic.attack_damage",Operation:1,Slot:"mainhand",UUID:[I;-123713,6474,15714,-12948]},{Amount:1.2d,AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Operation:1,Slot:"mainhand",UUID:[I;-123713,6574,15714,-13148]}],Damage:0}'), [
        " D ",
        " D ",
        " S "
    ], {
        D: "minecraft:diamond",
        S: "minecraft:stick"
    }).id('alwaysset:your_id')```
#

this could work

#

that actually gives u 150%, u can change the values to 0.5d and 0.2d respectivly

hardy arch
#

to the subject, yes, but will it only work if it is in the dominant hand?

#

and where did you get the part where the modification is written?

last dock
#

yes

#

Slot:"mainhand"

#

i used the above link to generate a command, to give myself the item
then just used
/kjs_hand

#

that gives me the
Item.of(item, nbt)

hardy arch
#

Can I change my dominant hand to another?

last dock
#

in the generator, yes

hardy arch
#

strange, that's all i see

last dock
#

click attributes

hardy arch
#

oh thank you very much. That's what I was looking for