Enum Class LootTableManager
- All Implemented Interfaces:
Serializable,Comparable<LootTableManager>,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionSet<net.minecraft.resources.ResourceLocation>getIds()Gets the ids of all registered loot tables.net.minecraft.world.level.storage.loot.LootTablegetTable(net.minecraft.resources.ResourceLocation name) Gets a table with the given name.static LootTableManagerReturns the enum constant of this class with the specified name.static LootTableManager[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
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
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 nameNullPointerException- 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
Gets the ids of all registered loot tables.- Returns:
- The ids of all registered loot tables.
-