Super Digger

Introduction

Let’s build a command that gives you super digging powers!

Super digging!

Step 1: Chat Command

Replace “run” with “dig” in the ||player:on chat command|| block.

player.onChat("dig", function () {
})

Step 2: Mine a little

Use the ||blocks:fill|| block to fill in air just below your current location when the chat command is entered.

player.onChat("dig", function () {
        blocks.fill(blocks.block(Block.Air), positions.create(0, 0, 0), positions.create(0, -1, 0))
})

Step 3: Mine some more

Set the values in the from location to be ~-1 ~0 ~-1. Then, set the values in the to location as ~1 ~1 ~1.

player.onChat("dig", function () {
        blocks.fill(blocks.block(Block.Air), positions.create(-1, 0, -1), positions.create(1, 1, 1))
})

Step 4: Try digging

Go to Minecraft and move near something. Press t to open the chat and enter dig. If your world isn’t flat, you will dig out blocks near you.

Step 5: Mine a lot

We don’t want to mine just a few blocks at a time, so let’s edit the from and to positions in the ||blocks:fill|| block to mine a 5x5x5 cube. Digging it big time!

player.onChat("dig", function () {
    blocks.fill(blocks.block(Block.Air), positions.create(-2, 0, -2), positions.create(2, 5, 2))
})

Step 6: Try a big dig

Go to Minecraft, press t to open the chat and enter dig. Try moving into things and the use the dig command! GRIEFING ALERT! This mod can mess up your world!

Step 7: Keep digging and digging

Place a ||loops:while|| block around the ||blocks:fill|| block to repeat it forever. Change the -2 values to -5 and the 2 values to 5.

player.onChat("dig", function () {
    while (true) {
        blocks.fill(
            blocks.block(Block.Air),
            positions.create(-5, 0, -5),
            positions.create(5, 5, 5),
            FillOperation.Replace
        )
    }
})

Step 8

Go to Minecraft and enter dig in the chat. Now, as you move you will be an unstoppable force of destruction! GRIEFING ALERT! This mod can mess up your world!

Step 9: Dig under your feet

Edit the position in ||blocks:fill|| to dig under the player’s feet.

player.onChat("dig", function () {
    while (true) {
        blocks.fill(
            blocks.block(Block.Air),
            positions.create(-5, -5, -5),
            positions.create(5, 5, 5),
            FillOperation.Replace
        )
    }
})

Step 10

Go to Minecraft, put your player in flying mode and enter dig in the chat. GRIEFING ALERT! This mod can mess up your world!