1.8 KiB
1.8 KiB
ezoic_radyasyon.js — runBeam() (satır 314)
← ezoic_radyasyon.js · ← Master
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