Class LootParams
java.lang.Object
net.minecraft.world.level.storage.loot.LootParams
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map<ResourceLocation,
LootParams.DynamicDrop> private final ServerLevel
private final float
private final Map<LootContextParam<?>,
Object> -
Constructor Summary
ConstructorDescriptionLootParams
(ServerLevel p_287766_, Map<LootContextParam<?>, Object> p_287705_, Map<ResourceLocation, LootParams.DynamicDrop> p_287642_, float p_287671_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDynamicDrops
(ResourceLocation p_287768_, Consumer<ItemStack> p_287711_) getLevel()
float
getLuck()
<T> T
getOptionalParameter
(LootContextParam<T> p_287644_) <T> T
getParameter
(LootContextParam<T> p_287670_) <T> T
getParamOrNull
(LootContextParam<T> p_287769_) boolean
hasParam
(LootContextParam<?> p_287749_)
-
Field Details
-
level
-
params
-
dynamicDrops
-
luck
private final float luck
-
-
Constructor Details
-
LootParams
public LootParams(ServerLevel p_287766_, Map<LootContextParam<?>, Object> p_287705_, Map<ResourceLocation, LootParams.DynamicDrop> p_287642_, float p_287671_)
-
-
Method Details
-
getLevel
-
hasParam
-
getParameter
-
getOptionalParameter
-
getParamOrNull
-
addDynamicDrops
-
getLuck
public float getLuck()
-