public class BaseRegistryUtil
extends java.lang.Object
IForgeRegistryEntry
fields.Modifier and Type | Class and Description |
---|---|
static interface |
BaseRegistryUtil.Exclude
Exclude an entry from fetching with
BaseRegistryUtil . |
Constructor and Description |
---|
BaseRegistryUtil() |
Modifier and Type | Method and Description |
---|---|
static <T> java.util.List<T> |
getAllClassEntries(java.lang.Class<T> classType)
This method is caller sensitive!
|
static <T> java.util.List<T> |
getAllClassEntries(java.lang.Class<T> classType,
java.lang.Class<?> init)
Returns all not excluded static fields of a class which extends the passed classType.
|
static <C,T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> |
getAllGenericRegistryEntriesAndApplyNames(java.lang.String modid,
java.lang.Class<C> classType)
This method is caller sensitive!
|
static <C,T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> |
getAllGenericRegistryEntriesAndApplyNames(java.lang.String modid,
java.lang.Class<C> classType,
java.lang.Class<?> init)
This method is for generic registry entries.
|
static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> |
getAllRegistryEntriesAndApplyNames(java.lang.String modid,
java.lang.Class<T> classType)
This method is caller sensitive!
|
static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> |
getAllRegistryEntriesAndApplyNames(java.lang.String modid,
java.lang.Class<T> classType,
java.lang.Class<?> init)
Returns all not excluded static fields of a class which extends the passed classType.
|
static java.util.List<net.minecraft.item.BlockItem> |
getBlockItems(java.util.List<net.minecraft.block.Block> blocks)
Returns block items where the block implements
IUBlockRegistryType . |
static <T> java.util.List<T> |
getClassEntries(java.lang.Class<T> classType)
This method is caller sensitive!
|
static <T> java.util.List<T> |
getClassEntries(java.lang.Class<T> classType,
java.lang.Class<?> init)
Returns all not excluded static fields of a class which extends the passed classType.
|
static <T> java.util.List<T> |
getClassEntriesFromArrayType(java.lang.Class<T> classType)
This method is caller sensitive!
|
static <T> java.util.List<T> |
getClassEntriesFromArrayType(java.lang.Class<T> classType,
java.lang.Class<?> init)
Returns all not excluded static fields of a class which extends the passed classType and are packed in and
IUArrayRegistryType . |
public static java.util.List<net.minecraft.item.BlockItem> getBlockItems(java.util.List<net.minecraft.block.Block> blocks)
IUBlockRegistryType
. The registry name of the item block is
set to the block's name.blocks
- List with blocks. The registry names must be setpublic static <C,T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> java.util.List<C> getAllGenericRegistryEntriesAndApplyNames(java.lang.String modid, java.lang.Class<C> classType)
getAllGenericRegistryEntriesAndApplyNames(String, Class, Class)
. C
- Also kind of the same as T
- Type of the IForgeRegistryEntry
to search formodid
- The mod identifier to apply the namesclassType
- Class of the IForgeRegistryEntry
to search forgetAllRegistryEntriesAndApplyNames(String, Class, Class)
public static <C,T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> java.util.List<C> getAllGenericRegistryEntriesAndApplyNames(java.lang.String modid, java.lang.Class<C> classType, java.lang.Class<?> init)
C
- Also kind of the same as T
- Type of the IForgeRegistryEntry
to search formodid
- The mod identifier to apply the namesclassType
- Class of the IForgeRegistryEntry
to search forinit
- Class where to search for entriesgetAllRegistryEntriesAndApplyNames(String, Class, Class)
public static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> java.util.List<T> getAllRegistryEntriesAndApplyNames(java.lang.String modid, java.lang.Class<T> classType)
getAllRegistryEntriesAndApplyNames(String, Class, Class)
. IUArrayRegistryType
fields with the given classType The classType must be a subclass of
IForgeRegistryEntry
. If the entry implements IURegistryType
the
IForgeRegistryEntry.setRegistryName(ResourceLocation)
is executed to set the registry name. With
BaseRegistryUtil.Exclude
you can exclude fields from this list.T
- Type of the IForgeRegistryEntry
to search formodid
- The mod identifier to apply the namesclassType
- Class of the IForgeRegistryEntry
to search forgetAllClassEntries(Class)
public static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> java.util.List<T> getAllRegistryEntriesAndApplyNames(java.lang.String modid, java.lang.Class<T> classType, java.lang.Class<?> init)
IUArrayRegistryType
fields with the given classType The classType must be a subclass of
IForgeRegistryEntry
. If the entry implements IURegistryType
the
IForgeRegistryEntry.setRegistryName(ResourceLocation)
is executed to set the registry name. With
BaseRegistryUtil.Exclude
you can exclude fields from this list.T
- Type of the IForgeRegistryEntry
to search formodid
- The mod identifier to apply the namesclassType
- Class of the IForgeRegistryEntry
to search forinit
- Class where to search for entriesgetAllClassEntries(Class, Class)
public static <T> java.util.List<T> getAllClassEntries(java.lang.Class<T> classType)
getAllClassEntries(Class, Class)
. IUArrayRegistryType
fields with the given classType. With BaseRegistryUtil.Exclude
you can exclude fields from this
list.T
- Type of the entry to search forclassType
- Class of the entry to search forgetClassEntries(Class)
,
getClassEntriesFromArrayType(Class)
public static <T> java.util.List<T> getClassEntries(java.lang.Class<T> classType)
getClassEntries(Class, Class)
. BaseRegistryUtil.Exclude
you can
exclude fields from this list.T
- Type of the entry to search forclassType
- Class of the entry to search forpublic static <T> java.util.List<T> getClassEntriesFromArrayType(java.lang.Class<T> classType)
getClassEntriesFromArrayType(Class, Class)
. IUArrayRegistryType
. With BaseRegistryUtil.Exclude
you can exclude fields from this list.T
- Type of the entry to search forclassType
- Class of the entry to search forpublic static <T> java.util.List<T> getAllClassEntries(java.lang.Class<T> classType, java.lang.Class<?> init)
IUArrayRegistryType
fields with the given classType. With BaseRegistryUtil.Exclude
you can exclude fields from this
list.T
- Type of the entry to search forclassType
- Class of the entry to search forinit
- Class where to search for entriesgetClassEntries(Class, Class)
,
getClassEntriesFromArrayType(Class, Class)
public static <T> java.util.List<T> getClassEntries(java.lang.Class<T> classType, java.lang.Class<?> init)
BaseRegistryUtil.Exclude
you can
exclude fields from this list.T
- Type of the entry to search forclassType
- Class of the entry to search forinit
- Class where to search for entriespublic static <T> java.util.List<T> getClassEntriesFromArrayType(java.lang.Class<T> classType, java.lang.Class<?> init)
IUArrayRegistryType
. With BaseRegistryUtil.Exclude
you can exclude fields from this list.T
- Type of the entry to search forclassType
- Class of the entry to search forinit
- Class where to search for entries