Files

40 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.
# starr2.js — main() (satır 1)
[← starr2.js](index.md) · [← Master](../../wiki.md)
Parça 4/7 · [önceki](main-3.md) · [sonraki](main-5.md)
```javascript
            if (Math.floor(d) % 2 === 0) {
                spawnFx(ctx, "endRod", hitX, hitY, hitZ, 2, 0.05, 0.05, 0.05, 0.01);
                spawnFx(ctx, "cloud", hitX, hitY, hitZ, 1, 0.0, 0.0, 0.0, 0.0);
            }
            var bs = w.getBlock(Math.floor(hitX), Math.floor(hitY), Math.floor(hitZ));
            if (bs && bs.getBlockId() !== "minecraft:air" && bs.getBlockId() !== "minecraft:water") break;
        }
        triggerApocalypse(hitX, hitY, hitZ, ctx, p, cfg);
    });
    // --- 4. AŞAMA: KIYAMET PATLAMASI VE DALGALI GERİ YÜKLEME ---
    function triggerApocalypse(cx, cy, cz, ctx, caster, config) {
        var w = ctx.getWorld();
        
        // Katmanlı ses kombinasyonu (Bass Drop)
        w.playSound("minecraft:entity.generic.explode", cx, cy, cz, 7.0, 0.6);
        w.playSound("minecraft:entity.lightning.thunder", cx, cy, cz, 5.0, 0.8);
        w.playSound("minecraft:entity.enderdragon.death", cx, cy, cz, 3.0, 1.5);
        spawnFx(ctx, "flash", cx, cy, cz, 4, 0.5, 0.5, 0.5, 0.0);
        spawnFx(ctx, "hugeexplosion", cx, cy, cz, 5, 2.0, 2.0, 2.0, 0.1);
        // Dinamik Genişleyen Şok Dalgası Animasyonu (Shockwave)
        for (var rStep = 1; rStep <= config.expRadius; rStep += 2) {
            (function(radius) {
                ctx.scheduleScript(Math.floor(radius / 2), function(cctx) {
                    var count = radius * 4;
                    for (var i = 0; i < count; i++) {
                        var angle = (i / count) * 2 * Math.PI;
```