Cache frequent Enum#values() calls (#107)

This commit is contained in:
Alexdoru authored and GitHub committed 2026-03-03 21:22:36 +01:00
1 parent 7e1398438d
commit 3fb58ad6a5
31 files changed
+162 -122

No files matched your search

@@ -300,7 +300,7 @@ public class PluginFarming extends ForestryPlugin {
ItemStack valve = blocks.farm.get(BlockFarmType.VALVE, 1);
ItemStack control = blocks.farm.get(BlockFarmType.CONTROL, 1);
for (EnumFarmBlockTexture block : EnumFarmBlockTexture.values()) {
for (EnumFarmBlockTexture block : EnumFarmBlockTexture.VALUES) {
NBTTagCompound compound = new NBTTagCompound();
block.saveToCompound(compound);