Interface FabricLootPoolBuilder


@NonExtendable public interface FabricLootPoolBuilder
Convenience extensions to LootPool.Builder for adding pre-built objects or collections.

This interface is automatically injected to LootPool.Builder.

  • Method Details

    • with

      default LootPool.Builder with(LootPoolEntry entry)
      Adds an entry to this builder.
      Parameters:
      entry - the added loot entry
      Returns:
      this builder
    • with

      default LootPool.Builder with(Collection<? extends LootPoolEntry> entries)
      Adds entries to this builder.
      Parameters:
      entries - the added loot entries
      Returns:
      this builder
    • conditionally

      default LootPool.Builder conditionally(LootCondition condition)
      Adds a condition to this builder.
      Parameters:
      condition - the added condition
      Returns:
      this builder
    • conditionally

      default LootPool.Builder conditionally(Collection<? extends LootCondition> conditions)
      Adds conditions to this builder.
      Parameters:
      conditions - the added conditions
      Returns:
      this builder
    • apply

      default LootPool.Builder apply(LootFunction function)
      Applies a function to this builder.
      Parameters:
      function - the applied loot function
      Returns:
      this builder
    • apply

      default LootPool.Builder apply(Collection<? extends LootFunction> functions)
      Applies loot functions to this builder.
      Parameters:
      functions - the applied loot functions
      Returns:
      this builder
    • copyOf

      static LootPool.Builder copyOf(LootPool pool)
      Creates a builder copy of a loot pool.
      Parameters:
      pool - the loot pool
      Returns:
      the copied builder