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 aMaterialrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.joml.Vector4fReturns the value of thebaseColorrecord component.@Nullable org.joml.Vector4fReturns the value of thediffuseColorrecord component.final booleanIndicates whether some other object is "equal to" this one.fromAssimp(org.lwjgl.assimp.AIScene scene, net.minecraft.resources.ResourceLocation backupTexture) static MaterialfromAssimp(org.lwjgl.assimp.AIScene scene, org.lwjgl.assimp.AIMaterial assimpMaterial, net.minecraft.resources.ResourceLocation backupTexture) final inthashCode()Returns a hash code value for this object.@Nullable net.minecraft.resources.ResourceLocationReturns the value of thenormalMaprecord component.@Nullable net.minecraft.resources.ResourceLocationReturns the value of thespecularMaprecord component.net.minecraft.resources.ResourceLocationtexture()Returns the value of thetexturerecord component.final StringtoString()Returns a string representation of this record class.org.joml.Vector2duvOffset()Returns the value of theuvOffsetrecord component.doubleReturns the value of theuvRotationrecord component.org.joml.Vector2duvScale()Returns the value of theuvScalerecord 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 aMaterialrecord class.- Parameters:
texture- the value for thetexturerecord componentnormalMap- the value for thenormalMaprecord componentspecularMap- the value for thespecularMaprecord componentbaseColor- the value for thebaseColorrecord componentdiffuseColor- the value for thediffuseColorrecord componentuvOffset- the value for theuvOffsetrecord componentuvScale- the value for theuvScalerecord componentuvRotation- the value for theuvRotationrecord 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 thetexturerecord component.- Returns:
- the value of the
texturerecord component
-
normalMap
@Nullable public @Nullable net.minecraft.resources.ResourceLocation normalMap()Returns the value of thenormalMaprecord component.- Returns:
- the value of the
normalMaprecord component
-
specularMap
@Nullable public @Nullable net.minecraft.resources.ResourceLocation specularMap()Returns the value of thespecularMaprecord component.- Returns:
- the value of the
specularMaprecord component
-
baseColor
public org.joml.Vector4f baseColor()Returns the value of thebaseColorrecord component.- Returns:
- the value of the
baseColorrecord component
-
diffuseColor
@Nullable public @Nullable org.joml.Vector4f diffuseColor()Returns the value of thediffuseColorrecord component.- Returns:
- the value of the
diffuseColorrecord component
-
uvOffset
public org.joml.Vector2d uvOffset()Returns the value of theuvOffsetrecord component.- Returns:
- the value of the
uvOffsetrecord component
-
uvScale
public org.joml.Vector2d uvScale()Returns the value of theuvScalerecord component.- Returns:
- the value of the
uvScalerecord component
-
uvRotation
public double uvRotation()Returns the value of theuvRotationrecord component.- Returns:
- the value of the
uvRotationrecord component
-