public class RegistryBuilder<T extends IForgeRegistryEntry<T>>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.List<IForgeRegistry.AddCallback<T>> |
addCallback |
private boolean |
allowModifications |
private boolean |
allowOverrides |
private java.util.List<IForgeRegistry.ClearCallback<T>> |
clearCallback |
private java.util.List<IForgeRegistry.CreateCallback<T>> |
createCallback |
private IForgeRegistry.DummyFactory<T> |
dummyFactory |
private int |
maxId |
private int |
minId |
private IForgeRegistry.MissingFactory<T> |
missingFactory |
private ResourceLocation |
optionalDefaultKey |
private ResourceLocation |
registryName |
private java.lang.Class<T> |
registryType |
private boolean |
saveToDisc |
private java.util.List<IForgeRegistry.ValidateCallback<T>> |
validateCallback |
Constructor and Description |
---|
RegistryBuilder() |
private ResourceLocation registryName
private java.lang.Class<T extends IForgeRegistryEntry<T>> registryType
private ResourceLocation optionalDefaultKey
private int minId
private int maxId
private java.util.List<IForgeRegistry.AddCallback<T extends IForgeRegistryEntry<T>>> addCallback
private java.util.List<IForgeRegistry.ClearCallback<T extends IForgeRegistryEntry<T>>> clearCallback
private java.util.List<IForgeRegistry.CreateCallback<T extends IForgeRegistryEntry<T>>> createCallback
private java.util.List<IForgeRegistry.ValidateCallback<T extends IForgeRegistryEntry<T>>> validateCallback
private boolean saveToDisc
private boolean allowOverrides
private boolean allowModifications
private IForgeRegistry.DummyFactory<T extends IForgeRegistryEntry<T>> dummyFactory
private IForgeRegistry.MissingFactory<T extends IForgeRegistryEntry<T>> missingFactory
public RegistryBuilder<T> setName(ResourceLocation name)
public RegistryBuilder<T> setType(java.lang.Class<T> type)
public RegistryBuilder<T> setIDRange(int min, int max)
public RegistryBuilder<T> setMaxID(int max)
public RegistryBuilder<T> setDefaultKey(ResourceLocation key)
public RegistryBuilder<T> addCallback(java.lang.Object inst)
public RegistryBuilder<T> add(IForgeRegistry.AddCallback<T> add)
public RegistryBuilder<T> add(IForgeRegistry.ClearCallback<T> clear)
public RegistryBuilder<T> add(IForgeRegistry.CreateCallback<T> create)
public RegistryBuilder<T> add(IForgeRegistry.ValidateCallback<T> validate)
public RegistryBuilder<T> set(IForgeRegistry.DummyFactory<T> factory)
public RegistryBuilder<T> set(IForgeRegistry.MissingFactory<T> missing)
public RegistryBuilder<T> disableSaving()
public RegistryBuilder<T> disableOverrides()
public RegistryBuilder<T> allowModification()
public IForgeRegistry<T> create()
@Nullable private IForgeRegistry.AddCallback<T> getAdd()
@Nullable private IForgeRegistry.ClearCallback<T> getClear()
@Nullable private IForgeRegistry.CreateCallback<T> getCreate()
@Nullable private IForgeRegistry.ValidateCallback<T> getValidate()