diff --git a/src/engine/mbEnums.java b/src/engine/mbEnums.java index fa8d81e5..83b9e8c4 100644 --- a/src/engine/mbEnums.java +++ b/src/engine/mbEnums.java @@ -2741,6 +2741,7 @@ public class mbEnums { public static HashMap templateLookup = new HashMap<>(); public static HashMap templateHashLookup = new HashMap<>(); + public static HashMap resourceHashLookup = new HashMap<>(); public int templateID; public ItemTemplate template; public int resourceHash; @@ -2762,6 +2763,7 @@ public class mbEnums { for (ResourceType resourceType : ResourceType.values()) { templateLookup.put(resourceType.templateID, resourceType); templateHashLookup.put(resourceType.templateHash, resourceType); + resourceHashLookup.put(resourceType.resourceHash, resourceType); } } diff --git a/src/engine/net/client/handlers/ArcMineChangeProductionMsgHandler.java b/src/engine/net/client/handlers/ArcMineChangeProductionMsgHandler.java index 4488c083..f4fcfe96 100644 --- a/src/engine/net/client/handlers/ArcMineChangeProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ArcMineChangeProductionMsgHandler.java @@ -50,7 +50,7 @@ public class ArcMineChangeProductionMsgHandler extends AbstractClientMsgHandler //make sure valid resource - mbEnums.ResourceType resource = mbEnums.ResourceType.templateHashLookup.get(changeProductionMsg.getResourceHash()); + mbEnums.ResourceType resource = mbEnums.ResourceType.resourceHashLookup.get(changeProductionMsg.getResourceHash()); if (resource == null) return true;