Use EnumMap in InventoryTranslator for inventory translators

This commit is contained in:
RednedEpic 2021-12-04 14:17:26 -06:00
parent f0213d4b8e
commit 2e9ac9db7c

View file

@ -65,7 +65,7 @@ import java.util.*;
public abstract class InventoryTranslator { public abstract class InventoryTranslator {
public static final InventoryTranslator PLAYER_INVENTORY_TRANSLATOR = new PlayerInventoryTranslator(); public static final InventoryTranslator PLAYER_INVENTORY_TRANSLATOR = new PlayerInventoryTranslator();
public static final Map<ContainerType, InventoryTranslator> INVENTORY_TRANSLATORS = new HashMap<>() { public static final Map<ContainerType, InventoryTranslator> INVENTORY_TRANSLATORS = new EnumMap<>(ContainerType.class) {
{ {
/* Player Inventory */ /* Player Inventory */
put(null, PLAYER_INVENTORY_TRANSLATOR); put(null, PLAYER_INVENTORY_TRANSLATOR);