Record Class LootPoolAddition
java.lang.Object
java.lang.Record
net.darkhax.bookshelf.common.api.data.loot.modifiers.LootPoolAddition
- Record Components:
id- A unique ID for the individual entry. This should be unique to each entry and is used to help identify and debug entry additions.entry- The entry to add to the pool.
public record LootPoolAddition(net.minecraft.resources.ResourceLocation id, net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer entry)
extends Record
Represents a loot pool entry that should be added to a loot pool.
-
Constructor Summary
ConstructorsConstructorDescriptionLootPoolAddition(net.minecraft.resources.ResourceLocation id, net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer entry) Creates an instance of aLootPoolAdditionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.storage.loot.entries.LootPoolEntryContainerentry()Returns the value of theentryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.ResourceLocationid()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LootPoolAddition
public LootPoolAddition(net.minecraft.resources.ResourceLocation id, net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer entry) Creates an instance of aLootPoolAdditionrecord class.
-
-
Method Details
-
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). -
id
public net.minecraft.resources.ResourceLocation id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
entry
public net.minecraft.world.level.storage.loot.entries.LootPoolEntryContainer entry()Returns the value of theentryrecord component.- Returns:
- the value of the
entryrecord component
-