Record Class ModelData
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, List<Animation> animations, List<ModelAttachment> attachments)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionModelData(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, List<Animation> animations, List<ModelAttachment> attachments) Creates an instance of aModelDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of theanimationIncrementrecord component.Returns the value of theanimationsrecord component.Returns the value of theattachmentsrecord component.static ModelData.Builderbuilder()Gets an instance of the builderemissive()Returns the value of theemissiverecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.model()Returns the value of themodelrecord component.Returns the value of themodelTyperecord component.static ModelDatamodelWithTexture(String model, String texture) An easy way to create an instance ofModelDatawith all the default values filled instatic ModelDatamodelWithTexture(net.minecraft.resources.ResourceLocation model, net.minecraft.resources.ResourceLocation texture) An easy way to create an instance ofModelDatawith all the default values filled infloatReturns the value of themovementThresholdrecord component.Returns the value of thenormalMaprecord component.org.joml.Vector3foffsets()Returns the value of theoffsetsrecord component.org.joml.Vector3fReturns the value of therotateAnglerecord component.org.joml.Vector3fscale()Returns the value of thescalerecord component.texture()Returns the value of thetexturerecord component.final StringtoString()Returns a string representation of this record class.booleanwithTexture(ResourceWithFallback texture)
-
Field Details
-
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, List<Animation> animations, List<ModelAttachment> attachments) Creates an instance of aModelDatarecord class.- Parameters:
modelType- the value for themodelTyperecord componentmodel- the value for themodelrecord componenttexture- the value for thetexturerecord componentemissive- the value for theemissiverecord componentnormalMap- the value for thenormalMaprecord componentscale- the value for thescalerecord componentrotateAngle- the value for therotateAnglerecord componentmovementThreshold- the value for themovementThresholdrecord componentanimationIncrement- the value for theanimationIncrementrecord componentoffsets- the value for theoffsetsrecord componentanimations- the value for theanimationsrecord componentattachments- the value for theattachmentsrecord component
-
-
Method Details
-
withTexture
-
usingFallback
public boolean usingFallback() -
modelWithTexture
An easy way to create an instance ofModelDatawith all the default values filled in- Parameters:
model- The model pathtexture- 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 ofModelDatawith all the default values filled in- Parameters:
model- The model pathtexture- The texture path- Returns:
- The model data
-
builder
Gets an instance of the builder- Returns:
- The builder
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
modelType
Returns the value of themodelTyperecord component.- Returns:
- the value of the
modelTyperecord component
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
texture
Returns the value of thetexturerecord component.- Returns:
- the value of the
texturerecord component
-
emissive
Returns the value of theemissiverecord component.- Returns:
- the value of the
emissiverecord component
-
normalMap
Returns the value of thenormalMaprecord component.- Returns:
- the value of the
normalMaprecord component
-
scale
public org.joml.Vector3f scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-
rotateAngle
public org.joml.Vector3f rotateAngle()Returns the value of therotateAnglerecord component.- Returns:
- the value of the
rotateAnglerecord component
-
movementThreshold
public float movementThreshold()Returns the value of themovementThresholdrecord component.- Returns:
- the value of the
movementThresholdrecord component
-
animationIncrement
public float animationIncrement()Returns the value of theanimationIncrementrecord component.- Returns:
- the value of the
animationIncrementrecord component
-
offsets
public org.joml.Vector3f offsets()Returns the value of theoffsetsrecord component.- Returns:
- the value of the
offsetsrecord component
-
animations
Returns the value of theanimationsrecord component.- Returns:
- the value of the
animationsrecord component
-
attachments
Returns the value of theattachmentsrecord component.- Returns:
- the value of the
attachmentsrecord component
-