Salut, j'ai mis des petit notations (les #) pour t'aider à comprend le code ! J'ai aussi corrigé pour ne plus récolter la bedrock ^^
on mine: #Lorsqu'un joueur mine un block
if tool is a diamond pickaxe: #On vérifie si l'outil du joueur est bel est bien une pioche en diamant
if name of tool is "&5〘Hammer〙": #On vérifie si c'est bel et bien un hammer (grâce à son nom)
set {_1} to location of event-block
set {_2} to location of event-block
if player's pitch is between -50 and 50:
add 1 to y-coord of {_1}
subtract 1 from y-coord of {_2}
if player's horizontal facing is west or east:
add 1 to z-coord of {_1}
subtract 1 from z-coord of {_2}
loop blocks within {_1} to {_2}: #Jusqu'ici je te passes les détails parce que c'est assez compliqué, en gros ça regarde les blocks que tu es censé casser avec le hammer
loop-block isn't bedrock #C'est ici que j'ai changé le code, ça regarde si le block n'est pas un block de bedrock
skellett break loop-block naturally using player's tool
else if player's horizontal facing is north or south:
add 1 to x-coord of {_1}
subtract 1 from x-coord of {_2}
loop blocks within {_1} to {_2}:
loop-block isn't bedrock #Ici aussi
skellett break loop-block naturally using player's tool
else:
add 1 to x-coord of {_1}
add 1 to z-coord of {_1}
subtract 1 from x-coord of {_2}
subtract 1 from z-coord of {_2}
loop blocks within {_1} to {_2}:
loop-block isn't bedrock #Pareil là
skellett break loop-block naturally using player's tool