Moved FlatLevelPresets to BCLib and started WorldPresets
This commit is contained in:
parent
e8dbbffa8e
commit
375eb09bb9
5 changed files with 63 additions and 8 deletions
|
@ -35,11 +35,15 @@ public class TagAPI {
|
|||
"tags/worldgen/biome",
|
||||
b -> BiomeAPI.getBiomeID(b));
|
||||
|
||||
private static <T> TagType.RegistryBacked<T> registerType(DefaultedRegistry<T> registry) {
|
||||
public static <T> TagType.RegistryBacked<T> registerType(DefaultedRegistry<T> registry) {
|
||||
TagType<T> type = new TagType.RegistryBacked<>(registry);
|
||||
return (TagType.RegistryBacked<T>) TYPES.computeIfAbsent(type.directory, (dir) -> type);
|
||||
}
|
||||
|
||||
public static <T> TagType.Simple<T> registerType(Registry<T> registry, String directory) {
|
||||
return registerType(registry.key(), directory, (o) -> registry.getKey(o));
|
||||
}
|
||||
|
||||
public static <T> TagType.Simple<T> registerType(ResourceKey<? extends Registry<T>> registry,
|
||||
String directory,
|
||||
Function<T, ResourceLocation> locationProvider) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue