mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
Added fly gravity for NPCs, configurable with npc.setFlyGravity(gravity) and npc.getFlyGravity()
This commit is contained in:
1 parent
c2564de470
commit
94c7df410b
4 files changed
+25
-1
No files matched your search
@@ -954,6 +954,19 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
return npc.ai.flySpeed;
|
||||
}
|
||||
|
||||
public void setFlyGravity(double flyGravity){
|
||||
if(flyGravity < 0.0D)
|
||||
flyGravity = 0.0D;
|
||||
if(flyGravity > 1.0D)
|
||||
flyGravity = 1.0D;
|
||||
|
||||
npc.ai.flyGravity = flyGravity;
|
||||
}
|
||||
|
||||
public double getFlyGravity(double flySpeed){
|
||||
return npc.ai.flyGravity;
|
||||
}
|
||||
|
||||
public void setSkinType(byte type) {
|
||||
npc.display.skinType = type;
|
||||
npc.updateClient = true;
|
||||
|
||||
Reference in new issue
Block a user