Package net.minecraft.util
Record Class ColorRGBA
java.lang.Object
java.lang.Record
net.minecraft.util.ColorRGBA
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.private String
final int
hashCode()
Returns a hash code value for this object.int
rgba()
Returns the value of thergba
record component.toString()
Returns a string representation of this record class.
-
Field Details
-
rgba
private final int rgbaThe field for thergba
record component. -
CUSTOM_COLOR_PREFIX
- See Also:
-
CODEC
-
-
Constructor Details
-
ColorRGBA
public ColorRGBA(int rgba) Creates an instance of aColorRGBA
record class.- Parameters:
rgba
- the value for thergba
record component
-
-
Method Details
-
formatValue
-
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. All components in this record class are compared with '=='. -
rgba
public int rgba()Returns the value of thergba
record component.- Returns:
- the value of the
rgba
record component
-