mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 05:15:11 +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
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user