+/*
+ The type a hash can be. The earlier a type is mentioned in this enum,
+ the earlier it is tried at crafting, and the less likely is a collision.
+ Changing order causes changes in behaviour, so know what you do.
+ */
+enum CraftHashType
+{
+ // Hashes the normalized names of the recipe's elements.
+ // Only recipes without group usage can be found here,
+ // because groups can't be guessed efficiently.
+ CRAFT_HASH_TYPE_ITEM_NAMES,
+
+ // Counts the non-empty slots.
+ CRAFT_HASH_TYPE_COUNT,
+
+ // This layer both spares an extra variable, and helps to retain (albeit rarely used) functionality. Maps to 0.
+ // Before hashes are "initialized", all hashes reside here, after initialisation, none are.
+ CRAFT_HASH_TYPE_UNHASHED
+
+};
+const int craft_hash_type_max = (int) CRAFT_HASH_TYPE_UNHASHED;
+