Record Class ClientGradient
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.gradient.ClientGradient
- All Implemented Interfaces:
Gradient, CustomRegistryOwnTypeProvider<io.netty.buffer.ByteBuf, Gradient>, CustomRegistryValue<io.netty.buffer.ByteBuf, Gradient>, RefOptimizer<Gradient>, WithKey, WithRef<Gradient>
public record ClientGradient(ClientGradient.ClientGradientRef gradient)
extends Record
implements Gradient
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface Gradient
BLACK, CODEC, DATA_TYPE, EMPTY, REGISTRY, STREAM_CODEC, WHITEFields inherited from interface WithKey
COMPARATOR -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aClientGradientrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.get(float delta) gradient()Returns the value of thegradientrecord component.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.DynamicType<io.netty.buffer.ByteBuf, Gradient> type()static voidupdateRefs(Map<net.minecraft.resources.Identifier, Gradient> map) Methods inherited from interface CustomRegistryValue
optionalKey, refMethods inherited from interface Gradient
getRegistryMethods inherited from interface RefOptimizer
optimize
-
Field Details
-
TYPE
-
-
Constructor Details
-
ClientGradient
Creates an instance of aClientGradientrecord class.- Parameters:
gradient- the value for thegradientrecord component
-
-
Method Details
-
updateRefs
-
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). -
gradient
Returns the value of thegradientrecord component.- Returns:
- the value of the
gradientrecord component
-