Files

52 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_radyasyon.js — runBeam() (satır 314)
[← ezoic_radyasyon.js](index.md) · [← Master](../../wiki.md)
Parça 3/4 · [önceki](runBeam-2.md) · [sonraki](runBeam-4.md)
```javascript
var subSteps = 4;
for (var ss = 0; ss < subSteps; ss++) {
px += lx * (speed / subSteps);
py += ly * (speed / subSteps);
pz += lz * (speed / subSteps);
travelled += speed / subSteps;
// Sürekli trail particle
spawnFx(ww, "happyVillager", px, py, pz, 4, 0.3, 0.3, 0.3, 0.02);
spawnFx(ww, "dragonbreath", px, py, pz, 2, 0.25, 0.25, 0.25, 0.03);
spawnFx(ww, "endRod", px, py, pz, 2, 0.15, 0.15, 0.15, 0.05);
// Blok engeline çarptıysak patla
var bs = ww.getBlock(Math.floor(px), Math.floor(py), Math.floor(pz));
if (bs) {
var bid = bs.getBlockId();
if (bid !== "minecraft:air" && bid !== "minecraft:water" && bid !== "minecraft:flowing_water") {
done = true;
explodeAt(px, py, pz, ctx);
return;
}
}
// Canlı çarpma — caster hariç ilk canlıya çarp
var ents = ww.getEntities(px, py, pz, 2.5);
for (var ei = 0; ei < ents.size(); ei++) {
var e = ents.get(ei);
if (e.isSame(p) || isEzoic(e)) continue;
if (!e.isLivingBase()) continue;
done = true;
explodeAt(px, py, pz, ctx);
return;
}
if (travelled >= maxDist) {
done = true;
explodeAt(px, py, pz, ctx);
return;
}
}
// Çift katmanlı dönen çekirdek
```