Command Block L'item sert tout

Oromis

Command-blocker slimesque
Staff
Modérateur
Support
11 Février 2014
3 345
2
1 053
297
24
Bretagne
Tu crées un scoreboard ayant pour critière "minecraft.used:minecraft.carrot_on_a_stick", celui-ci s'incrémentera à chaque fois qu'un joueur fait un clic droit avec un carrot on a stick.
Suffit après de faire l'effet désiré en détectant le passage du score à 1, puis reset en dernier lieu le score à 0 !
 

Dartsgame974

Mineur des cavernes
28 Avril 2019
66
0
33
20
Tu m’expliquer comme ce style:

/give (psuedo ou @a/p/e/..) (id) (nombre)
car moi je je comprends
/scoreboard objectives add seedP minecraft.used:minecraft.carrot_on_a_stick
^^^
moi je mettre une armure pas planter c'est ça



C'est bon j'ai trouvé
execute at @a[scores={carrot=1..}] as @a[scores={carrot=1..}] run execute as @s run "THE COMMAND YOU WANT TO EXECUTE"
mais la comme pour mettre larmure

scoreboard players reset @a[scores={carrot=1..}] carrot

et apres à que le carrot stick ?

en gros ça fonctionne pas!
Celui la
scoreboard objectives add carrot minecraft.used:minecraft.carrot_on_a_stick

iu

Celui la
execute at @a[scores={carrot=1..}] as @a[scores={carrot=1..}] run execute as @s run /testfor @p {Inventory:[{Slot:100b,id:"minecraft:diamond_boots",tag:{display:{Name:"Jump Boots"}}}]} run execute as @s run /testfor @p {Inventory:[{Slot:100b,id:"minecraft:diamond_plastron",tag:{display:{Name:"Jump Boots"}}}]} run execute as @s run /testfor @p {Inventory:[{Slot:100b,id:"minecraft:diamond_helmet",tag:{display:{Name:"Jump Boots"}}}]} run execute as @s run /testfor @p {Inventory:[{Slot:100b,id:"minecraft:diamond_panatlon",tag:{display:{Name:"Jump Boots"}}}]}
iu

celui la
scoreboard players reset @a[scores={carrot=1..}] carrot


c'est ça?
 

Oromis

Command-blocker slimesque
Staff
Modérateur
Support
11 Février 2014
3 345
2
1 053
297
24
Bretagne
Oulala !
Dans l'idée, oui c'est ça mais :
  • Pourquoi mettre un execute dans un execute ?
  • La commande testfor n'existe plus depuis la 1.13
  • Tu ne peux pas mettre d'autres commandes après une commande sauf si celle-ci est un execute

Bref, je vais te demander de rendre plus lisible tes commande pour que j'y comprenne quelque chose x')
Pour cela, passe par la balise "code" :
[‎‎code]une commande[/code]
[‎code]une autre commande[/code]
 

Dartsgame974

Mineur des cavernes
28 Avril 2019
66
0
33
20
en gros ça fonctionne pas!
Celui la
scoreboard objectives add carrot minecraft.used:minecraft.carrot_on_a_stick



iu


Celui la
Code:
execute at @a[scores={carrot=1..}] as @a[scores={carrot=1..}] run execute as @s run /testfor ou give @p {Inventory:[{Slot:100b,id:"minecraft:diamond_chestplate",tag:{display:{Name:"Jump Boots"}}}]}


iu


celui la
scoreboard players reset @a[scores={carrot=1..}] carrot
 

Oromis

Command-blocker slimesque
Staff
Modérateur
Support
11 Février 2014
3 345
2
1 053
297
24
Bretagne
Alors ça, ce n'est pas une commande valide hein
Code:
execute at @a[scores={carrot=1..}] as @a[scores={carrot=1..}] run execute as @s run /testfor ou give @p {Inventory:[{Slot:100b,id:"minecraft:diamond_chestplate",tag:{display:{Name:"Jump Boots"}}}]}