mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-12 16:37:45 +00:00
Cache enum .values() (#998)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
a51836fe9b
commit
6c3db443d7
1 file changed
+6
-3
@@ -77,10 +77,13 @@ import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier;
|
||||
*/
|
||||
public class ItemInfo {
|
||||
|
||||
public static enum Layout {
|
||||
public enum Layout {
|
||||
|
||||
HEADER,
|
||||
BODY,
|
||||
FOOTER
|
||||
FOOTER;
|
||||
|
||||
public static final Layout[] VALUES = values();
|
||||
}
|
||||
|
||||
public static final ArrayListMultimap<Layout, IHighlightHandler> highlightHandlers = ArrayListMultimap.create();
|
||||
@@ -472,7 +475,7 @@ public class ItemInfo {
|
||||
MovingObjectPosition mop) {
|
||||
List<String> retString = new ArrayList<>();
|
||||
|
||||
for (ItemInfo.Layout layout : ItemInfo.Layout.values())
|
||||
for (ItemInfo.Layout layout : Layout.VALUES)
|
||||
for (IHighlightHandler handler : ItemInfo.highlightHandlers.get(layout))
|
||||
retString = handler.handleTextData(itemStack, world, player, mop, retString, layout);
|
||||
|
||||
|
||||
Reference in new issue
Block a user