Files

715 B
Raw Permalink Blame History

ezoic_viltrumite.js — scheduleRestore() (satır 73)

← ezoic_viltrumite.js · ← Master

function scheduleRestore(ctx, x, y, z, blockState) {
    ctx.scheduleScript(RESTORE_TICKS, function(cc) {
        try {
            var w = cc.getWorld();
            var cur = w.getBlock(x, y, z);
            if (cur && cur.getBlockId() === "minecraft:air") {
                w.setBlock(blockState, x, y, z);
                spawnFx(w, "happyVillager", x + 0.5, y + 0.5, z + 0.5, 3, 0.2, 0.2, 0.2, 0.02);
                w.playSound("minecraft:block.stone.place", x + 0.5, y + 0.5, z + 0.5, 0.3, 1.4);
            }
        } catch (e) {}
    });
}