Record Class Material
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.client.render.entity.renderers.assimp.Material
public record Material(net.minecraft.resources.ResourceLocation texture, @Nullable net.minecraft.resources.ResourceLocation normalMap, @Nullable net.minecraft.resources.ResourceLocation specularMap, org.joml.Vector4f baseColor, @Nullable org.joml.Vector4f diffuseColor, org.joml.Vector2d uvOffset, org.joml.Vector2d uvScale, double uvRotation)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionMaterial
(@Nullable net.minecraft.resources.ResourceLocation texture, net.minecraft.resources.ResourceLocation normalMap, net.minecraft.resources.ResourceLocation specularMap, org.joml.Vector4f baseColor, org.joml.Vector4f diffuseColor, org.joml.Vector2d uvOffset, org.joml.Vector2d uvScale, double uvRotation) Creates an instance of aMaterial
record class. -
Method Summary
Modifier and TypeMethodDescriptionorg.joml.Vector4f
Returns the value of thebaseColor
record component.@Nullable org.joml.Vector4f
Returns the value of thediffuseColor
record component.final boolean
Indicates whether some other object is "equal to" this one.fromAssimp
(org.lwjgl.assimp.AIScene scene, net.minecraft.resources.ResourceLocation backupTexture) static Material
fromAssimp
(org.lwjgl.assimp.AIScene scene, org.lwjgl.assimp.AIMaterial assimpMaterial, net.minecraft.resources.ResourceLocation backupTexture) final int
hashCode()
Returns a hash code value for this object.@Nullable net.minecraft.resources.ResourceLocation
Returns the value of thenormalMap
record component.@Nullable net.minecraft.resources.ResourceLocation
Returns the value of thespecularMap
record component.net.minecraft.resources.ResourceLocation
texture()
Returns the value of thetexture
record component.final String
toString()
Returns a string representation of this record class.org.joml.Vector2d
uvOffset()
Returns the value of theuvOffset
record component.double
Returns the value of theuvRotation
record component.org.joml.Vector2d
uvScale()
Returns the value of theuvScale
record component.
-
Constructor Details
-
Material
public Material(@Nullable @Nullable net.minecraft.resources.ResourceLocation texture, net.minecraft.resources.ResourceLocation normalMap, net.minecraft.resources.ResourceLocation specularMap, org.joml.Vector4f baseColor, org.joml.Vector4f diffuseColor, org.joml.Vector2d uvOffset, org.joml.Vector2d uvScale, double uvRotation) Creates an instance of aMaterial
record class.- Parameters:
texture
- the value for thetexture
record componentnormalMap
- the value for thenormalMap
record componentspecularMap
- the value for thespecularMap
record componentbaseColor
- the value for thebaseColor
record componentdiffuseColor
- the value for thediffuseColor
record componentuvOffset
- the value for theuvOffset
record componentuvScale
- the value for theuvScale
record componentuvRotation
- the value for theuvRotation
record component
-
-
Method Details
-
fromAssimp
-
fromAssimp
public static Material fromAssimp(org.lwjgl.assimp.AIScene scene, org.lwjgl.assimp.AIMaterial assimpMaterial, net.minecraft.resources.ResourceLocation backupTexture) -
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 '=='. -
texture
public net.minecraft.resources.ResourceLocation texture()Returns the value of thetexture
record component.- Returns:
- the value of the
texture
record component
-
normalMap
@Nullable public @Nullable net.minecraft.resources.ResourceLocation normalMap()Returns the value of thenormalMap
record component.- Returns:
- the value of the
normalMap
record component
-
specularMap
@Nullable public @Nullable net.minecraft.resources.ResourceLocation specularMap()Returns the value of thespecularMap
record component.- Returns:
- the value of the
specularMap
record component
-
baseColor
public org.joml.Vector4f baseColor()Returns the value of thebaseColor
record component.- Returns:
- the value of the
baseColor
record component
-
diffuseColor
@Nullable public @Nullable org.joml.Vector4f diffuseColor()Returns the value of thediffuseColor
record component.- Returns:
- the value of the
diffuseColor
record component
-
uvOffset
public org.joml.Vector2d uvOffset()Returns the value of theuvOffset
record component.- Returns:
- the value of the
uvOffset
record component
-
uvScale
public org.joml.Vector2d uvScale()Returns the value of theuvScale
record component.- Returns:
- the value of the
uvScale
record component
-
uvRotation
public double uvRotation()Returns the value of theuvRotation
record component.- Returns:
- the value of the
uvRotation
record component
-