Package net.minecraftforge.registries
Class RegistryBuilder<T extends IForgeRegistryEntry<T>>
- java.lang.Object
-
- net.minecraftforge.registries.RegistryBuilder<T>
-
public class RegistryBuilder<T extends IForgeRegistryEntry<T>> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<IForgeRegistry.AddCallback<T>>
addCallback
private boolean
allowModifications
private boolean
allowOverrides
private java.util.List<IForgeRegistry.BakeCallback<T>>
bakeCallback
private java.util.List<IForgeRegistry.ClearCallback<T>>
clearCallback
private java.util.List<IForgeRegistry.CreateCallback<T>>
createCallback
private IForgeRegistry.DummyFactory<T>
dummyFactory
private boolean
hasWrapper
private java.util.Set<ResourceLocation>
legacyNames
private static int
MAX_ID
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 boolean
sync
private java.lang.String
tagFolder
private java.util.List<IForgeRegistry.ValidateCallback<T>>
validateCallback
-
Constructor Summary
Constructors Constructor Description RegistryBuilder()
-
Method Summary
-
-
-
Field Detail
-
MAX_ID
private static final int MAX_ID
- See Also:
- Constant Field Values
-
registryName
private ResourceLocation registryName
-
registryType
private java.lang.Class<T extends IForgeRegistryEntry<T>> registryType
-
optionalDefaultKey
private ResourceLocation optionalDefaultKey
-
minId
private int minId
-
maxId
private int maxId
-
addCallback
private java.util.List<IForgeRegistry.AddCallback<T extends IForgeRegistryEntry<T>>> addCallback
-
clearCallback
private java.util.List<IForgeRegistry.ClearCallback<T extends IForgeRegistryEntry<T>>> clearCallback
-
createCallback
private java.util.List<IForgeRegistry.CreateCallback<T extends IForgeRegistryEntry<T>>> createCallback
-
validateCallback
private java.util.List<IForgeRegistry.ValidateCallback<T extends IForgeRegistryEntry<T>>> validateCallback
-
bakeCallback
private java.util.List<IForgeRegistry.BakeCallback<T extends IForgeRegistryEntry<T>>> bakeCallback
-
saveToDisc
private boolean saveToDisc
-
sync
private boolean sync
-
allowOverrides
private boolean allowOverrides
-
allowModifications
private boolean allowModifications
-
hasWrapper
private boolean hasWrapper
-
tagFolder
@Nullable private java.lang.String tagFolder
-
dummyFactory
private IForgeRegistry.DummyFactory<T extends IForgeRegistryEntry<T>> dummyFactory
-
missingFactory
private IForgeRegistry.MissingFactory<T extends IForgeRegistryEntry<T>> missingFactory
-
legacyNames
private java.util.Set<ResourceLocation> legacyNames
-
-
Method Detail
-
setName
public RegistryBuilder<T> setName(ResourceLocation name)
-
setType
public RegistryBuilder<T> setType(java.lang.Class<T> type)
-
setIDRange
public RegistryBuilder<T> setIDRange(int min, int max)
-
setMaxID
public RegistryBuilder<T> setMaxID(int max)
-
setDefaultKey
public RegistryBuilder<T> setDefaultKey(ResourceLocation key)
-
addCallback
public RegistryBuilder<T> addCallback(java.lang.Object inst)
-
add
public RegistryBuilder<T> add(IForgeRegistry.AddCallback<T> add)
-
onAdd
public RegistryBuilder<T> onAdd(IForgeRegistry.AddCallback<T> add)
-
add
public RegistryBuilder<T> add(IForgeRegistry.ClearCallback<T> clear)
-
onClear
public RegistryBuilder<T> onClear(IForgeRegistry.ClearCallback<T> clear)
-
add
public RegistryBuilder<T> add(IForgeRegistry.CreateCallback<T> create)
-
onCreate
public RegistryBuilder<T> onCreate(IForgeRegistry.CreateCallback<T> create)
-
add
public RegistryBuilder<T> add(IForgeRegistry.ValidateCallback<T> validate)
-
onValidate
public RegistryBuilder<T> onValidate(IForgeRegistry.ValidateCallback<T> validate)
-
add
public RegistryBuilder<T> add(IForgeRegistry.BakeCallback<T> bake)
-
onBake
public RegistryBuilder<T> onBake(IForgeRegistry.BakeCallback<T> bake)
-
set
public RegistryBuilder<T> set(IForgeRegistry.DummyFactory<T> factory)
-
dummy
public RegistryBuilder<T> dummy(IForgeRegistry.DummyFactory<T> factory)
-
set
public RegistryBuilder<T> set(IForgeRegistry.MissingFactory<T> missing)
-
missing
public RegistryBuilder<T> missing(IForgeRegistry.MissingFactory<T> missing)
-
disableSaving
public RegistryBuilder<T> disableSaving()
-
disableSync
public RegistryBuilder<T> disableSync()
-
disableOverrides
public RegistryBuilder<T> disableOverrides()
-
allowModification
public RegistryBuilder<T> allowModification()
-
hasWrapper
RegistryBuilder<T> hasWrapper()
-
tagFolder
public RegistryBuilder<T> tagFolder(java.lang.String tagFolder)
-
legacyName
public RegistryBuilder<T> legacyName(java.lang.String name)
-
legacyName
public RegistryBuilder<T> legacyName(ResourceLocation name)
-
create
public IForgeRegistry<T> create()
-
getAdd
@Nullable public IForgeRegistry.AddCallback<T> getAdd()
-
getClear
@Nullable public IForgeRegistry.ClearCallback<T> getClear()
-
getCreate
@Nullable public IForgeRegistry.CreateCallback<T> getCreate()
-
getValidate
@Nullable public IForgeRegistry.ValidateCallback<T> getValidate()
-
getBake
@Nullable public IForgeRegistry.BakeCallback<T> getBake()
-
getType
public java.lang.Class<T> getType()
-
getDefault
@Nullable public ResourceLocation getDefault()
-
getMinId
public int getMinId()
-
getMaxId
public int getMaxId()
-
getAllowOverrides
public boolean getAllowOverrides()
-
getAllowModifications
public boolean getAllowModifications()
-
getTagFolder
@Nullable public java.lang.String getTagFolder()
-
getDummyFactory
@Nullable public IForgeRegistry.DummyFactory<T> getDummyFactory()
-
getMissingFactory
@Nullable public IForgeRegistry.MissingFactory<T> getMissingFactory()
-
getSaveToDisc
public boolean getSaveToDisc()
-
getSync
public boolean getSync()
-
getLegacyNames
public java.util.Set<ResourceLocation> getLegacyNames()
-
-