3
0

Optimize chunk saving time by holding block updates in chunks directly (fix #299)

This commit is contained in:
Sergey
2016-01-31 18:53:17 +07:00
parent a5277c151e
commit 201b43272f
3 changed files with 47 additions and 13 deletions

View File

@ -354,7 +354,7 @@
}
}
else if (p_76607_4_ && this.storageArrays[l] != null && this.storageArrays[l].getBlockMSBArray() != null)
@@ -1523,4 +1677,21 @@
@@ -1523,4 +1677,24 @@
}
}
}
@ -375,4 +375,7 @@
+ }
+ });
+ }
+
+ // KCauldron hold block updates into each chunk individually
+ public final java.util.Set<net.minecraft.world.NextTickListEntry> blockUpdates = new java.util.TreeSet<net.minecraft.world.NextTickListEntry>();
}

View File

@ -133,6 +133,15 @@
}
nbttaglist.appendTag(nbttagcompound1);
@@ -379,7 +400,7 @@
}
p_75820_3_.setTag("TileEntities", nbttaglist3);
- List list = p_75820_2_.getPendingBlockUpdates(p_75820_1_, false);
+ Set list = p_75820_1_.blockUpdates;
if (list != null)
{
@@ -455,6 +476,7 @@
public void loadEntities(World p_75823_1_, NBTTagCompound p_75823_2_, Chunk chunk)