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/EnchantmentLevelLootNumberProvider
intermediary net/minecraft/class_9753
official far
named amount
intermediary comp_2784
official b
-
Field Summary
Modifier and TypeFieldDescriptionprivate final EnchantmentLevelBasedValue
The field for theamount
record component.static final com.mojang.serialization.MapCodec
<EnchantmentLevelLootNumberProvider> -
Constructor Summary
ConstructorDescriptionEnchantmentLevelLootNumberProvider
(EnchantmentLevelBasedValue enchantmentLevelBasedValue) -
Method Summary
Modifier and TypeMethodDescriptionamount()
Returns the value of theamount
record component.create
(EnchantmentLevelBasedValue amount) final boolean
Indicates whether some other object is "equal to" this one.getType()
final int
hashCode()
Returns a hash code value for this object.float
nextFloat
(LootContext context) final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.loot.context.LootContextAware
getAllowedParameters, validate
Methods inherited from interface net.minecraft.loot.provider.number.LootNumberProvider
nextInt
-
Field Details
-
amount
The field for theamount
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/loot/provider/number/EnchantmentLevelLootNumberProvider;CODEC:Lcom/mojang/serialization/MapCodec;
intermediary field_51813
Lnet/minecraft/class_9753;field_51813:Lcom/mojang/serialization/MapCodec;
official a
Lfar;a:Lcom/mojang/serialization/MapCodec;
-
-
Constructor Details
-
EnchantmentLevelLootNumberProvider
-
-
Method Details
-
nextFloat
- Specified by:
nextFloat
in interfaceLootNumberProvider
- Mappings:
Namespace Name Mixin selector named nextFloat
Lnet/minecraft/loot/provider/number/LootNumberProvider;nextFloat(Lnet/minecraft/loot/context/LootContext;)F
intermediary method_32454
Lnet/minecraft/class_5658;method_32454(Lnet/minecraft/class_47;)F
official b
Lfat;b(Lewo;)F
-
getType
- Specified by:
getType
in interfaceLootNumberProvider
- Mappings:
Namespace Name Mixin selector named getType
Lnet/minecraft/loot/provider/number/LootNumberProvider;getType()Lnet/minecraft/loot/provider/number/LootNumberProviderType;
intermediary method_365
Lnet/minecraft/class_5658;method_365()Lnet/minecraft/class_5657;
official b
Lfat;b()Lfas;
-
create
- Mappings:
Namespace Name Mixin selector named create
Lnet/minecraft/loot/provider/number/EnchantmentLevelLootNumberProvider;create(Lnet/minecraft/enchantment/EnchantmentLevelBasedValue;)Lnet/minecraft/loot/provider/number/EnchantmentLevelLootNumberProvider;
intermediary method_60313
Lnet/minecraft/class_9753;method_60313(Lnet/minecraft/class_9704;)Lnet/minecraft/class_9753;
official a
Lfar;a(Ldef;)Lfar;
-
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 theamount
record component.- Returns:
- the value of the
amount
record component
-