Useful minecraft scripts (in python)


Purpose: carve out a 3 dimensional box of air, centered on your current location. For example if you are underground, run:

/py aircube3 50 3 50 create a long, wide basement.

from mine import * 
from sys import argv
mc = Minecraft()
mc.postToChat ("Placing a cube of air just for you...")
playerPos = mc.player.getPos()
xsize = int (argv[1]);
ysize = int (argv[2]);
zsize = int (argv[3]);
xhsize = int(xsize/2);
yhsize = int(ysize/2);
zhsize = int(zsize/2);

for i in range(xsize):
    for j in range (ysize):
        for k in range (zsize):
            mc.setBlock(playerPos.x +i - xhsize, playerPos.y +j - yhsize , playerPos.z +k - zhsize, block.AIR)


Put lights all over the place, so you can see what's going on. Useful in caves.

(Alternative technique is to use a night vision potion, but I still prefer this little script)

from mine import *
mc = Minecraft()
mc.postToChat("Placing lights...")
playerPos = mc.player.getPos()

s = 10
space = 4
x0 = playerPos.x - (s*space/2)
y0 = playerPos.y - (s*space/2)
z0 = playerPos.z - (s*space/2)
for x in range(s):
    for y in range(s):
        for z in range(s):
            h = mc.getBlock(x*space+x0, y*space+y0, z*space + z0)
            if (h !=
                mc.setBlock(x*space+x0, y*space+y0, z*space + z0, block.GLOWSTONE_BLOCK)

results matching ""

    No results matching ""