mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 17:49:48 +00:00
Added methods to trajectory
This commit is contained in:
1 parent
8ed8b55bdc
commit
96d939ce43
3 files changed
+91
-21
No files matched your search
@@ -245,7 +245,7 @@ public class EntityAbilityOrb extends EntityAbilityProjectile {
|
||||
handleClientInterpolation();
|
||||
} else {
|
||||
// Server-side logic
|
||||
updateHoming();
|
||||
updateMovement();
|
||||
checkBlockCollision();
|
||||
checkEntityCollision();
|
||||
this.moveEntity(motionX, motionY, motionZ);
|
||||
@@ -273,8 +273,30 @@ public class EntityAbilityOrb extends EntityAbilityProjectile {
|
||||
this.posZ += motionZ;
|
||||
}
|
||||
|
||||
private void updateTrajectory() {
|
||||
private void updateMovement() {
|
||||
if (!isTrajectoryConcluded()) {
|
||||
updateTrajectory();
|
||||
} else {
|
||||
updateHoming();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateTrajectory() {
|
||||
if (isTrajectoryConcluded()) return;
|
||||
// i really fucking hate math
|
||||
|
||||
}
|
||||
|
||||
private boolean isTrajectoryConcluded() {
|
||||
if (trajectoryData.isEmpty()) return true;
|
||||
|
||||
for (int i = 0; i < trajectoryData.size(); i++) {
|
||||
if (!trajectoryData.getPath(i).isConcluded()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void updateHoming() {
|
||||
|
||||
Reference in new issue
Block a user