question pour créer un loot chest custom

dragonmgc

Bucheron
2 Décembre 2021
8
2
1
14
23
France sud
www.twitch.tv
Bonjour, je fais un mini jeu sur un serveur prive avec des collègue de travail, nous sommes en version 1.19.2. J'ai pour tache de faire un coffre avec un loot custom de départ, je dois utiliser des commande block pour faire ceci.
dedans il doit y avoir :
  • potion de vitesse
  • pomme d'or
  • arc
  • flèche

J'ai déjà une partie de la commande mais le problème viens a quand je dois faire la potion. J'ai utiliser plusieurs méthodes mais rien a faire la commande ne fonction pas.

j'ai utiliser aussi cette commande mais cela ne fonction pas.
minecraft:potion{Potion:"minecraft:water",CustomPotionEffects:[{Id:1,Duration:1200}],display:{Name:"\"vitesse\""}}

voici la commande que j'ai pour le moment.
/setblock 99969 145 99982 minecraft:chest{Items:[{Slot:13,id:"bow",Count:1},{Slot:4,id:"minecraft:arrow",Count:64},{Slot:12,id:"minecraft:golden_apple",Count:4},{Slot:14,id:"minecraft:arrow",Count:64},{Slot:22,id:"minecraft:potion{Potion:"minecraft:water",CustomPotionEffects:[{Id:1,Amplifier:1}]",Count:4}]}
 
Dernière édition par un modérateur:
Solution
Le count doit être en dehors du tag :
Code:
{Slot:22,id:"minecraft:potion",tag:{Potion:"minecraft:water",CustomPotionEffects:[{Id:1,Amplifier:1}],Count:4}}
                               -----------------------------------------------------------------------^^^^^^^-

{Slot:22,id:"minecraft:potion",tag:{Potion:"minecraft:water",CustomPotionEffects:[{Id:1,Amplifier:1}]},Count:4}
                               ----------------------------------------------------------------------- ^^^^^^^
Car Mojang a trouvé rigolo de mettre zéro par défaut.
Un gros merci a vous c'est la bonne solution
Cordialement
dragonmgc

ShE3py

Enbogueuse
Support
26 Septembre 2015
4 449
195
492
247
21
Mìlhüsa
Bonsoir,

Le tag doit être hors de l'identifiant de l'item ;
Code:
{Slot:22,id:"minecraft:potion",tag:{Potion:<etc.>}}

Cordialement,
ShE3py
 

dragonmgc

Bucheron
2 Décembre 2021
8
2
1
14
23
France sud
www.twitch.tv
Bonsoir,

Le tag doit être hors de l'identifiant de l'item ;
Code:
{Slot:22,id:"minecraft:potion",tag:{Potion:<etc.>}}

Cordialement,
ShE3py
si je comprend bien je dois faire une commande comme ceci

Code:
/setblock 99969 145 99982 minecraft:chest{Items:[{Slot:13,id:"bow",Count:1},{Slot:4,id:"minecraft:arrow",Count:64},{Slot:12,id:"minecraft:golden_apple",Count:4},{Slot:14,id:"minecraft:arrow",Count:64},{Slot:22,id:"minecraft:potion",tag:{Potion:<minecraft:water>,CustomPotionEffects:[{Id:1,Amplifier:1}]",Count:1}]}
mais quand j'écirs ceci il me dis que la commande ne marche pas

j'ai même essayer avec juste la potion et il me dis encore que la commande ne marche
Code:
/setblock 99969 145 99982 minecraft:chest{Items:[{Slot:22,id:"minecraft:potion",tag:{Potion:"minecraft:water",CustomPotionEffects:[{Id:1,Amplifier:1}],Count:1}}]}

quand je fais cette commande il me donne un coffre avec une potion sans effet mais je n'arrive pas a mettre d'effet dans la potion

Code:
/setblock 99969 145 99982 minecraft:chest{Items:[{Slot:22,id:"minecraft:potion",tag:minecraft_potion,id:1,Count:1}]}

Cordialement
dragonmgc
 
Dernière édition:

ShE3py

Enbogueuse
Support
26 Septembre 2015
4 449
195
492
247
21
Mìlhüsa
Le count doit être en dehors du tag :
Code:
{Slot:22,id:"minecraft:potion",tag:{Potion:"minecraft:water",CustomPotionEffects:[{Id:1,Amplifier:1}],Count:4}}
                               -----------------------------------------------------------------------^^^^^^^-

{Slot:22,id:"minecraft:potion",tag:{Potion:"minecraft:water",CustomPotionEffects:[{Id:1,Amplifier:1}]},Count:4}
                               ----------------------------------------------------------------------- ^^^^^^^
Car Mojang a trouvé rigolo de mettre zéro par défaut.
 

dragonmgc

Bucheron
2 Décembre 2021
8
2
1
14
23
France sud
www.twitch.tv
Le count doit être en dehors du tag :
Code:
{Slot:22,id:"minecraft:potion",tag:{Potion:"minecraft:water",CustomPotionEffects:[{Id:1,Amplifier:1}],Count:4}}
                               -----------------------------------------------------------------------^^^^^^^-

{Slot:22,id:"minecraft:potion",tag:{Potion:"minecraft:water",CustomPotionEffects:[{Id:1,Amplifier:1}]},Count:4}
                               ----------------------------------------------------------------------- ^^^^^^^
Car Mojang a trouvé rigolo de mettre zéro par défaut.
Un gros merci a vous c'est la bonne solution
Cordialement
dragonmgc
 
Solution