Interface IValueTypeRegistry
- All Superinterfaces:
org.cyclops.cyclopscore.init.IRegistry,IVariableFacadeHandler<IValueTypeVariableFacade>
- All Known Implementing Classes:
ValueTypeRegistry
public interface IValueTypeRegistry
extends org.cyclops.cyclopscore.init.IRegistry, IVariableFacadeHandler<IValueTypeVariableFacade>
Registry for
IValueType-
Method Summary
Modifier and TypeMethodDescriptiongetValueType(net.minecraft.resources.ResourceLocation name) Get the value type by name.<V extends IValue,T extends IValueType<V>>
net.minecraft.resources.ResourceLocationgetValueTypeModel(T valueType) Get the model resource location of the given value type.Collection<net.minecraft.resources.ResourceLocation>Get all registered model resource locations for the value types.<V extends IValue,T extends IValueType<V>>
Tregister(T valueType) Register a new value type.<V extends IValue,T extends IValueTypeCategory<V>>
TregisterCategory(T category) Register a new value category.<V extends IValue,T extends IValueType<V>>
voidregisterValueTypeModel(T valueType, net.minecraft.resources.ResourceLocation modelLocation) Register a model resource location for the given value type.Methods inherited from interface org.cyclops.integrateddynamics.api.item.IVariableFacadeHandler
deserializeVariableFacadePredicate, deserializeVariablePredicate, getUniqueName, getVariableFacade, setVariableFacade
-
Method Details
-
register
Register a new value type.- Type Parameters:
V- The value type.T- The value type type.- Parameters:
valueType- The part type.- Returns:
- The registered value type.
-
registerCategory
Register a new value category. This registration can be overwritten, so only the last registered category is remembered.- Type Parameters:
V- The value type.T- The value type type.- Parameters:
category- The category.- Returns:
- The registered category.
-
getValueType
Get the value type by name.- Parameters:
name- The unique name.- Returns:
- The value type or null if not found.
-
registerValueTypeModel
<V extends IValue,T extends IValueType<V>> void registerValueTypeModel(T valueType, net.minecraft.resources.ResourceLocation modelLocation) Register a model resource location for the given value type.- Type Parameters:
V- The value type.T- The value type type.- Parameters:
valueType- The value type.modelLocation- The model resource location.
-
getValueTypeModel
<V extends IValue,T extends IValueType<V>> net.minecraft.resources.ResourceLocation getValueTypeModel(T valueType) Get the model resource location of the given value type.- Type Parameters:
V- The value type.T- The value type type.- Parameters:
valueType- The value type.- Returns:
- The model resource location.
-
getValueTypeModels
Collection<net.minecraft.resources.ResourceLocation> getValueTypeModels()Get all registered model resource locations for the value types.- Returns:
- All model resource locations.
-
getValueTypes
Collection<IValueType> getValueTypes()- Returns:
- All registered value types.
-