Record Class EquipmentTable

java.lang.Object
java.lang.Record
net.minecraft.entity.EquipmentTable
Record Components:
lootTable -
slotDropChances -

public record EquipmentTable(RegistryKey<LootTable> lootTable, Map<EquipmentSlot,Float> slotDropChances) extends Record
Mappings:
Namespace Name
named net/minecraft/entity/EquipmentTable
intermediary net/minecraft/class_9652
official bta
named lootTable
intermediary comp_2621
official c
named slotDropChances
intermediary comp_2622
official d
  • Field Details

    • lootTable

      private final RegistryKey<LootTable> lootTable
      The field for the lootTable record component.
    • slotDropChances

      private final Map<EquipmentSlot,Float> slotDropChances
      The field for the slotDropChances record component.
    • SLOT_DROP_CHANCES_CODEC

      public static final com.mojang.serialization.Codec<Map<EquipmentSlot,Float>> SLOT_DROP_CHANCES_CODEC
      Mappings:
      Namespace Name Mixin selector
      named SLOT_DROP_CHANCES_CODEC Lnet/minecraft/entity/EquipmentTable;SLOT_DROP_CHANCES_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_51374 Lnet/minecraft/class_9652;field_51374:Lcom/mojang/serialization/Codec;
      official a Lbta;a:Lcom/mojang/serialization/Codec;
    • CODEC

      public static final com.mojang.serialization.Codec<EquipmentTable> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/entity/EquipmentTable;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_51375 Lnet/minecraft/class_9652;field_51375:Lcom/mojang/serialization/Codec;
      official b Lbta;b:Lcom/mojang/serialization/Codec;
  • Constructor Details

  • Method Details

    • createSlotDropChances

      private static Map<EquipmentSlot,Float> createSlotDropChances(float dropChance)
      Mappings:
      Namespace Name Mixin selector
      named createSlotDropChances Lnet/minecraft/entity/EquipmentTable;createSlotDropChances(F)Ljava/util/Map;
      intermediary method_59658 Lnet/minecraft/class_9652;method_59658(F)Ljava/util/Map;
      official a Lbta;a(F)Ljava/util/Map;
    • createSlotDropChances

      private static Map<EquipmentSlot,Float> createSlotDropChances(List<EquipmentSlot> slots, float dropChance)
      Mappings:
      Namespace Name Mixin selector
      named createSlotDropChances Lnet/minecraft/entity/EquipmentTable;createSlotDropChances(Ljava/util/List;F)Ljava/util/Map;
      intermediary method_59661 Lnet/minecraft/class_9652;method_59661(Ljava/util/List;F)Ljava/util/Map;
      official a Lbta;a(Ljava/util/List;F)Ljava/util/Map;
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • lootTable

      public RegistryKey<LootTable> lootTable()
      Returns the value of the lootTable record component.
      Returns:
      the value of the lootTable record component
    • slotDropChances

      public Map<EquipmentSlot,Float> slotDropChances()
      Returns the value of the slotDropChances record component.
      Returns:
      the value of the slotDropChances record component