diff options
author | Alexdoru <57050655+Alexdoru@users.noreply.github.com> | 2024-09-16 01:12:03 +0200 |
---|---|---|
committer | boubou19 <miisterunknown@gmail.com> | 2024-09-17 22:55:46 +0200 |
commit | 730024055f670fef1fd4ba76b0863736a03fe227 (patch) | |
tree | 91ecc0fc2a99346ae7ee80ecbee2aa0d52eca6ef /src/main/java/kekztech/common/tileentities | |
parent | d83cc53cf944772818eb1e23c065c54accaa0034 (diff) | |
download | GT5-Unofficial-730024055f670fef1fd4ba76b0863736a03fe227.tar.gz GT5-Unofficial-730024055f670fef1fd4ba76b0863736a03fe227.tar.bz2 GT5-Unofficial-730024055f670fef1fd4ba76b0863736a03fe227.zip |
cache some Enum.values() call to reduce RAM allocations
Diffstat (limited to 'src/main/java/kekztech/common/tileentities')
-rw-r--r-- | src/main/java/kekztech/common/tileentities/MTELapotronicSuperCapacitor.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/kekztech/common/tileentities/MTELapotronicSuperCapacitor.java b/src/main/java/kekztech/common/tileentities/MTELapotronicSuperCapacitor.java index e39a0b74eb..e6260bc7af 100644 --- a/src/main/java/kekztech/common/tileentities/MTELapotronicSuperCapacitor.java +++ b/src/main/java/kekztech/common/tileentities/MTELapotronicSuperCapacitor.java @@ -139,8 +139,8 @@ public class MTELapotronicSuperCapacitor extends MTEEnhancedMultiBlockBase<MTELa } public static int getIndexFromGlassTier(int glassTier) { - for (int index = 0; index < values().length; index++) { - if (values()[index].getMinimalGlassTier() == glassTier) { + for (int index = 0; index < VALUES.length; index++) { + if (VALUES[index].getMinimalGlassTier() == glassTier) { return index; } } |