Enum EmptyModelData
- java.lang.Object
-
- java.lang.Enum<EmptyModelData>
-
- net.minecraftforge.client.model.data.EmptyModelData
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<EmptyModelData>
,IModelData
public enum EmptyModelData extends java.lang.Enum<EmptyModelData> implements IModelData
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description private
EmptyModelData()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
getData(ModelProperty<T> prop)
boolean
hasProperty(ModelProperty<?> prop)
Check if this data has a property, even if the value isnull
.<T> T
setData(ModelProperty<T> prop, T data)
static EmptyModelData
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static EmptyModelData[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final EmptyModelData INSTANCE
-
-
Method Detail
-
values
public static EmptyModelData[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EmptyModelData c : EmptyModelData.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EmptyModelData valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
hasProperty
public boolean hasProperty(ModelProperty<?> prop)
Description copied from interface:IModelData
Check 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 returnnull
even if this method returnstrue
.- Specified by:
hasProperty
in interfaceIModelData
- Parameters:
prop
- The property to check for inclusion in this model data- Returns:
true
if this data has the given property, even if no value is present
-
getData
public <T> T getData(ModelProperty<T> prop)
- Specified by:
getData
in interfaceIModelData
-
setData
public <T> T setData(ModelProperty<T> prop, T data)
- Specified by:
setData
in interfaceIModelData
-
-