Merge branch 'dev'

This commit is contained in:
KAMKEEL committed 2021-11-29 22:26:48 -05:00
commit 71c81bce27
2 files changed
+16 -10

No files matched your search

+9 -5
View File
@@ -87,7 +87,6 @@ public class DataDisplay {
markovGeneratorId = new Random().nextInt(CustomNpcs.MARKOV_GENERATOR.length-1);
name = getRandomName();
}
public String getRandomName() {
@@ -168,11 +167,16 @@ public class DataDisplay {
disableLivingAnimation = nbttagcompound.getBoolean("NoLivingAnimation");
showBossBar = nbttagcompound.getByte("BossBar");
invisibleToList.clear();
NBTTagList tagList = (NBTTagList)nbttagcompound.getTag("InvisibleToList");
for(int i = 0; i < tagList.tagCount(); i++){
String nbtTagString = tagList.getStringTagAt(i);
invisibleToList.add(UUID.fromString(nbtTagString));
if(tagList != null) {
invisibleToList.clear();
for (int i = 0; i < tagList.tagCount(); i++) {
String nbtTagString = tagList.getStringTagAt(i);
invisibleToList.add(UUID.fromString(nbtTagString));
}
}
else {
invisibleToList = new ArrayList<>();
}
if(prevSkinType != skinType || !texture.equals(prevTexture))
@@ -76,11 +76,13 @@ public class DataTimers implements ITimers {
Map<Integer, DataTimers.Timer> timers = new HashMap();
NBTTagList list = compound.getTagList("NpcsTimers", 10);
for(int i = 0; i < list.tagCount(); ++i) {
NBTTagCompound c = list.getCompoundTagAt(i);
DataTimers.Timer t = new DataTimers.Timer(c.getInteger("ID"), c.getInteger("TimerTicks"), c.getBoolean("Repeat"));
t.ticks = c.getInteger("Ticks");
timers.put(t.id, t);
if(list != null) {
for (int i = 0; i < list.tagCount(); ++i) {
NBTTagCompound c = list.getCompoundTagAt(i);
DataTimers.Timer t = new DataTimers.Timer(c.getInteger("ID"), c.getInteger("TimerTicks"), c.getBoolean("Repeat"));
t.ticks = c.getInteger("Ticks");
timers.put(t.id, t);
}
}
this.timers = timers;