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