Class LootTable

java.lang.Object
com.github.darksoulq.abyssallib.world.data.loot.LootTable

public class LootTable extends Object
Represents a complete loot table capable of synthesizing item collections and intelligently populating external containers using context-driven probability logic.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Codec<LootTable>
    The codec managing the serialization conversion linking active memory representations to storage payloads.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LootTable(List<LootPool> pools, MergeStrategy mergeStrategy, String vanillaId)
    Constructs a new LootTable incorporating probability pools and structural overrides.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    fill(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>
    Evaluates probabilistic algorithms to materialize a discrete list of items.
    Retrieves the conflict resolution strategy bridging procedural and structural overlaps.
    Retrieves the linked internal namespace key utilized by vanilla parity overlays.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CODEC

      public static final Codec<LootTable> CODEC
      The codec managing the serialization conversion linking active memory representations to storage payloads.
  • Constructor Details

    • LootTable

      public LootTable(List<LootPool> pools, MergeStrategy mergeStrategy, @Nullable String vanillaId)
      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

    • generate

      public List<org.bukkit.inventory.ItemStack> generate(LootContext context)
      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

      public void fill(org.bukkit.inventory.Inventory inventory, LootContext context)
      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.
    • getMergeStrategy

      public MergeStrategy getMergeStrategy()
      Retrieves the conflict resolution strategy bridging procedural and structural overlaps.
      Returns:
      The operational merge strategy configuration.
    • getVanillaId

      @Nullable public String getVanillaId()
      Retrieves the linked internal namespace key utilized by vanilla parity overlays.
      Returns:
      The targeted string identifier, or null.