Class LootContext.Builder

java.lang.Object
com.github.darksoulq.abyssallib.world.data.loot.LootContext.Builder
Enclosing class:
LootContext

public static class LootContext.Builder extends Object
Builder class for constructing LootContext instances.
  • Constructor Details

    • Builder

      public Builder(org.bukkit.Location location)
      Parameters:
      location - The world location.
  • Method Details

    • looter

      public LootContext.Builder looter(org.bukkit.entity.Entity looter)
      Parameters:
      looter - The entity collecting loot. @return This builder.
    • killer

      public LootContext.Builder killer(org.bukkit.entity.Entity killer)
      Parameters:
      killer - The attacker entity. @return This builder.
    • victim

      public LootContext.Builder victim(org.bukkit.entity.Entity victim)
      Parameters:
      victim - The slain entity. @return This builder.
    • tool

      public LootContext.Builder tool(org.bukkit.inventory.ItemStack tool)
      Parameters:
      tool - The tool stack. @return This builder.
    • luck

      public LootContext.Builder luck(float luck)
      Parameters:
      luck - Manual luck value. @return This builder.
    • random

      public LootContext.Builder random(Random random)
      Parameters:
      random - Custom random source. @return This builder.
    • build

      public LootContext build()
      Returns:
      A new LootContext instance.