LootContextParams .java

net.minecraft.world.level.storage.loot.parameters.LootContextParams (class): members: ADDITIONAL_COST_COMPONENT_ALLOWED, DIRECT_ATTACKING_ENTITY, ORIGIN.

net.minecraft.world.level.storage.loot.parametersclass32 linescommon2.1 KB

API Surface (0)

No public/protected methods detected (fields or constants only).

Fields & Constants (16)

THIS_ENTITY
INTERACTING_ENTITY
TARGET_ENTITY
LAST_DAMAGE_PLAYER
DAMAGE_SOURCE
ATTACKING_ENTITY
DIRECT_ATTACKING_ENTITY
ORIGIN
BLOCK_STATE
BLOCK_ENTITY
TOOL
EXPLOSION_RADIUS
ENCHANTMENT_LEVEL
ENCHANTMENT_ACTIVE
ADDITIONAL_COST_COMPONENT_ALLOWED
CONTAINER

String literals (16)

"this_entity"
"interacting_entity"
"target_entity"
"last_damage_player"
"damage_source"
"attacking_entity"
"direct_attacking_entity"
"origin"
"block_state"
"block_entity"
"tool"
"explosion_radius"
"enchantment_level"
"enchantment_active"
"additional_cost_component_allowed"
"container"

Full Source

LootContextParams.java32 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.storage.loot.parameters;
2
3
import net.minecraft.util.Unit;
4
import net.minecraft.util.context.ContextKey;
5
import net.minecraft.world.damagesource.DamageSource;
6
import net.minecraft.world.entity.Entity;
7
import net.minecraft.world.entity.SlotProvider;
8
import net.minecraft.world.entity.player.Player;
9
import net.minecraft.world.item.ItemInstance;
10
import net.minecraft.world.level.block.entity.BlockEntity;
11
import net.minecraft.world.level.block.state.BlockState;
12
import net.minecraft.world.phys.Vec3;
13
14
public class LootContextParams {
15
	public static final ContextKey<Entity> THIS_ENTITY = ContextKey.vanilla("this_entity");
16
	public static final ContextKey<Entity> INTERACTING_ENTITY = ContextKey.vanilla("interacting_entity");
17
	public static final ContextKey<Entity> TARGET_ENTITY = ContextKey.vanilla("target_entity");
18
	public static final ContextKey<Player> LAST_DAMAGE_PLAYER = ContextKey.vanilla("last_damage_player");
19
	public static final ContextKey<DamageSource> DAMAGE_SOURCE = ContextKey.vanilla("damage_source");
20
	public static final ContextKey<Entity> ATTACKING_ENTITY = ContextKey.vanilla("attacking_entity");
21
	public static final ContextKey<Entity> DIRECT_ATTACKING_ENTITY = ContextKey.vanilla("direct_attacking_entity");
22
	public static final ContextKey<Vec3> ORIGIN = ContextKey.vanilla("origin");
23
	public static final ContextKey<BlockState> BLOCK_STATE = ContextKey.vanilla("block_state");
24
	public static final ContextKey<BlockEntity> BLOCK_ENTITY = ContextKey.vanilla("block_entity");
25
	public static final ContextKey<ItemInstance> TOOL = ContextKey.vanilla("tool");
26
	public static final ContextKey<Float> EXPLOSION_RADIUS = ContextKey.vanilla("explosion_radius");
27
	public static final ContextKey<Integer> ENCHANTMENT_LEVEL = ContextKey.vanilla("enchantment_level");
28
	public static final ContextKey<Boolean> ENCHANTMENT_ACTIVE = ContextKey.vanilla("enchantment_active");
29
	public static final ContextKey<Unit> ADDITIONAL_COST_COMPONENT_ALLOWED = ContextKey.vanilla("additional_cost_component_allowed");
30
	public static final ContextKey<SlotProvider> CONTAINER = ContextKey.vanilla("container");
31
}
32

Decompiled Minecraft 26.3 source of LootContextParams (net/minecraft/world/level/storage/loot/parameters/LootContextParams.java) with Mojang official mappings, stored verbatim on the site.