Enum Class LootTableManager

java.lang.Object
java.lang.Enum<LootTableManager>
com.blamejared.crafttweaker.api.loot.table.LootTableManager
All Implemented Interfaces:
Serializable, Comparable<LootTableManager>, Constable

@ZenRegister public enum LootTableManager extends Enum<LootTableManager>
Manager for loot tables.

An instance of this manager can be obtained via the LootManager.

These methods can only be called from the server side, so ensure that all calls are inside a level.isClientSide check or a #onlyIf side server preprocessor!

DocParam:
this loot.tables
  • Enum Constant Details

  • Method Details

    • values

      public static LootTableManager[] 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 LootTableManager 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
    • getTable

      public net.minecraft.world.level.storage.loot.LootTable getTable(net.minecraft.resources.ResourceLocation name)
      Gets a table with the given name.

      If no table is registered with the name, an empty table will be returned.

      Parameters:
      name - The name of the table to get.
      Returns:
      The found table or an empty table if not found.
      DocParam:
      name <resource:minecraft:gameplay/cat_morning_gift>
    • getIds

      public Set<net.minecraft.resources.ResourceLocation> getIds()
      Gets the ids of all registered loot tables.
      Returns:
      The ids of all registered loot tables.