mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 21:32:19 +00:00
Refactor mount helpers and expose NPC flight state
This commit is contained in:
1 parent
6c84263769
commit
9744209938
31 files changed
+821
-305
No files matched your search
@@ -30,7 +30,11 @@ public class EntityAIPounceTarget extends EntityAIBase {
|
||||
|
||||
@Override
|
||||
public boolean continueExecuting() {
|
||||
return !this.npc.onGround;
|
||||
boolean airborne = !this.npc.onGround;
|
||||
if (!airborne) {
|
||||
this.npc.setNpcJumpingState(false);
|
||||
}
|
||||
return airborne;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -47,6 +51,12 @@ public class EntityAIPounceTarget extends EntityAIBase {
|
||||
this.npc.motionX *= this.leapSpeed;
|
||||
this.npc.motionZ *= this.leapSpeed;
|
||||
this.npc.motionY *= this.leapSpeed;
|
||||
this.npc.setNpcJumpingState(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetTask() {
|
||||
this.npc.setNpcJumpingState(false);
|
||||
}
|
||||
|
||||
public float getAngleForXYZ(double varX, double varY, double varZ, double horiDist) {
|
||||
|
||||
Reference in new issue
Block a user