Package net.minecraft.world.entity
Record Class EquipmentTable
java.lang.Object
java.lang.Record
net.minecraft.world.entity.EquipmentTable
public record EquipmentTable(ResourceKey<LootTable> lootTable, Map<EquipmentSlot,Float> slotDropChances)
extends Record 
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<EquipmentTable> static final com.mojang.serialization.Codec<Map<EquipmentSlot, Float>> private final ResourceKey<LootTable> The field for thelootTablerecord component.private final Map<EquipmentSlot, Float> The field for theslotDropChancesrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionEquipmentTable(ResourceKey<LootTable> lootTable, Map<EquipmentSlot, Float> slotDropChances) Creates an instance of aEquipmentTablerecord class.
- 
Method SummaryModifier and TypeMethodDescriptionprivate static Map<EquipmentSlot, Float> createForAllSlots(float p_340946_) private static Map<EquipmentSlot, Float> createForAllSlots(List<EquipmentSlot> p_340910_, float p_341369_) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelootTablerecord component.Returns the value of theslotDropChancesrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
lootTableThe field for thelootTablerecord component.
- 
slotDropChancesThe field for theslotDropChancesrecord component.
- 
DROP_CHANCES_CODEC
- 
CODEC
 
- 
- 
Constructor Details- 
EquipmentTableCreates an instance of aEquipmentTablerecord class.- Parameters:
- lootTable- the value for the- lootTablerecord component
- slotDropChances- the value for the- slotDropChancesrecord component
 
 
- 
- 
Method Details- 
createForAllSlots
- 
createForAllSlotsprivate static Map<EquipmentSlot,Float> createForAllSlots(List<EquipmentSlot> p_340910_, float p_341369_) 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
lootTableReturns the value of thelootTablerecord component.- Returns:
- the value of the lootTablerecord component
 
- 
slotDropChancesReturns the value of theslotDropChancesrecord component.- Returns:
- the value of the slotDropChancesrecord component
 
 
-