Salut, j'ai fais ce que tu demandes avec une petite optimisation légère
on left click with a stone sword on a door:
if {crochet::%player%} is not set:
set {crochet::%player%} to true
while target block is a door:
add 1 to {_counter}
clear {_bar::*}
loop 10 times:
if {_counter} >= loop-value:
add "&c▌" to {_bar::*}
else:
add "&3▌" to {_bar::*}
set {_bar} to "%{_bar::*}%"
replace all ", " and " and " in {_bar} with ""
send action bar "&3Crochetage: %{_bar}%" to player
if {_counter} = 10:
send action bar "&3Crochetage: &aDéverouillé !" to player
remove 1 of stone sword from player's inventory
toggle clicked block
clear {crochet::%player%}
stop
wait 20 tick
clear {crochet::%player%}
Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.