java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.pokemon.species.palette.locator.ModelData

public record ModelData(EntityRenderer modelType, ResourceWithFallback model, TextureProvider texture, TextureProvider emissive, TextureProvider normalMap, org.joml.Vector3f scale, org.joml.Vector3f rotateAngle, float movementThreshold, float animationIncrement, org.joml.Vector3f offsets, float textureTransparency, List<Animation> animations, List<ModelAttachment> attachments) extends Record
  • Field Details

    • MODEL_DATA_CODEC

      public static final com.mojang.serialization.Codec<ModelData> MODEL_DATA_CODEC
  • Constructor Details

    • ModelData

      public ModelData(EntityRenderer modelType, ResourceWithFallback model, TextureProvider texture, TextureProvider emissive, TextureProvider normalMap, org.joml.Vector3f scale, org.joml.Vector3f rotateAngle, float movementThreshold, float animationIncrement, org.joml.Vector3f offsets, float textureTransparency, List<Animation> animations, List<ModelAttachment> attachments)
      Creates an instance of a ModelData record class.
      Parameters:
      modelType - the value for the modelType record component
      model - the value for the model record component
      texture - the value for the texture record component
      emissive - the value for the emissive record component
      normalMap - the value for the normalMap record component
      scale - the value for the scale record component
      rotateAngle - the value for the rotateAngle record component
      movementThreshold - the value for the movementThreshold record component
      animationIncrement - the value for the animationIncrement record component
      offsets - the value for the offsets record component
      textureTransparency - the value for the textureTransparency record component
      animations - the value for the animations record component
      attachments - the value for the attachments record component
  • Method Details

    • withTexture

      public ModelData withTexture(ResourceWithFallback texture)
    • usingFallback

      public boolean usingFallback()
    • modelWithTexture

      public static ModelData modelWithTexture(String model, String texture)
      An easy way to create an instance of ModelData with all the default values filled in
      Parameters:
      model - The model path
      texture - The texture path
      Returns:
      The model data
    • modelWithTexture

      public static ModelData modelWithTexture(net.minecraft.resources.ResourceLocation model, net.minecraft.resources.ResourceLocation texture)
      An easy way to create an instance of ModelData with all the default values filled in
      Parameters:
      model - The model path
      texture - The texture path
      Returns:
      The model data
    • builder

      public static ModelData.Builder builder()
      Gets an instance of the builder
      Returns:
      The builder
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • modelType

      public EntityRenderer modelType()
      Returns the value of the modelType record component.
      Returns:
      the value of the modelType record component
    • model

      public ResourceWithFallback model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • texture

      public TextureProvider texture()
      Returns the value of the texture record component.
      Returns:
      the value of the texture record component
    • emissive

      public TextureProvider emissive()
      Returns the value of the emissive record component.
      Returns:
      the value of the emissive record component
    • normalMap

      public TextureProvider normalMap()
      Returns the value of the normalMap record component.
      Returns:
      the value of the normalMap record component
    • scale

      public org.joml.Vector3f scale()
      Returns the value of the scale record component.
      Returns:
      the value of the scale record component
    • rotateAngle

      public org.joml.Vector3f rotateAngle()
      Returns the value of the rotateAngle record component.
      Returns:
      the value of the rotateAngle record component
    • movementThreshold

      public float movementThreshold()
      Returns the value of the movementThreshold record component.
      Returns:
      the value of the movementThreshold record component
    • animationIncrement

      public float animationIncrement()
      Returns the value of the animationIncrement record component.
      Returns:
      the value of the animationIncrement record component
    • offsets

      public org.joml.Vector3f offsets()
      Returns the value of the offsets record component.
      Returns:
      the value of the offsets record component
    • textureTransparency

      public float textureTransparency()
      Returns the value of the textureTransparency record component.
      Returns:
      the value of the textureTransparency record component
    • animations

      public List<Animation> animations()
      Returns the value of the animations record component.
      Returns:
      the value of the animations record component
    • attachments

      public List<ModelAttachment> attachments()
      Returns the value of the attachments record component.
      Returns:
      the value of the attachments record component