Class ModelDataMap

java.lang.Object
net.minecraftforge.client.model.data.ModelDataMap
All Implemented Interfaces:
IModelData
Direct Known Subclasses:
CompositeModel.CompositeModelData, CompositeModel.ModelDataWrapper

public class ModelDataMap extends Object implements IModelData
  • Field Details

  • Constructor Details

    • ModelDataMap

      private ModelDataMap(Map<ModelProperty<?>,Object> map)
    • ModelDataMap

      protected ModelDataMap()
  • Method Details

    • hasProperty

      public boolean hasProperty(ModelProperty<?> prop)
      Description copied from interface: IModelData
      Check if this data has a property, even if the value is null. 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 return null even if this method returns true.

      Specified by:
      hasProperty in interface IModelData
      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 interface IModelData
    • setData

      public <T> T setData(ModelProperty<T> prop, T data)
      Specified by:
      setData in interface IModelData