mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +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
@@ -1,5 +1,6 @@
|
||||
package mekanism.common.tile;
|
||||
|
||||
import mekanism.common.Upgrade;
|
||||
import mekanism.common.base.ISustainedInventory;
|
||||
import mekanism.common.util.InventoryUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
@@ -40,7 +41,7 @@ public abstract class TileEntityContainerBlock extends TileEntityBasicBlock impl
|
||||
|
||||
for(int tagCount = 0; tagCount < tagList.tagCount(); tagCount++)
|
||||
{
|
||||
NBTTagCompound tagCompound = (NBTTagCompound)tagList.getCompoundTagAt(tagCount);
|
||||
NBTTagCompound tagCompound = tagList.getCompoundTagAt(tagCount);
|
||||
byte slotID = tagCompound.getByte("Slot");
|
||||
|
||||
if(slotID >= 0 && slotID < getSizeInventory())
|
||||
@@ -243,4 +244,6 @@ public abstract class TileEntityContainerBlock extends TileEntityBasicBlock impl
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void recalculateUpgradables(Upgrade upgradeType) {}
|
||||
}
|
||||
Reference in new issue
Block a user