Files

49 lines
1.8 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.
# ezoic_fly.js — main() (satır 115)
[← ezoic_fly.js](index.md) · [← Master](../../wiki.md)
Parça 3/9 · [önceki](main-2.md) · [sonraki](main-4.md)
```javascript
var wasFlying = s2.getNumber("ezoic_fly_was_flying");
var isFalling = s2.getNumber("ezoic_fly_is_falling");
// ============================================================
// DURUM TESPİTİ
// ============================================================
if (flying) {
s2.setNumber("ezoic_fly_was_flying", 1);
s2.setNumber("ezoic_fly_is_falling", 0);
if (totalSpeed < HOVER_THRESHOLD) {
// --- HOVER / İDLE ---
if (lastState !== 1) {
// Yeni hover durumuna geçtik
pp.executeCommand("mp event trigger @s ezoicfly");
lastState = 1;
fastCmdSent = false;
ww.playSound("minecraft:entity.enderdragon.flap", cx, cy, cz, 1.0, 1.5);
}
// Hover partikül efektleri — gövde etrafı aura
if (t % 2 === 0) {
var hoverAngle = t * 0.15;
for (var h = 0; h < 2; h++) {
var ha = hoverAngle + h * Math.PI;
var hx = cx + Math.cos(ha) * 0.8;
var hz = cz + Math.sin(ha) * 0.8;
spawnFx(ww, "endRod", hx, cy + 0.8, hz, 1, 0, 0, 0, 0);
}
spawnFx(ww, "cloud", cx, cy + 0.5, cz, 2, 0.3, 0.1, 0.3, 0);
}
// Hafif hover sesi
if (t % 20 === 0) {
ww.playSound("minecraft:block.beacon.ambient", cx, cy, cz, 0.4, 2.0);
}
} else {
```