Enum Class LootTableSource

java.lang.Object
java.lang.Enum<LootTableSource>
net.fabricmc.fabric.api.loot.v2.LootTableSource
All Implemented Interfaces:
Serializable, Comparable<LootTableSource>, Constable

public enum LootTableSource extends Enum<LootTableSource>
Describes where a loot table has been loaded from.
  • Enum Constant Details

    • VANILLA

      public static final LootTableSource VANILLA
      A loot table loaded from the default data pack.
    • MOD

      public static final LootTableSource MOD
      A loot table loaded from mods' bundled resources.

      This includes the additional builtin data packs registered by mods with Fabric Resource Loader.

    • DATA_PACK

      public static final LootTableSource DATA_PACK
      A loot table loaded from an external data pack.
    • REPLACED

      public static final LootTableSource REPLACED
      A loot table created in LootTableEvents.REPLACE.
  • Method Details

    • values

      public static LootTableSource[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LootTableSource valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isBuiltin

      public boolean isBuiltin()
      Returns whether this loot table source is builtin and bundled in the vanilla or mod resources.

      VANILLA and MOD are builtin.

      Returns:
      true if builtin, false otherwise