mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
Added drowning types:
In Air, In Water, or Never to CNPCs.
This commit is contained in:
1 parent
44225194ac
commit
55b21de050
9 files changed
+102
-44
No files matched your search
@@ -1038,10 +1038,19 @@ public class ScriptNpc<T extends EntityNPCInterface> extends ScriptLiving<T> imp
|
||||
}
|
||||
|
||||
public boolean getCanDrown() {
|
||||
return npc.stats.canDrown;
|
||||
return npc.stats.drowningType > 0;
|
||||
}
|
||||
public void setCanDrown(boolean d) {
|
||||
npc.stats.canDrown = d;
|
||||
npc.stats.drowningType = d ? 1 : 0;
|
||||
}
|
||||
|
||||
public void setDrowningType(int type) {
|
||||
if (type < 0)
|
||||
type = 0;
|
||||
if (type > 2)
|
||||
type = 2;
|
||||
|
||||
npc.stats.drowningType = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user