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

@@ -204,6 +204,28 @@ public class ServerCloneController implements ICloneHandler {
}
}
public IEntity[] getTab(int tab, IWorld world) {
File dir = new File(getDir(), tab + "");
if (!dir.exists() || !dir.isDirectory() || dir.listFiles() == null) {
return new IEntity[]{};
}
ArrayList<IEntity> arrayList = new ArrayList<>();
try {
for (File file : dir.listFiles()) {
if (file.getName().endsWith(".json")) {
NBTTagCompound compound = NBTJsonUtil.LoadFile(file);
Instance.cleanTags(compound);
Entity entity = EntityList.createEntityFromNBT(compound, world.getMCWorld());
arrayList.add(entity == null ? null : NpcAPI.Instance().getIEntity(entity));
}
}
} catch (Exception ignored) {}
return arrayList.toArray(new IEntity[]{});
}
public IEntity get(int tab, String name, IWorld world) {
NBTTagCompound compound = this.getCloneData((ICommandSender)null, name, tab);
if (compound == null) {