Hello, I have a code:
[doublepost=1500628545,1500628380][/doublepost]I forgot to say, that I creating an auto-regen mine.
code_language.skript:
# There's errors on lines 3 and 10.
on break of any ore:
set {_oretype::*} to block split at "_"
position of block is {mine::%{_oretype::1}%}:
cancel event
set {_loc} to location of block
set {_loc} to "%{_loc}%"
replace all "x: ", "y: ", "z: " and "," with "" in {_loc}
console command "/setblock %{_loc}% minecraft:cobblestone replace" # I'm using console command, cuz its breaks block naturally.
give player 1 {_oretype::1} parsed as item type ore
wait 5 seconds
console command "/setblock %{_loc}% minecraft:%{_oretype::1}%_ore replace"