31 lines
818 B
Markdown
31 lines
818 B
Markdown
# npc.js — startExplodeCountdown() (satır 214)
|
||
|
||
[← npc.js](index.md) · [← Master](../../wiki.md)
|
||
|
||
Parça 2/2 · [önceki](startExplodeCountdown.md)
|
||
|
||
```javascript
|
||
for (var j = 0; j < gs.size(); j++)
|
||
{
|
||
var g2 = gs.get(j);
|
||
if (!g2) continue;
|
||
var p2 = g2.getPosition();
|
||
w.playSound("minecraft:block.note.pling", p2.x, p2.y + 1, p2.z, 1.0, pitch);
|
||
}
|
||
}
|
||
|
||
if (left <= 0)
|
||
{
|
||
explodeGuards(ctx); // gerçek patlama + blok/tile kaydet+geri getir
|
||
return;
|
||
}
|
||
|
||
ctx.scheduleScript(1, function (cc) { tick(cc, left - 1); });
|
||
}
|
||
|
||
c.scheduleScript(1, function (cc) { tick(cc, COUNTDOWN_TICKS); });
|
||
|
||
return count;
|
||
}
|
||
```
|