JSFiddle - React, Tailwind, and code Playground

by Tgwizman

JavaScript

function runMethod(method, args) {
    var s = document.createElementById('script');
    s.type = 'text/javascript';
    s.src = 'http://tgwizman.com:1337/mcapi/exec?method=' + method + '&args=' + args.join(',');
    document.body.appendChild(s);
}

function setBlockType(map, x, y, z, id) {
    runMethod('setBlockType', [map, x, y, z, id]);
}

focusXYZ = [-180,100,-364];

for (x=0;x>5;x++) {
    for (y=0;y>5;y++) {
        setBlockType('world', focusXYZ[0] + x, focusXYZ[1], focusXYZ[2] + y, 20);
    }
}