Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
on mine:
if player's tool is diamond pickaxe:
set {_x1} to x-coord of block's location
set {_y1} to y-coord of block's location
set {_z1} to z-coord of block's location
set {_x2} to x-coord of block's location
set {_y2} to y-coord of block's location
set {_z2} to z-coord of block's location
if player's pitch is between -50 and 50:
if player's horizontal facing is west or east:
add 1 to {_y1}
add 1 to {_z1}
remove 1 from {_y2}
remove 1 from {_z2}
else if player's horizontal facing is north or south:
add 1 to {_x1}
add 1 to {_y1}
remove 1 from {_x2}
remove 1 from {_y2}
else:
add 1 to {_x1}
add 1 to {_z1}
remove 1 from {_x2}
remove 1 from {_z2}
set {_coord1} to location at {_x1}, {_y1}, {_z1} in player's world
set {_coord2} to location at {_x2}, {_y2}, {_z2} in player's world
set {_durability} to durability of player's tool
loop blocks within {_coord1} to {_coord2}:
if loop-value is not bedrock or air:
add 1 to {_count}
naturally break loop-value with player's tool
set {_calc} to {_durability} + {_count}
set durability of player's tool to {_calc}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.