Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

LootContextParam

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.

script.zs
import crafttweaker.api.loot.param.LootContextParam;

Description

A loot context param is provided to a net.minecraft.world.level.storage.loot.LootContext allowing it to supply information to functions.

See net.minecraft.world.level.storage.loot.parameters.LootContextParams for a list of built-in params.

Members

Getter
Gets the name of this parameter.
script.zs
// LootContextParam<T>.name as ResourceLocation
myLootContextParam.name

Return Type: ResourceLocation

name() as ResourceLocation
Gets the name of this parameter.

Returns: The name of this parameter

script.zs
// LootContextParam<T>.name() as ResourceLocation;
myLootContextParam.name();

Return Type: ResourceLocation