forked from MagicBane/Server
Resource.hash refactored
This commit is contained in:
+35
-28
@@ -2663,41 +2663,48 @@ public class Enum {
|
||||
|
||||
public enum ResourceType implements EnumBitSetHelper<ResourceType> {
|
||||
|
||||
STONE(1580000),
|
||||
TRUESTEEL(1580001),
|
||||
IRON(1580002),
|
||||
ADAMANT(1580003),
|
||||
LUMBER(1580004),
|
||||
OAK(1580005),
|
||||
BRONZEWOOD(1580006),
|
||||
MANDRAKE(1580007),
|
||||
COAL(1580008),
|
||||
AGATE(1580009),
|
||||
DIAMOND(1580010),
|
||||
ONYX(1580011),
|
||||
AZOTH(1580012),
|
||||
ORICHALK(1580013),
|
||||
ANTIMONY(1580014),
|
||||
SULFUR(1580015),
|
||||
QUICKSILVER(1580016),
|
||||
GALVOR(1580017),
|
||||
WORMWOOD(1580018),
|
||||
OBSIDIAN(1580019),
|
||||
BLOODSTONE(1580020),
|
||||
MITHRIL(1580021),
|
||||
GOLD(7);
|
||||
STONE(1580000, 74856115),
|
||||
TRUESTEEL(1580001, -317484979),
|
||||
IRON(1580002, 2504297),
|
||||
ADAMANT(1580003, -1741189964),
|
||||
LUMBER(1580004, -1603256692),
|
||||
OAK(1580005, 74767),
|
||||
BRONZEWOOD(1580006, 1334770447),
|
||||
MANDRAKE(1580007, 1191391799),
|
||||
COAL(1580008, 2559427),
|
||||
AGATE(1580009, 75173057),
|
||||
DIAMOND(1580010, -1730704107),
|
||||
ONYX(1580011, 2977263),
|
||||
AZOTH(1580012, 78329697),
|
||||
ORICHALK(1580013, -2036290524),
|
||||
ANTIMONY(1580014, 452320058),
|
||||
SULFUR(1580015, -1586349421),
|
||||
QUICKSILVER(1580016, -472884509),
|
||||
GALVOR(1580017, -1596311545),
|
||||
WORMWOOD(1580018, 1532478436),
|
||||
OBSIDIAN(1580019, -697973233),
|
||||
BLOODSTONE(1580020, -1569826353),
|
||||
MITHRIL(1580021, -1761257186),
|
||||
GOLD(7, 2308551);
|
||||
|
||||
public static HashMap<Integer, ResourceType> resourceLookup = new HashMap<>();
|
||||
public int itemID;
|
||||
public static HashMap<Integer, ResourceType> hashLookup = new HashMap<>();
|
||||
public int templateID;
|
||||
public int hash;
|
||||
|
||||
ResourceType(int itemID) {
|
||||
this.itemID = itemID;
|
||||
ResourceType(int templateID, int hash) {
|
||||
this.templateID = templateID;
|
||||
this.hash = hash;
|
||||
}
|
||||
|
||||
public static void InitializeResourceTypes() {
|
||||
|
||||
for (ResourceType resourceType : ResourceType.values())
|
||||
resourceLookup.put(resourceType.itemID, resourceType);
|
||||
for (ResourceType resourceType : ResourceType.values()) {
|
||||
resourceLookup.put(resourceType.templateID, resourceType);
|
||||
hashLookup.put(resourceType.hash, resourceType);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user