LootContextParamSets

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.LootContextParamSets;

Description

These are pre-registered param sets that are used by vanilla.

Members

static advancementEntity() as LootContextParamSet
Gets the 'advancement_entity' param set.
The 'advancement_entity' param set requires the following params:

  1. this_entity

  2. origin

Returns: The 'advancement_entity' param set.

script.zs
// LootContextParamSets.advancementEntity() as LootContextParamSet;
LootContextParamSets.advancementEntity();

Return Type: LootContextParamSet

static advancementLocation() as LootContextParamSet
Gets the 'advancement_entity' param set.
The 'advancement_entity' param set requires the following params:

  1. this_entity

  2. origin

Returns: The 'advancement_entity' param set.

script.zs
// LootContextParamSets.advancementLocation() as LootContextParamSet;
LootContextParamSets.advancementLocation();

Return Type: LootContextParamSet

static advancementReward() as LootContextParamSet
Gets the 'advancement_reward' param set.
The 'advancement_reward' param set requires the following params:

  1. this_entity

  2. origin

Returns: The 'advancement_reward' param set.

script.zs
// LootContextParamSets.advancementReward() as LootContextParamSet;
LootContextParamSets.advancementReward();

Return Type: LootContextParamSet

static allParams() as LootContextParamSet
Gets the 'generic' param set.
The 'generic' param set requires the following params:

  1. this_entity

  2. last_damage_player

  3. damage_source

  4. killer_entity

  5. direct_killer_entity

  6. origin

  7. block_state

  8. block_entity

  9. tool

  10. explosion_radius

Returns: The 'generic' param set.

script.zs
// LootContextParamSets.allParams() as LootContextParamSet;
LootContextParamSets.allParams();

Return Type: LootContextParamSet

static block() as LootContextParamSet
Gets the 'block' param set.
The 'block' param set requires the following params:

  1. block_state

  2. origin

  3. tool

The 'block' param set can optionally use:

  1. this_entity

  2. block_entity

  3. explosion_radius

Returns: The 'block' param set.

script.zs
// LootContextParamSets.block() as LootContextParamSet;
LootContextParamSets.block();

Return Type: LootContextParamSet

static chest() as LootContextParamSet
Gets the 'chest' param set.
The 'chest' param set requires the following params:

  1. origin

The 'chest' param set can optionally use:

  1. this_entity

Returns: The 'chest' param set.

script.zs
// LootContextParamSets.chest() as LootContextParamSet;
LootContextParamSets.chest();

Return Type: LootContextParamSet

static command() as LootContextParamSet
Gets the 'command' param set.
The 'command' param set requires the following params:

  1. origin

The 'command' param set can optionally use:

  1. this_entity

Returns: The 'command' param set.

script.zs
// LootContextParamSets.command() as LootContextParamSet;
LootContextParamSets.command();

Return Type: LootContextParamSet

static empty() as LootContextParamSet
Gets the 'empty' param set.

Returns: The 'empty' param set.

script.zs
// LootContextParamSets.empty() as LootContextParamSet;
LootContextParamSets.empty();

Return Type: LootContextParamSet

static entity() as LootContextParamSet
Gets the 'entity' param set.
The 'entity' param set requires the following params:

  1. this_entity

  2. origin

  3. damage_source

The 'entity' param set can optionally use:

  1. killer_entity

  2. direct_killer_entity

  3. last_damage_player

Returns: The 'entity' param set.

script.zs
// LootContextParamSets.entity() as LootContextParamSet;
LootContextParamSets.entity();

Return Type: LootContextParamSet

static fishing() as LootContextParamSet
Gets the 'fishing' param set.
The 'fishing' param set requires the following params:

  1. origin

  2. tool

The 'fishing' param set can optionally use:

  1. this_entity

Returns: The 'fishing' param set.

script.zs
// LootContextParamSets.fishing() as LootContextParamSet;
LootContextParamSets.fishing();

Return Type: LootContextParamSet

static get(name as ResourceLocation) as LootContextParamSet
Gets a param set from its name.

Will throw an exception if no param set is registered for the given name.

Returns: The found param set or an exception if not registered.

script.zs
// LootContextParamSets.get(name as ResourceLocation) as LootContextParamSet;
LootContextParamSets.get(myResourceLocation);

Parameters:

name Type: ResourceLocation - The name of the param.

Return Type: LootContextParamSet

static gift() as LootContextParamSet
Gets the 'gift' param set.
The 'gift' param set requires the following params:

  1. origin

  2. this_entity

Returns: The 'gift' param set.

script.zs
// LootContextParamSets.gift() as LootContextParamSet;
LootContextParamSets.gift();

Return Type: LootContextParamSet

static piglinBarter() as LootContextParamSet
Gets the 'barter' param set.
The 'barter' param set requires the following params:

  1. this_entity

Returns: The 'barter' param set.

script.zs
// LootContextParamSets.piglinBarter() as LootContextParamSet;
LootContextParamSets.piglinBarter();

Return Type: LootContextParamSet

static selector() as LootContextParamSet
Gets the 'selector' param set.
The 'selector' param set requires the following params:

  1. origin

  2. this_entity

Returns: The 'selector' param set.

script.zs
// LootContextParamSets.selector() as LootContextParamSet;
LootContextParamSets.selector();

Return Type: LootContextParamSet