Record Class Round
java.lang.Object
java.lang.Record
net.minecraft.world.level.storage.loot.providers.number.floats.Round
- All Implemented Interfaces:
ContextFloatProvider, UnaryProvider<ContextFloatProvider>, Validatable
public record Round(Holder<ContextFloatProvider> input)
extends Record
implements ContextFloatProvider, UnaryProvider<ContextFloatProvider>
-
Nested Class Summary
Nested classes/interfaces inherited from interface UnaryProvider
UnaryProvider.Factory<Value,Self> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Holder<ContextFloatProvider> The field for theinputrecord component.static final com.mojang.serialization.MapCodec<Round> -
Constructor Summary
ConstructorsConstructorDescriptionRound(Holder<ContextFloatProvider> input) Creates an instance of aRoundrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<Round> codec()final booleanIndicates whether some other object is "equal to" this one.floatgetFloatUnsafe(LootContext context) final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface ContextFloatProvider
getFloat, getFloatOrThrowMethods inherited from interface UnaryProvider
validate
-
Field Details
-
input
The field for theinputrecord component. -
MAP_CODEC
-
-
Constructor Details
-
Round
Creates an instance of aRoundrecord class.- Parameters:
input- the value for theinputrecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceContextFloatProvider
-
getFloatUnsafe
- Specified by:
getFloatUnsafein interfaceContextFloatProvider
-
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). -
input
Returns the value of theinputrecord component.- Specified by:
inputin interfaceUnaryProvider<ContextFloatProvider>- Returns:
- the value of the
inputrecord component
-