Skip to content
Discussion options

You must be logged in to vote

You don't need 2 scripts. I tested this:

static string state = "break";
static int xb = 0;
static int yb = 0;
static int zb = 0;
static int lastActionAt = 0;

if (state == "break" && game.getTick() > lastActionAt + 50) {
    if (game.blocks.getId(x,y,z) == "minecraft:spawner") {
        xb = x;
        yb = y;
        zb = z;
        blockAutomation.breakBlock("netherite_pickaxe");
        lastActionAt = game.getTick();
        state = "place";
    }
}

if (state == "place" && game.getTick() > lastActionAt + 40) {
    if ((x == xb) && (y == yb) && (z == zb)) {
        blockAutomation.useItem("minecraft:spawner");
        state = "break";
    }
}

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Andy718811
Comment options

@Zergatul
Comment options

@Andy718811
Comment options

@Zergatul
Comment options

Answer selected by Andy718811
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants