Record Class Material
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.Material
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Material> private final booleanThe field for theforceTranslucentrecord component.private static final com.mojang.serialization.Codec<Material> private static final com.mojang.serialization.Codec<Material> private final IdentifierThe field for thespriterecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMaterial(Identifier sprite) Material(Identifier sprite, boolean forceTranslucent) Creates an instance of aMaterialrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theforceTranslucentrecord component.final inthashCode()Returns a hash code value for this object.sprite()Returns the value of thespriterecord component.final StringtoString()Returns a string representation of this record class.withForceTranslucent(boolean forceTranslucent)
-
Field Details
-
sprite
The field for thespriterecord component. -
forceTranslucent
private final boolean forceTranslucentThe field for theforceTranslucentrecord component. -
SIMPLE_CODEC
-
FULL_CODEC
-
CODEC
-
-
Constructor Details
-
Material
-
Material
Creates an instance of aMaterialrecord class.- Parameters:
sprite- the value for thespriterecord componentforceTranslucent- the value for theforceTranslucentrecord component
-
-
Method Details
-
withForceTranslucent
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
sprite
Returns the value of thespriterecord component.- Returns:
- the value of the
spriterecord component
-
forceTranslucent
public boolean forceTranslucent()Returns the value of theforceTranslucentrecord component.- Returns:
- the value of the
forceTranslucentrecord component
-