Record Class ColorModifier.BlendToGray
java.lang.Object
java.lang.Record
net.minecraft.world.attribute.modifier.ColorModifier.BlendToGray
- Enclosing interface:
ColorModifier<Argument>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for thebrightnessrecord component.static final com.mojang.serialization.Codec<ColorModifier.BlendToGray> private final floatThe field for thefactorrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionBlendToGray(float brightness, float factor) Creates an instance of aBlendToGrayrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of thebrightnessrecord component.final booleanIndicates whether some other object is "equal to" this one.floatfactor()Returns the value of thefactorrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
brightness
private final float brightnessThe field for thebrightnessrecord component. -
factor
private final float factorThe field for thefactorrecord component. -
CODEC
-
-
Constructor Details
-
BlendToGray
public BlendToGray(float brightness, float factor) Creates an instance of aBlendToGrayrecord class.- Parameters:
brightness- the value for thebrightnessrecord componentfactor- the value for thefactorrecord component
-
-
Method Details
-
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 '=='. -
brightness
public float brightness()Returns the value of thebrightnessrecord component.- Returns:
- the value of the
brightnessrecord component
-
factor
public float factor()Returns the value of thefactorrecord component.- Returns:
- the value of the
factorrecord component
-