Record Class InterpolatedKNumber
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.knumber.InterpolatedKNumber
- All Implemented Interfaces:
KNumber, CustomRegistryOwnTypeProvider<net.minecraft.network.RegistryFriendlyByteBuf, KNumber>, CustomRegistryValue<net.minecraft.network.RegistryFriendlyByteBuf, KNumber>, RefOptimizer<KNumber>, WithKey, WithRef<KNumber>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DynamicType<net.minecraft.network.RegistryFriendlyByteBuf, KNumber> Fields inherited from interface KNumber
CLOCK, CODEC, DATA_TYPE, ERROR_NOT_A_NUMBER, GAME_DAY, GAME_TIME, HALF, MAX_TICK, ONE, PREFIX_LIST, PROGRESS, REGISTRY, STREAM_CODEC, TICK, TWO, ZEROFields inherited from interface WithKey
COMPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.util.EasingTypeease()Returns the value of theeaserecord component.final booleanIndicates whether some other object is "equal to" this one.from()Returns the value of thefromrecord component.@Nullable Doubleget(KNumberContext ctx) final inthashCode()Returns a hash code value for this object.progress()Returns the value of theprogressrecord component.to()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.DynamicType<net.minecraft.network.RegistryFriendlyByteBuf, KNumber> type()Methods inherited from interface CustomRegistryValue
optionalKey, refMethods inherited from interface KNumber
getOr, getOrNaN, getRegistry, isStringLiteral, offset, scaleMethods inherited from interface RefOptimizer
optimize
-
Field Details
-
TYPE
-
-
Constructor Details
-
InterpolatedKNumber
public InterpolatedKNumber(Ref<KNumber> progress, net.minecraft.util.EasingType ease, Ref<KNumber> from, Ref<KNumber> to) Creates an instance of aInterpolatedKNumberrecord class.- Parameters:
progress- the value for theprogressrecord componentease- the value for theeaserecord componentfrom- the value for thefromrecord componentto- the value for thetorecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceCustomRegistryOwnTypeProvider<net.minecraft.network.RegistryFriendlyByteBuf, KNumber>
-
get
-
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). -
progress
-
ease
public net.minecraft.util.EasingType ease()Returns the value of theeaserecord component.- Returns:
- the value of the
easerecord component
-
from
-
to
-