mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-26 06:53:30 +00:00
Cache frequent Enum#values() calls (#86)
This commit is contained in:
1 parent
84d462d8d5
commit
a48f59e0ed
64 files changed
+202
-121
No files matched your search
@@ -79,6 +79,10 @@ public enum Food implements IItemMisc {
|
||||
Starfruit(2),
|
||||
Candlenut(0);
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final Food[] VALUES = values();
|
||||
private IIcon icon;
|
||||
private final int hunger;
|
||||
private final List<String> ores;
|
||||
|
||||
Reference in new issue
Block a user