Files

46 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.
# ezoickalkan.js — karadelik() (satır 151)
[← ezoickalkan.js](index.md) · [← Master](../../wiki.md)
Parça 4/5 · [önceki](karadelik-3.md) · [sonraki](karadelik-5.md)
```javascript
var rx = hitX + bhRadius * Math.sin(phi) * Math.cos(theta);
var ry = hitY + bhRadius * Math.sin(phi) * Math.sin(theta);
var rz = hitZ + bhRadius * Math.cos(phi);
// Merkeze doğru emilen happyVillager particle'ları
w.spawnParticles(ptHappy, true, rx, ry, rz, 1, (hitX-rx)*0.15, (hitY-ry)*0.15, (hitZ-rz)*0.15, 0.1);
}
}
if (t % 15 === 0) {
w.playSound("minecraft:block.portal.ambient", hitX, hitY, hitZ, 3.0, 0.5);
}
// Blokları hızlıca içine çek (Yarıçapı hızla 15'e büyüt)
var currentRadius = Math.min(CONFIG.karadelik_yok_etme_capi, 2.0 + (t / 5));
if (t % 2 === 0) {
destroySphereAndSuck(ctx, hitX, hitY, hitZ, currentRadius);
}
// Çok güçlü çekim kuvveti
var ents = w.getEntities(hitX, hitY, hitZ, CONFIG.karadelik_cekim_alani);
for (var i = 0; i < ents.size(); i++) {
var e = ents.get(i);
// "Ezoic" oyuncusu ve atıcı (caster) tamamen muaf
var eName = "";
try { eName = e.getName(); } catch (err) {}
if (eName === "Ezoic" || e.isSame(p)) continue;
// Düşen blokları kendimiz siliyoruz, tekrar döngüde etki etmesin diye atla
var eidName = "";
try { eidName = e.getEntityId(); } catch (err) {}
if (eidName === "minecraft:falling_block") continue;
var ep = e.getPosition();
var dx = hitX - ep.x;
var dy = hitY - ep.y;
```