Add a way to get a list of registered biome types (#4685)

This commit is contained in:
Mackenzie McClane 2018-04-01 03:03:27 -05:00 committed by LexManos
parent fff660918a
commit e099aa32d4

View file

@ -43,6 +43,7 @@ public class BiomeDictionary
{ {
private static final Map<String, Type> byName = new HashMap<String, Type>(); private static final Map<String, Type> byName = new HashMap<String, Type>();
private static Collection<Type> allTypes = Collections.unmodifiableCollection(byName.values());
/*Temperature-based tags. Specifying neither implies a biome is temperate*/ /*Temperature-based tags. Specifying neither implies a biome is temperate*/
public static final Type HOT = new Type("HOT"); public static final Type HOT = new Type("HOT");
@ -150,6 +151,14 @@ public class BiomeDictionary
} }
return t; return t;
} }
/**
* @return An unmodifiable collection of all current biome types.
*/
public static Collection<Type> getAll()
{
return allTypes;
}
} }
private static final Map<ResourceLocation, BiomeInfo> biomeInfoMap = new HashMap<ResourceLocation, BiomeInfo>(); private static final Map<ResourceLocation, BiomeInfo> biomeInfoMap = new HashMap<ResourceLocation, BiomeInfo>();