Record Class BedrockMolangColor
java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.appearance.BedrockMolangColor
- All Implemented Interfaces:
org.redlance.mocha.runtime.value.ObjectValue, org.redlance.mocha.runtime.value.Value
public record BedrockMolangColor(float r, float g, float b, float a)
extends Record
implements org.redlance.mocha.runtime.value.ObjectValue
Read-only RGBA query structure with native float32 channels.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.redlance.mocha.runtime.value.ObjectValue
org.redlance.mocha.runtime.value.ObjectValue.FloatFunction, org.redlance.mocha.runtime.value.ObjectValue.FloatFunction1, org.redlance.mocha.runtime.value.ObjectValue.FloatFunction2, org.redlance.mocha.runtime.value.ObjectValue.FloatFunction3 -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBedrockMolangColor(float r, float g, float b, float a) Creates an instance of aBedrockMolangColorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloata()Returns the value of thearecord component.floatb()Returns the value of thebrecord component.entries()final booleanIndicates whether some other object is "equal to" this one.static BedrockMolangColorfromArgb(int color) floatg()Returns the value of thegrecord component.org.redlance.mocha.runtime.value.ObjectPropertygetProperty(String name) final inthashCode()Returns a hash code value for this object.floatr()Returns the value of therrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface org.redlance.mocha.runtime.value.ObjectValue
get, set, setFunction, setFunction, setFunction, setFunctionMethods inherited from interface org.redlance.mocha.runtime.value.Value
getAsBoolean, getAsNumber, getAsString, isString
-
Field Details
-
ZERO
-
-
Constructor Details
-
BedrockMolangColor
public BedrockMolangColor(float r, float g, float b, float a) Creates an instance of aBedrockMolangColorrecord class.- Parameters:
r- the value for therrecord componentg- the value for thegrecord componentb- the value for thebrecord componenta- the value for thearecord component
-
-
Method Details
-
fromArgb
-
getProperty
- Specified by:
getPropertyin interfaceorg.redlance.mocha.runtime.value.ObjectValue
-
entries
-
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. -
r
public float r()Returns the value of therrecord component.- Returns:
- the value of the
rrecord component
-
g
public float g()Returns the value of thegrecord component.- Returns:
- the value of the
grecord component
-
b
public float b()Returns the value of thebrecord component.- Returns:
- the value of the
brecord component
-
a
public float a()Returns the value of thearecord component.- Returns:
- the value of the
arecord component
-