Record Class FlatColorGradient
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.gradient.FlatColorGradient
- All Implemented Interfaces:
Gradient, CustomRegistryOwnTypeProvider<io.netty.buffer.ByteBuf, Gradient>, CustomRegistryValue<io.netty.buffer.ByteBuf, Gradient>, RefOptimizer<Gradient>, WithKey, WithRef<Gradient>
-
Field Summary
FieldsFields inherited from interface WithKey
COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionFlatColorGradient(Color color) Creates an instance of aFlatColorGradientrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.get(float delta) final inthashCode()Returns a hash code value for this object.sample(net.minecraft.util.RandomSource random) final StringtoString()Returns a string representation of this record class.CustomRegistryType<io.netty.buffer.ByteBuf, Gradient> type()Methods inherited from interface CustomRegistryValue
optionalKey, refMethods inherited from interface Gradient
getRegistryMethods inherited from interface RefOptimizer
optimize
-
Field Details
-
TYPE
-
-
Constructor Details
-
FlatColorGradient
Creates an instance of aFlatColorGradientrecord class.- Parameters:
color- the value for thecolorrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceCustomRegistryOwnTypeProvider<io.netty.buffer.ByteBuf, Gradient>
-
get
-
sample
-
getPositionedColors
- Specified by:
getPositionedColorsin interfaceGradient
-
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 withObjects::equals(Object,Object). -
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-