mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
Added a modifiable and toggleable flying height limit to NPCs
This commit is contained in:
1 parent
04def38b63
commit
555ceb741f
5 files changed
+81
-6
No files matched your search
@@ -1040,6 +1040,23 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
return npc.ai.flyGravity;
|
||||
}
|
||||
|
||||
public void setFlyHeightLimit(int flyHeightLimit){
|
||||
if(flyHeightLimit < 0)
|
||||
flyHeightLimit = 0;
|
||||
|
||||
this.npc.ai.flyHeightLimit = flyHeightLimit;
|
||||
}
|
||||
public int getFlyHeightLimit(int flyHeightLimit){
|
||||
return this.npc.ai.flyHeightLimit;
|
||||
}
|
||||
|
||||
public void limitFlyHeight(boolean limit){
|
||||
this.npc.ai.hasFlyLimit = limit;
|
||||
}
|
||||
public boolean isFlyHeightLimited(boolean limit){
|
||||
return this.npc.ai.hasFlyLimit;
|
||||
}
|
||||
|
||||
public void setSpeed(int speed) {
|
||||
npc.ai.setWalkingSpeed(speed);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user