Cache all the things.

(Provided those things are computationally expensive to recalculate, and the memory cost of caching them is less than the time cost of recalculating them each time.)
This commit is contained in:
Ben Spiers committed 2014-09-06 21:14:49 +01:00
1 parent 3160ec0691
commit b75ff5d9a1
33 files changed
+407 -206

No files matched your search

+1 -1
View File
@@ -98,7 +98,7 @@ public enum Upgrade
for(int tagCount = 0; tagCount < list.tagCount(); tagCount++)
{
NBTTagCompound compound = (NBTTagCompound)list.getCompoundTagAt(tagCount);
NBTTagCompound compound = list.getCompoundTagAt(tagCount);
Upgrade upgrade = Upgrade.values()[compound.getInteger("type")];
upgrades.put(upgrade, compound.getInteger("amount"));