Record Class ConstantLootNumberProvider
java.lang.Object
java.lang.Record
net.minecraft.loot.provider.number.ConstantLootNumberProvider
- Record Components:
value-
- All Implemented Interfaces:
LootContextAware,LootNumberProvider
- Mappings:
Namespace Name named net/minecraft/loot/provider/number/ConstantLootNumberProviderintermediary net/minecraft/class_44official evvnamed valueintermediary comp_1895official c
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ConstantLootNumberProvider> static final com.mojang.serialization.Codec<ConstantLootNumberProvider> private final floatThe field for thevaluerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionConstantLootNumberProvider(float value) Creates an instance of aConstantLootNumberProviderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConstantLootNumberProvidercreate(float value) booleanIndicates whether some other object is "equal to" this one.getType()inthashCode()Returns a hash code value for this object.floatnextFloat(LootContext context) final StringtoString()Returns a string representation of this record class.floatvalue()Returns the value of thevaluerecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.loot.context.LootContextAware
getRequiredParameters, validateMethods inherited from interface net.minecraft.loot.provider.number.LootNumberProvider
nextInt
-
Field Details
-
value
private final float valueThe field for thevaluerecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/loot/provider/number/ConstantLootNumberProvider;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_45886Lnet/minecraft/class_44;field_45886:Lcom/mojang/serialization/MapCodec;official aLevv;a:Lcom/mojang/serialization/MapCodec;
-
INLINE_CODEC
- Mappings:
Namespace Name Mixin selector named INLINE_CODECLnet/minecraft/loot/provider/number/ConstantLootNumberProvider;INLINE_CODEC:Lcom/mojang/serialization/Codec;intermediary field_45887Lnet/minecraft/class_44;field_45887:Lcom/mojang/serialization/Codec;official bLevv;b:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
ConstantLootNumberProvider
public ConstantLootNumberProvider(float value) Creates an instance of aConstantLootNumberProviderrecord class.- Parameters:
value- the value for thevaluerecord component
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceLootNumberProvider- Mappings:
Namespace Name Mixin selector named getTypeLnet/minecraft/loot/provider/number/LootNumberProvider;getType()Lnet/minecraft/loot/provider/number/LootNumberProviderType;intermediary method_365Lnet/minecraft/class_5658;method_365()Lnet/minecraft/class_5657;official bLevy;b()Levx;
-
nextFloat
- Specified by:
nextFloatin interfaceLootNumberProvider- Mappings:
Namespace Name Mixin selector named nextFloatLnet/minecraft/loot/provider/number/LootNumberProvider;nextFloat(Lnet/minecraft/loot/context/LootContext;)Fintermediary method_32454Lnet/minecraft/class_5658;method_32454(Lnet/minecraft/class_47;)Fofficial bLevy;b(Lerr;)F
-
create
- Mappings:
Namespace Name Mixin selector named createLnet/minecraft/loot/provider/number/ConstantLootNumberProvider;create(F)Lnet/minecraft/loot/provider/number/ConstantLootNumberProvider;intermediary method_32448Lnet/minecraft/class_44;method_32448(F)Lnet/minecraft/class_44;official aLevv;a(F)Levv;
-
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 with '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
value
public float value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-