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, float textureTransparency, 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, float textureTransparency, List<Animation> animations, List<ModelAttachment> attachments) Creates an instance of aModelData
record class. -
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the value of theanimationIncrement
record component.Returns the value of theanimations
record component.Returns the value of theattachments
record component.static ModelData.Builder
builder()
Gets an instance of the builderemissive()
Returns the value of theemissive
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.model()
Returns the value of themodel
record component.Returns the value of themodelType
record component.static ModelData
modelWithTexture
(String model, String texture) An easy way to create an instance ofModelData
with all the default values filled instatic ModelData
modelWithTexture
(net.minecraft.resources.ResourceLocation model, net.minecraft.resources.ResourceLocation texture) An easy way to create an instance ofModelData
with all the default values filled infloat
Returns the value of themovementThreshold
record component.Returns the value of thenormalMap
record component.org.joml.Vector3f
offsets()
Returns the value of theoffsets
record component.org.joml.Vector3f
Returns the value of therotateAngle
record component.org.joml.Vector3f
scale()
Returns the value of thescale
record component.texture()
Returns the value of thetexture
record component.float
Returns the value of thetextureTransparency
record component.final String
toString()
Returns a string representation of this record class.boolean
withTexture
(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, float textureTransparency, List<Animation> animations, List<ModelAttachment> attachments) Creates an instance of aModelData
record class.- Parameters:
modelType
- the value for themodelType
record componentmodel
- the value for themodel
record componenttexture
- the value for thetexture
record componentemissive
- the value for theemissive
record componentnormalMap
- the value for thenormalMap
record componentscale
- the value for thescale
record componentrotateAngle
- the value for therotateAngle
record componentmovementThreshold
- the value for themovementThreshold
record componentanimationIncrement
- the value for theanimationIncrement
record componentoffsets
- the value for theoffsets
record componenttextureTransparency
- the value for thetextureTransparency
record componentanimations
- the value for theanimations
record componentattachments
- the value for theattachments
record component
-
-
Method Details
-
withTexture
-
usingFallback
public boolean usingFallback() -
modelWithTexture
An easy way to create an instance ofModelData
with 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 ofModelData
with 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 themodelType
record component.- Returns:
- the value of the
modelType
record component
-
model
Returns the value of themodel
record component.- Returns:
- the value of the
model
record component
-
texture
Returns the value of thetexture
record component.- Returns:
- the value of the
texture
record component
-
emissive
Returns the value of theemissive
record component.- Returns:
- the value of the
emissive
record component
-
normalMap
Returns the value of thenormalMap
record component.- Returns:
- the value of the
normalMap
record component
-
scale
public org.joml.Vector3f scale()Returns the value of thescale
record component.- Returns:
- the value of the
scale
record component
-
rotateAngle
public org.joml.Vector3f rotateAngle()Returns the value of therotateAngle
record component.- Returns:
- the value of the
rotateAngle
record component
-
movementThreshold
public float movementThreshold()Returns the value of themovementThreshold
record component.- Returns:
- the value of the
movementThreshold
record component
-
animationIncrement
public float animationIncrement()Returns the value of theanimationIncrement
record component.- Returns:
- the value of the
animationIncrement
record component
-
offsets
public org.joml.Vector3f offsets()Returns the value of theoffsets
record component.- Returns:
- the value of the
offsets
record component
-
textureTransparency
public float textureTransparency()Returns the value of thetextureTransparency
record component.- Returns:
- the value of the
textureTransparency
record component
-
animations
Returns the value of theanimations
record component.- Returns:
- the value of the
animations
record component
-
attachments
Returns the value of theattachments
record component.- Returns:
- the value of the
attachments
record component
-