Files

47 lines
1.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
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.
# starrr.js — main() (satır 1)
[← starrr.js](index.md) · [← Master](../../wiki.md)
Parça 5/6 · [önceki](main-4.md) · [sonraki](main-6.md)
```javascript
// --- KATMANLI BLOK YOK ETME ---
var airState2 = mappet.createBlockState("minecraft:air", 0);
var backup = {};
var minY = 256, maxY = 0;
for (var bx = -expRadius; bx <= expRadius; bx++) {
for (var by = -expRadius; by <= expRadius; by++) {
for (var bz = -expRadius; bz <= expRadius; bz++) {
if (bx*bx + by*by + bz*bz > expRadius*expRadius) continue;
var tx = Math.floor(ex + bx);
var ty = Math.floor(ey + by);
var tz = Math.floor(ez + bz);
if (ty < 0 || ty > 255) continue;
var bs = w2.getBlock(tx, ty, tz);
if (!bs || bs.getBlockId() === "minecraft:air" || bs.getBlockId() === "minecraft:bedrock") continue;
if (ty < minY) minY = ty;
if (ty > maxY) maxY = ty;
if (!backup[ty]) backup[ty] = [];
backup[ty].push({x: tx, y: ty, z: tz, state: bs});
w2.setBlock(airState2, tx, ty, tz);
}
}
}
// --- KATMANLI GERI YÜKLEME VE KORO SESİ ---
var delayCounter = 80;
for (var currentY = minY; currentY <= maxY; currentY++) {
if (!backup[currentY]) continue;
(function(layerY, delay) {
ctx.scheduleScript(delay, function(cctx) {
```