mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 02:37:27 +00:00
Critical fix to NBT loading when loading entities into chunks from a different version.
This commit is contained in:
1 parent
d79ec52994
commit
f3ebf86b1e
2 files changed
+16
-10
No files matched your search
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user