Record Class LootTable
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.world.data.loot.LootTable
- Record Components:
pools- The internal collection of configured loot pools dictating sequential evaluation phases.mergeStrategy- The targeted configuration strategy resolving potential overlap when mirroring vanilla namespace identities.vanillaId- The optional designated string identifier establishing native parity overrides.
public record LootTable(List<LootPool> pools, MergeStrategy mergeStrategy, String vanillaId)
extends Record
Represents a complete loot table capable of synthesizing item collections and intelligently
populating external containers using context-driven probability logic.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLootTable(List<LootPool> pools, MergeStrategy mergeStrategy, String vanillaId) Constructs a new LootTable incorporating probability pools and structural overrides. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidfill(org.bukkit.inventory.Inventory inventory, LootContext context) Generates and distributes physical loot dynamically across a target inventory, strictly adhering to mathematical slot availability thresholds.List<org.bukkit.inventory.ItemStack> generate(LootContext context) Evaluates probabilistic algorithms to materialize a discrete list of items.final inthashCode()Returns a hash code value for this object.Retrieves the conflict resolution strategy bridging procedural and structural overlaps.pools()Retrieves the internal collection of configured loot pools dictating sequential evaluation phases.final StringtoString()Returns a string representation of this record class.Retrieves the linked internal namespace key utilized by vanilla parity overlays.
-
Field Details
-
CODEC
-
-
Constructor Details
-
LootTable
Constructs a new LootTable incorporating probability pools and structural overrides.- Parameters:
pools- The collection of functional pools generating drops.mergeStrategy- The conflict resolution strategy mapped against vanilla identifiers.vanillaId- The targeted namespace mapping dictating override bounds.
-
-
Method Details
-
pools
-
generate
Evaluates probabilistic algorithms to materialize a discrete list of items.- Parameters:
context- The functional environment encompassing actors and mathematical modifiers.- Returns:
- A list of items synthesized across all constituent pools.
-
fill
Generates and distributes physical loot dynamically across a target inventory, strictly adhering to mathematical slot availability thresholds.- Parameters:
inventory- The operational inventory target receiving the synthesized payload.context- The functional environment governing generation variables.
-
mergeStrategy
Retrieves the conflict resolution strategy bridging procedural and structural overlaps.- Returns:
- The operational merge strategy configuration.
-
vanillaId
Retrieves the linked internal namespace key utilized by vanilla parity overlays.- Returns:
- The targeted string identifier, or null.
-
toString
-
hashCode
-
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).
-