Files

36 lines
1.4 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.
# bariskeser_skills.js — cast_blink() (satır 1045)
[← bariskeser_skills.js](index.md) · [← Master](../../wiki.md)
```javascript
function cast_blink(c) {
var p = c.getPlayer(); if (!p) return;
if (guard(p, "blink")) return;
var w = c.getWorld(), pos = p.getPosition(), eh = p.getEyeHeight(), look = p.getLook();
var a = aimPoint(p, 30);
var dx = a.x, dy = a.y - eh, dz = a.z;
if (a.hit) {
// Bloğa çarptıysa: yüzeyden geri çekil; yere bakıyorsak üstüne in,
// duvara bakıyorsak göz hizasından ayak hizasına in (zemine gömülme yok).
dx = a.x - look.x * 0.9;
dz = a.z - look.z * 0.9;
dy = (look.y < -0.2) ? a.y + 0.1 : a.y - eh + 0.2;
}
var sxx = pos.x, syy = pos.y + eh, szz = pos.z;
for (var s = 0; s <= 8; s++) {
var f = s / 8;
var tx = sxx + (a.x - sxx) * f, ty = syy + (a.y - syy) * f, tz = szz + (a.z - szz) * f;
showHead(w, tx, ty, tz, 1.2, 4);
fx(w, "portal", tx, ty, tz, 8, 0.2, 0.2, 0.2, 0.05);
}
w.playSound("minecraft:entity.endermen.teleport", pos.x, pos.y, pos.z, 1.2, 1.0);
try { p.setPosition(dx, dy, dz); p.setFallDistance(0); } catch (e) {}
var np = p.getPosition();
w.playSound("minecraft:entity.endermen.teleport", np.x, np.y, np.z, 1.2, 1.0);
fx(w, "portal", np.x, np.y + 1, np.z, 30, 0.4, 0.8, 0.4, 0.1);
title(p, "§d§lIŞINLANMA", "");
}
```