EarthDig:
type: world
debug: true
events:
on player left clicks:
- if <player.flag[element]> == earth && !<player.has_flag[element_toggled]> {
- if <li@m@sand|m@clay|m@dirt|m@grass|m@gravel|m@diorite|m@cobblestone|m@stone|m@polished_diorite|m@andesite|m@polished_andesite|m@granite|m@polished_granite.contains[<player.location.cursor_on[5].material>]> {
- - define bmat li@
+ - define bmat <player.location.cursor_on[5].find.blocks[<li@m@sand|m@clay|m@dirt|m@grass|m@gravel|m@diorite|m@cobblestone|m@stone|m@polished_diorite|m@andesite|m@polished_andesite|m@granite|m@polished_granite>].within[2].parse[material]>
- define blocs li@
- foreach <player.location.cursor_on[5].find.blocks[<li@m@sand|m@clay|m@dirt|m@grass|m@gravel|m@diorite|m@cobblestone|m@stone|m@polished_diorite|m@andesite|m@polished_andesite|m@granite|m@polished_granite>].within[2]> {
- - modifyblock <def[value]> m@air
- - define bmat <def[blocks].include[<def[value].parse[material]>
- - define blocs <def[blocs].include[<def[value]>
- }
+ - modifyblock <def[value]> m@air
+ - define blocs <def[blocs].include[<def[value]>]>
+ }
+ - wait 2m
- - wait 10s
- foreach <def[blocs]> {
- define current <def[blocs].get[<def[loop_index]>]>
- - foreach bmat {
+ - foreach <def[bmat]> {
- modifyblock <def[current]> <def[value]>
}
}
- }
- }
+ }
+ }