LootTableManager
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.loot.table.LootTableManager;
Description
Manager for loot tables. An instance of this manager can be obtained via the com.blamejared.crafttweaker.api.loot.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!
Members
getTable(name as ResourceLocation) as LootTable
Gets a table with the given name.
script.zs
If no table is registered with the name, an empty table will be returned.
Returns: The found table or an empty table if not found.
myLootTableManager.getTable(<resource:minecraft:gameplay/cat_morning_gift>);
Parameters:
Return Type:
LootTable
Getter
Gets the ids of all registered loot tables.script.zs
myLootTableManager.ids
Return Type:
Set<ResourceLocation>
ids() as Set<ResourceLocation>
Gets the ids of all registered loot tables.script.zs
Returns: The ids of all registered loot tables.
myLootTableManager.ids();
Return Type:
Set<ResourceLocation>