FabricRegistryBuilder

public final class FabricRegistryBuilder<T, R extends MutableRegistry<T>>

Used to create custom registries, with specified registry attributes.

{@code * SimpleRegistryregistry = FabricRegistryBuilder.createSimple(String.class, new Identifier("registry_sync", "fabric_registry"))
 * 													.attribute(RegistryAttribute.SYNCED)
 * 													.buildAndRegister();
 * 	}
 

Parameters

<T>

The type stored in the Registry

<R>

The registry type

Functions

attribute
Link copied to clipboard
FabricRegistryBuilder<T, Rattribute(RegistryAttribute attribute)
Add a RegistryAttribute to the registry.
buildAndRegister
Link copied to clipboard
R buildAndRegister()
Applies the attributes to the registry and registers it.
createDefaulted
Link copied to clipboard
static FabricRegistryBuilder<T, DefaultedRegistry<T>> createDefaulted<T>(Class<T> type, Identifier registryId, Identifier defaultId)
Create a new FabricRegistryBuilder using a DefaultedRegistry, the registry has the MODDED attribute by default.
createSimple
Link copied to clipboard
static FabricRegistryBuilder<T, SimpleRegistry<T>> createSimple<T>(Class<T> type, Identifier registryId)
Create a new FabricRegistryBuilder using a SimpleRegistry, the registry has the MODDED attribute by default.
from
Link copied to clipboard
static FabricRegistryBuilder<T, Rfrom<T, R extends MutableRegistry<T>>(R registry)
Create a new FabricRegistryBuilder, the registry has the MODDED attribute by default.

Sources

jvm source
Link copied to clipboard