mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 21:09:45 +00:00
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:
1 parent
3160ec0691
commit
b75ff5d9a1
33 files changed
+407
-206
No files matched your search
@@ -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"));
|
||||
|
||||
Reference in new issue
Block a user