Diff
checker
टेक्स्ट
टेक्स्ट
छवियां
दस्तावेज़
Excel
फ़ोल्डर्स
Legal
Enterprise
डेस्कटॉप
मूल्य
साइन इन करें
Diffchecker डेस्कटॉप डाउनलोड करें
टेक्स्ट की तुलना करें
दो टेक्स्ट फ़ाइलों के बीच अंतर ढूंढें
उपकरण
इतिहास
रियल-टाइम एडिटर
रिक्त स्थान छिपाएँ
अपरिवर्तित संक्षिप्त करें
लाइन रैप बंद
लेआउट
विभाजित
संयुक्त
परिवर्तन हाइलाइट करें
स्मार्ट
शब्द
अक्षर
टेक्स्ट शैलियां
दिखावट बदलें
सिंटैक्स हाइलाइटिंग
सिंटैक्स चुनें
अनदेखा करें
टेक्स्ट बदलें
पहले अंतर पर जाएँ
इनपुट संपादित करें
Diffchecker Desktop
Diffchecker चलाने का सबसे सुरक्षित तरीका। Diffchecker Desktop ऐप पाएं: आपके diffs कभी आपके कंप्यूटर से बाहर नहीं जाते!
Desktop पाएं
Untitled diff
बनाया गया
11 वर्ष पहले
Diff कभी समाप्त नहीं होता
साफ़
निर्यात करें
शेयर करें
समझाएं
8 हटाए गए
लाइनें
कुल
हटाया गया
अक्षर
कुल
हटाया गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
43 लाइनें
सभी को कॉपी करें
5 जोड़े गए
लाइनें
कुल
जोड़ा गया
अक्षर
कुल
जोड़ा गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
40 लाइनें
सभी को कॉपी करें
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public class
Hom
ingTask extends BukkitRunnable {
public class
Chas
ingTask extends BukkitRunnable {
private static final double MaxRotationAngle = 0.12;
private static final double TargetSpeed = 1.4;
Arrow arrow;
Arrow arrow;
LivingEntity target;
LivingEntity target;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
public
Hom
ingTask(final Arrow arrow, final LivingEntity target, final
Plugin
plugin) {
public
Chas
ingTask(final Arrow arrow, final LivingEntity target, final
ChasingArrows
plugin) {
super();
super();
this.arrow = arrow;
this.arrow = arrow;
this.target = target;
this.target = target;
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
this.runTaskTimer(
plugin, 1L, 1L);
this.runTaskTimer(
(Plugin)
plugin, 1L, 1L);
}
}
public void run() {
public void run() {
final double speed = this.arrow.getVelocity().length();
final double speed = this.arrow.getVelocity().length();
if (this.arrow.isOnGround() || this.arrow.isDead() || this.target.isDead()) {
if (this.arrow.isOnGround() || this.arrow.isDead() || this.target.isDead()) {
this.cancel();
this.cancel();
return;
return;
}
}
final Vector toTarget = this.target.getLocation().clone().add(new Vector(0.0, 0.5, 0.0)).subtract(this.arrow.getLocation()).toVector();
final Vector toTarget = this.target.getLocation().clone().add(new Vector(0.0, 0.5, 0.0)).subtract(this.arrow.getLocation()).toVector();
final Vector dirVelocity = this.arrow.getVelocity().clone().normalize();
final Vector dirVelocity = this.arrow.getVelocity().clone().normalize();
final Vector dirToTarget = toTarget.clone().normalize();
final Vector dirToTarget = toTarget.clone().normalize();
final double angle = dirVelocity.angle(dirToTarget);
final double angle = dirVelocity.angle(dirToTarget);
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
double newSpeed = 0.9 * speed + 0.
13999999999999999
;
double newSpeed = 0.9 * speed + 0.
14
;
if (this.target instanceof Player && this.arrow.getLocation().distance(this.target.getLocation()) < 8.0) {
if (this.target instanceof Player && this.arrow.getLocation().distance(this.target.getLocation()) < 8.0) {
final Player player = (Player)this.target;
final Player player = (Player)this.target;
if (player.isBlocking()) {
if (player.isBlocking()) {
newSpeed = speed * 0.6;
newSpeed = speed * 0.6;
}
}
}
}
Vector newVelocity;
Vector newVelocity;
if (angle < 0.12) {
if (angle < 0.12) {
newVelocity = dirVelocity.clone().multiply(newSpeed);
newVelocity = dirVelocity.clone().multiply(newSpeed);
}
}
else {
else {
final Vector newDir = dirVelocity.clone().multiply((angle - 0.12) / angle).add(dirToTarget.clone().multiply(0.12 / angle));
final Vector newDir = dirVelocity.clone().multiply((angle - 0.12) / angle).add(dirToTarget.clone().multiply(0.12 / angle));
newDir.normalize();
newDir.normalize();
newVelocity = newDir.clone().multiply(newSpeed);
newVelocity = newDir.clone().multiply(newSpeed);
}
}
this.arrow.setVelocity(newVelocity.add(new Vector(0.0, 0.03, 0.0)));
this.arrow.setVelocity(newVelocity.add(new Vector(0.0, 0.03, 0.0)));
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
this.arrow.getWorld().playEffect(this.arrow.getLocation(), Effect.SMOKE, 0);
}
}
}
}
सेव किए गए Diffs
ऑरिजनल टेक्स्ट
फ़ाइल खोलें
public class HomingTask extends BukkitRunnable { private static final double MaxRotationAngle = 0.12; private static final double TargetSpeed = 1.4; Arrow arrow; LivingEntity target; public HomingTask(final Arrow arrow, final LivingEntity target, final Plugin plugin) { super(); this.arrow = arrow; this.target = target; this.runTaskTimer(plugin, 1L, 1L); } public void run() { final double speed = this.arrow.getVelocity().length(); if (this.arrow.isOnGround() || this.arrow.isDead() || this.target.isDead()) { this.cancel(); return; } final Vector toTarget = this.target.getLocation().clone().add(new Vector(0.0, 0.5, 0.0)).subtract(this.arrow.getLocation()).toVector(); final Vector dirVelocity = this.arrow.getVelocity().clone().normalize(); final Vector dirToTarget = toTarget.clone().normalize(); final double angle = dirVelocity.angle(dirToTarget); double newSpeed = 0.9 * speed + 0.13999999999999999; if (this.target instanceof Player && this.arrow.getLocation().distance(this.target.getLocation()) < 8.0) { final Player player = (Player)this.target; if (player.isBlocking()) { newSpeed = speed * 0.6; } } Vector newVelocity; if (angle < 0.12) { newVelocity = dirVelocity.clone().multiply(newSpeed); } else { final Vector newDir = dirVelocity.clone().multiply((angle - 0.12) / angle).add(dirToTarget.clone().multiply(0.12 / angle)); newDir.normalize(); newVelocity = newDir.clone().multiply(newSpeed); } this.arrow.setVelocity(newVelocity.add(new Vector(0.0, 0.03, 0.0))); this.arrow.getWorld().playEffect(this.arrow.getLocation(), Effect.SMOKE, 0); } }
परिवर्तित टेक्स्ट
फ़ाइल खोलें
public class ChasingTask extends BukkitRunnable { Arrow arrow; LivingEntity target; public ChasingTask(final Arrow arrow, final LivingEntity target, final ChasingArrows plugin) { super(); this.arrow = arrow; this.target = target; this.runTaskTimer((Plugin)plugin, 1L, 1L); } public void run() { final double speed = this.arrow.getVelocity().length(); if (this.arrow.isOnGround() || this.arrow.isDead() || this.target.isDead()) { this.cancel(); return; } final Vector toTarget = this.target.getLocation().clone().add(new Vector(0.0, 0.5, 0.0)).subtract(this.arrow.getLocation()).toVector(); final Vector dirVelocity = this.arrow.getVelocity().clone().normalize(); final Vector dirToTarget = toTarget.clone().normalize(); final double angle = dirVelocity.angle(dirToTarget); double newSpeed = 0.9 * speed + 0.14; if (this.target instanceof Player && this.arrow.getLocation().distance(this.target.getLocation()) < 8.0) { final Player player = (Player)this.target; if (player.isBlocking()) { newSpeed = speed * 0.6; } } Vector newVelocity; if (angle < 0.12) { newVelocity = dirVelocity.clone().multiply(newSpeed); } else { final Vector newDir = dirVelocity.clone().multiply((angle - 0.12) / angle).add(dirToTarget.clone().multiply(0.12 / angle)); newDir.normalize(); newVelocity = newDir.clone().multiply(newSpeed); } this.arrow.setVelocity(newVelocity.add(new Vector(0.0, 0.03, 0.0))); } }
अंतर खोजें