Super Digger

Introduction

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

GRIEFING ALERT! This mod can mess up your world!

Super digging!

On Player Walk

Add an ||player:on player walk|| event to run code when the player walks.

player.onTravelled(WALK, function () {
})

Mine a little

Use ||blocks:fill|| to fill in air one block around you.

player.onTravelled(WALK, function () {
    // @highlight
    blocks.fill(AIR, 
        // @highlight
        pos(-1, -1, -1), 
        // @highlight
        pos(1, 1, 1)
    // @highlight
    )
})

Try it

Go to Minecraft and walk around. Blocks should disappear behind you…and under you! Don’t fall in the void!

Don’t walk, fly!

Instead of running the code when the player walks, run it when flying.

// @highlight
player.onTravelled(FLY, function () {
    blocks.fill(AIR, 
        pos(-1, -1, -1), 
        pos(1, 1, 1)
    )
})

Try it

Go to Minecraft and fly around. Blocks should disappear behind you. No more falling into the void.

Mine some more

Modify the values in ||blocks:fill|| to increase the volume of air you create.

player.onTravelled(FLY, function () {
    blocks.fill(AIR,
        // @highlight
        pos(-5, -5, -5), 
        // @highlight
        pos(5, 5, 5)
    )
})

Try it

Go to Minecraft and fly away the world!