Class ExpandLootContextParams
java.lang.Object
com.blamejared.crafttweaker.natives.loot.param.ExpandLootContextParams
These are pre-registered params that are used by vanilla.
You can also create your own using getOrCreate
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.Entity> Gets the 'attacking_entity' param.static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.level.block.entity.BlockEntity> Gets the 'block_entity' param.static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.level.block.state.BlockState> Gets the 'block_state' param.static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.damagesource.DamageSource> Gets the 'damage_source' param.static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.Entity> Gets the 'direct_attacking_entity' param.static net.minecraft.world.level.storage.loot.parameters.LootContextParam<Float> Gets the 'explosion_radius' param.static <T> net.minecraft.world.level.storage.loot.parameters.LootContextParam<T> getOrCreate(net.minecraft.resources.ResourceLocation name, Class<T> tClass) Gets or creates a new parameter with the given name, using the given type.static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.player.Player> Gets the 'last_damage_player' parameter.static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.phys.Vec3> origin()Gets the 'origin' param.static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.Entity> Gets the 'this_entity' parameter.static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.item.ItemStack> tool()Gets the 'tool' param.
-
Constructor Details
-
ExpandLootContextParams
public ExpandLootContextParams()
-
-
Method Details
-
thisEntity
public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.Entity> thisEntity()Gets the 'this_entity' parameter.- Returns:
- The 'this_entity' parameter.
-
lastDamagePlayer
public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.player.Player> lastDamagePlayer()Gets the 'last_damage_player' parameter.- Returns:
- The 'last_damage_player' parameter.
-
damageSource
public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.damagesource.DamageSource> damageSource()Gets the 'damage_source' param.- Returns:
- The 'damage_source' param.
-
attackingEntity
public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.Entity> attackingEntity()Gets the 'attacking_entity' param.- Returns:
- The 'attacking_entity' param.
-
directAttackingEntity
public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.Entity> directAttackingEntity()Gets the 'direct_attacking_entity' param.- Returns:
- The 'direct_attacking_entity' param.
-
origin
public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.phys.Vec3> origin()Gets the 'origin' param.- Returns:
- The 'origin' param.
-
blockState
public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.level.block.state.BlockState> blockState()Gets the 'block_state' param.- Returns:
- The 'block_state' param.
-
blockEntity
public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.level.block.entity.BlockEntity> blockEntity()Gets the 'block_entity' param.- Returns:
- The 'block_entity' param.
-
tool
public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.item.ItemStack> tool()Gets the 'tool' param.- Returns:
- The 'tool' param.
-
explosionRadius
public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<Float> explosionRadius()Gets the 'explosion_radius' param.- Returns:
- The 'explosion_radius' param.
-
getOrCreate
public static <T> net.minecraft.world.level.storage.loot.parameters.LootContextParam<T> getOrCreate(net.minecraft.resources.ResourceLocation name, Class<T> tClass) Gets or creates a new parameter with the given name, using the given type.- Type Parameters:
T- The type that the parameter acts on.- Parameters:
name- The name of the parameter.- Returns:
- The parameter with the given name or a new parameter if there are no registered parameters with the name.
- DocParam:
- name "height"
-