Files

35 lines
1.1 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.
# patlamaduzelt.js — main() (satır 19)
[← patlamaduzelt.js](index.md) · [← Master](../../wiki.md)
Parça 3/3 · [önceki](main-2.md)
```javascript
radius = serverStates.getNumber("last_crater_radius");
}
}
// Seçeneklerin hepsi boşsa hata ver
if (blocks === null) {
player.send("§c[Onarım] §fGeri yüklenecek kayıtlı patlama krateri bulunamadı!");
world.playSound("minecraft:block.chest.locked", pos.x, pos.y + 1.0, pos.z, 1.0, 1.0);
return;
}
world.playSound("minecraft:block.enchantment_table.use", pos.x, pos.y + 1.0, pos.z, 1.5, 0.85);
// Script event durumuna kaydet
c.setValue("blocksToRestore", blocks);
c.setValue("blocksIdList", idList);
c.setValue("currentRestoreY", minY);
c.setValue("maxRestoreY", maxY);
c.setValue("hitCx", cx);
c.setValue("hitCy", cy);
c.setValue("hitCz", cz);
c.setValue("craterRadius", radius);
// Onarım adımını başlat!
c.scheduleScript("restoreLayerStep", 5); // 0.25 saniye gecikmeyle başlasın
}
```