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.param . LootContextParams;
These are pre-registered params that are used by vanilla. You can also create your own using getOrCreate
Gets the 'block_entity' param. Returns : The 'block_entity' param.
// LootContextParams.blockEntity() as LootContextParam<BlockEntity>;
LootContextParams . blockEntity();
Return Type:
LootContextParam <BlockEntity >
Gets the 'block_state' param. Returns : The 'block_state' param.
// LootContextParams.blockState() as LootContextParam<BlockState>;
LootContextParams . blockState();
Return Type:
LootContextParam <BlockState >
Gets the 'damage_source' param. Returns : The 'damage_source' param.
// LootContextParams.damageSource() as LootContextParam<DamageSource>;
LootContextParams . damageSource();
Return Type:
LootContextParam <DamageSource >
Gets the 'direct_killer_entity' param. Returns : The 'direct_killer_entity' param.
// LootContextParams.directKillerEntity() as LootContextParam<Entity>;
LootContextParams . directKillerEntity();
Return Type:
LootContextParam <Entity >
Gets the 'explosion_radius' param. Returns : The 'explosion_radius' param.
// LootContextParams.explosionRadius() as LootContextParam<Float>;
LootContextParams . explosionRadius();
Return Type:
LootContextParam <Float >
Gets or creates a new parameter with the given name, using the given type. Returns : The parameter with the given name or a new parameter if there are no registered parameters with the name.
// LootContextParams.getOrCreate<T>(name as ResourceLocation) as LootContextParam<T>;
LootContextParams . getOrCreate < T>( "height" );
Return Type:
LootContextParam <T >
Gets the 'killer_entity' param. Returns : The 'killer_entity' param.
// LootContextParams.killerEntity() as LootContextParam<Entity>;
LootContextParams . killerEntity();
Return Type:
LootContextParam <Entity >
Gets the 'last_damage_player' parameter. Returns : The 'last_damage_player' parameter.
// LootContextParams.lastDamagePlayer() as LootContextParam<Player>;
LootContextParams . lastDamagePlayer();
Return Type:
LootContextParam <Player >
Gets the 'origin' param. Returns : The 'origin' param.
// LootContextParams.origin() as LootContextParam<Vec3>;
LootContextParams . origin();
Return Type:
LootContextParam <Vec3 >
Gets the 'this_entity' parameter. Returns : The 'this_entity' parameter.
// LootContextParams.thisEntity() as LootContextParam<Entity>;
LootContextParams . thisEntity();
Return Type:
LootContextParam <Entity >
Gets the 'tool' param. Returns : The 'tool' param.
// LootContextParams.tool() as LootContextParam<ItemStack>;
LootContextParams . tool();
Return Type:
LootContextParam <ItemStack >