Package net.minecraft.enchantment
Class EnchantmentLevelEntry
java.lang.Object
net.minecraft.util.collection.Weighting.Weight
net.minecraft.enchantment.EnchantmentLevelEntry
Represents an entry in an enchantments array, i.e. a pair between
enchantment and level. This is also a weighted entry and is available
for the weighted picker to pick from a list.
This is usually used where multiple enchantment to level mappings can
exist, such as in enchanting logic. In other cases, vanilla prefers
Map<Enchantment, Integer> over List<EnchantmentLevelEntry>.
This class is immutable. It does not override hashCode or equals.
- Mappings:
Namespace Name official aclintermediary net/minecraft/class_1134named net/minecraft/enchantment/EnchantmentLevelEntry
-
Field Summary
FieldsFields inherited from class net.minecraft.util.collection.Weighting.Weight
weight -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
enchantment
- Mappings:
Namespace Name Mixin selector official bLacl;b:Laci;intermediary field_4496Lnet/minecraft/class_1134;field_4496:Lnet/minecraft/class_1127;named enchantmentLnet/minecraft/enchantment/EnchantmentLevelEntry;enchantment:Lnet/minecraft/enchantment/Enchantment;
-
level
public final int level- Mappings:
Namespace Name Mixin selector official cLacl;c:Iintermediary field_4497Lnet/minecraft/class_1134;field_4497:Inamed levelLnet/minecraft/enchantment/EnchantmentLevelEntry;level:I
-
-
Constructor Details
-
EnchantmentLevelEntry
- Mappings:
Namespace Name Mixin selector official <init>Lacl;<init>(Laci;I)Vintermediary <init>Lnet/minecraft/class_1134;<init>(Lnet/minecraft/class_1127;I)Vnamed <init>Lnet/minecraft/enchantment/EnchantmentLevelEntry;<init>(Lnet/minecraft/enchantment/Enchantment;I)V
-