Contents
Record Class MtlParser.MtlMaterial
java.lang.Object
java.lang.Record
com.hypixel.hytale.builtin.buildertools.objimport.MtlParser.MtlMaterial
- Record Components:
name- material namediffuseColor- RGB color (0.0-1.0 range), may be nulldiffuseTexturePath- path to diffuse texture, may be null
- Enclosing class:
MtlParser
-
Constructor Summary
ConstructorsConstructorDescriptionMtlMaterial(String name, float[] diffuseColor, String diffuseTexturePath) Creates an instance of aMtlMaterialrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloat[]Returns the value of thediffuseColorrecord component.Returns the value of thediffuseTexturePathrecord component.final booleanIndicates whether some other object is "equal to" this one.int[]Gets the diffuse color as RGB bytes (0-255).final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MtlMaterial
public MtlMaterial(@Nonnull String name, @Nullable float[] diffuseColor, @Nullable String diffuseTexturePath) Creates an instance of aMtlMaterialrecord class.- Parameters:
name- the value for thenamerecord componentdiffuseColor- the value for thediffuseColorrecord componentdiffuseTexturePath- the value for thediffuseTexturePathrecord component
-
-
Method Details
-
getDiffuseColorRGB
@Nullable public int[] getDiffuseColorRGB()Gets the diffuse color as RGB bytes (0-255).- Returns:
- RGB array or null if no color defined
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
name
-
diffuseColor
@Nullable public float[] diffuseColor()Returns the value of thediffuseColorrecord component.- Returns:
- the value of the
diffuseColorrecord component
-
diffuseTexturePath
Returns the value of thediffuseTexturePathrecord component.- Returns:
- the value of the
diffuseTexturePathrecord component
-