Package net.minecraftforge.client.model
Class CompositeModel.CompositeModelData
java.lang.Object
net.minecraftforge.client.model.data.ModelDataMap
net.minecraftforge.client.model.CompositeModel.CompositeModelData
- All Implemented Interfaces:
IModelData
- Enclosing class:
- CompositeModel
A model data container which stores data for child components.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.client.model.data.ModelDataMap
ModelDataMap.Builder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<String,IModelData> static final ModelProperty<CompositeModel.CompositeModelData> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(IModelData modelData) Helper to get the CompositeModelData from an unknown IModelData instance.static IModelDataget(IModelData modelData, String name) Helper to get child data from an unknown IModelData instance.<T> TgetData(ModelProperty<T> prop) getSubmodelData(String name) booleanhasProperty(ModelProperty<?> prop) Check if this data has a property, even if the value isnull.voidputSubmodelData(String name, IModelData data) <T> TsetData(ModelProperty<T> prop, T data)
-
Field Details
-
SUBMODEL_DATA
-
parts
-
-
Constructor Details
-
CompositeModelData
public CompositeModelData()
-
-
Method Details
-
get
Helper to get the CompositeModelData from an unknown IModelData instance.- Parameters:
modelData- The undetermined instance to get data from- Returns:
- An optional representing the composite data, if present.
-
get
Helper to get child data from an unknown IModelData instance.- Parameters:
modelData- The undetermined instance to get data fromname- The name of the child part to get data for.- Returns:
- The data for the child, or empty if not available.
-
getSubmodelData
-
putSubmodelData
-
hasProperty
Description copied from interface:IModelDataCheck if this data has a property, even if the value isnull. Can be used by code that intends to fill in data for a render pipeline, such as the forge animation system.IMPORTANT:
IModelData.getData(ModelProperty)can returnnulleven if this method returnstrue.- Specified by:
hasPropertyin interfaceIModelData- Overrides:
hasPropertyin classModelDataMap- Parameters:
prop- The property to check for inclusion in this model data- Returns:
trueif this data has the given property, even if no value is present
-
getData
- Specified by:
getDatain interfaceIModelData- Overrides:
getDatain classModelDataMap
-
setData
- Specified by:
setDatain interfaceIModelData- Overrides:
setDatain classModelDataMap
-