Files

38 lines
1.8 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# hollow_purple.js — main() (satır 9)
[← hollow_purple.js](index.md) · [← Master](../../wiki.md)
Parça 6/15 · [önceki](main-5.md) · [sonraki](main-7.md)
```javascript
                        if (!savedMap[key]) {
                            try {
                                var bs  = world.getBlock(bxi, byi, bzi);
                                var bid = bs.getBlockId();
                                if (bid !== "minecraft:air" && bid !== "minecraft:bedrock" && bid !== "minecraft:barrier") {
                                    savedBlocks.push({ x: bxi, y: byi, z: bzi, s: bs });
                                    savedMap[key] = true;
                                    world.setBlock(airState, bxi, byi, bzi);
                                }
                            } catch (e) {}
                        }
                    }
                }
            }
        }
    }
    // Dalga dalga geri yükleme (yakından uzağa)
    function restoreBatch(ctx, startIdx) {
        var w2  = ctx.getWorld();
        var end = Math.min(startIdx + 250, savedBlocks.length);
        var pType = mappet.getParticleType("portal");
        for (var ri = startIdx; ri < end; ri++) {
            var rb = savedBlocks[ri];
            try {
                if (w2.getBlock(rb.x, rb.y, rb.z).getBlockId() === "minecraft:air") {
                    w2.setBlock(rb.s, rb.x, rb.y, rb.z);
                    if (pType && (ri % 2 === 0))
                        w2.spawnParticles(pType, true, rb.x+0.5, rb.y+0.5, rb.z+0.5, 2, 0.25, 0.25, 0.25, 0.03);
```