Added drowning types:

In Air,
In Water,
or
Never
to CNPCs.
This commit is contained in:
Luis C.M committed 2022-06-29 12:21:30 -05:00
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