Record Class EnchantmentLevelLootNumberProvider
java.lang.Object
java.lang.Record
net.minecraft.loot.provider.number.EnchantmentLevelLootNumberProvider
- Record Components:
amount-
- All Implemented Interfaces:
LootContextAware,LootNumberProvider
public record EnchantmentLevelLootNumberProvider(EnchantmentLevelBasedValue amount)
extends Record
implements LootNumberProvider
- Mappings:
Namespace Name named net/minecraft/loot/provider/number/EnchantmentLevelLootNumberProviderintermediary net/minecraft/class_9753official evwnamed amountintermediary comp_2784official b
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final EnchantmentLevelBasedValueThe field for theamountrecord component.static final com.mojang.serialization.MapCodec<EnchantmentLevelLootNumberProvider> -
Constructor Summary
ConstructorsConstructorDescriptionEnchantmentLevelLootNumberProvider(EnchantmentLevelBasedValue enchantmentLevelBasedValue) -
Method Summary
Modifier and TypeMethodDescriptionamount()Returns the value of theamountrecord component.create(EnchantmentLevelBasedValue amount) final booleanIndicates whether some other object is "equal to" this one.getType()final inthashCode()Returns a hash code value for this object.floatnextFloat(LootContext context) final StringtoString()Returns a string representation of this record class.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
-
amount
The field for theamountrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/loot/provider/number/EnchantmentLevelLootNumberProvider;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_51813Lnet/minecraft/class_9753;field_51813:Lcom/mojang/serialization/MapCodec;official aLevw;a:Lcom/mojang/serialization/MapCodec;
-
-
Constructor Details
-
EnchantmentLevelLootNumberProvider
-
-
Method Details
-
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
-
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;
-
create
- Mappings:
Namespace Name Mixin selector named createLnet/minecraft/loot/provider/number/EnchantmentLevelLootNumberProvider;create(Lnet/minecraft/enchantment/EnchantmentLevelBasedValue;)Lnet/minecraft/loot/provider/number/EnchantmentLevelLootNumberProvider;intermediary method_60313Lnet/minecraft/class_9753;method_60313(Lnet/minecraft/class_9704;)Lnet/minecraft/class_9753;official aLevw;a(Ldaj;)Levw;
-
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
amount
Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-