Record Class FromFloat
java.lang.Object
java.lang.Record
net.minecraft.world.level.storage.loot.providers.number.ints.FromFloat
- All Implemented Interfaces:
ContextIntProvider, UnaryProvider<ContextFloatProvider>, Validatable
public record FromFloat(Holder<ContextFloatProvider> input)
extends Record
implements ContextIntProvider, 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<FromFloat> -
Constructor Summary
ConstructorsConstructorDescriptionFromFloat(Holder<ContextFloatProvider> input) Creates an instance of aFromFloatrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<FromFloat> codec()final booleanIndicates whether some other object is "equal to" this one.intgetIntUnsafe(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 ContextIntProvider
getIntMethods inherited from interface UnaryProvider
validate
-
Field Details
-
input
The field for theinputrecord component. -
MAP_CODEC
-
-
Constructor Details
-
FromFloat
Creates an instance of aFromFloatrecord class.- Parameters:
input- the value for theinputrecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceContextIntProvider
-
getIntUnsafe
- Specified by:
getIntUnsafein interfaceContextIntProvider
-
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
-