Record Class Transparency
java.lang.Object
java.lang.Record
com.mojang.blaze3d.platform.Transparency
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for thehasTranslucentrecord component.private final booleanThe field for thehasTransparentrecord component.static final Transparencystatic final Transparencystatic final Transparencystatic final Transparency -
Constructor Summary
ConstructorsConstructorDescriptionTransparency(boolean hasTransparent, boolean hasTranslucent) Creates an instance of aTransparencyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasTranslucentrecord component.booleanReturns the value of thehasTransparentrecord component.booleanisOpaque()static Transparencyof(boolean hasTransparent, boolean hasTranslucent) or(Transparency other) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
hasTransparent
private final boolean hasTransparentThe field for thehasTransparentrecord component. -
hasTranslucent
private final boolean hasTranslucentThe field for thehasTranslucentrecord component. -
NONE
-
TRANSPARENT
-
TRANSLUCENT
-
TRANSPARENT_AND_TRANSLUCENT
-
-
Constructor Details
-
Transparency
public Transparency(boolean hasTransparent, boolean hasTranslucent) Creates an instance of aTransparencyrecord class.- Parameters:
hasTransparent- the value for thehasTransparentrecord componenthasTranslucent- the value for thehasTranslucentrecord component
-
-
Method Details
-
of
-
or
-
isOpaque
public boolean isOpaque() -
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 with thecomparemethod from their corresponding wrapper classes. -
hasTransparent
public boolean hasTransparent()Returns the value of thehasTransparentrecord component.- Returns:
- the value of the
hasTransparentrecord component
-
hasTranslucent
public boolean hasTranslucent()Returns the value of thehasTranslucentrecord component.- Returns:
- the value of the
hasTranslucentrecord component
-