mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 22:15:06 +00:00
knockback() function for ScriptEntity now *only* knocks the entity back instead of hitting it.
Flying NPC's get knocked back properly, and their vertical speed has been increased. Flying NPC's vertical flying speed can be changed by npc.setFlySpeed(double speed) from ScriptNpc.
This commit is contained in:
1 parent
3cd1410c19
commit
12333de3a1
9 files changed
+62
-40
No files matched your search
@@ -923,10 +923,6 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
return ((EntityNPCInterface)this.npc).timers;
|
||||
}
|
||||
|
||||
public boolean canFly(){
|
||||
return npc.ai.movementType == 1;
|
||||
}
|
||||
|
||||
public void setFly(int fly){
|
||||
if(fly > 0)
|
||||
fly = 1;
|
||||
@@ -935,6 +931,21 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
npc.ai.movementType = fly;
|
||||
}
|
||||
|
||||
public boolean canFly(){
|
||||
return npc.ai.movementType == 1;
|
||||
}
|
||||
|
||||
public void setFlySpeed(double flySpeed){
|
||||
if(flySpeed < 0.0D)
|
||||
flySpeed = 0.0D;
|
||||
|
||||
npc.ai.flySpeed = flySpeed;
|
||||
}
|
||||
|
||||
public double getFlySpeed(double flySpeed){
|
||||
return npc.ai.flySpeed;
|
||||
}
|
||||
|
||||
public void setSkinType(byte type) {
|
||||
npc.display.skinType = type;
|
||||
npc.updateClient = true;
|
||||
|
||||
Reference in new issue
Block a user