Class LootParams
java.lang.Object
net.minecraft.world.level.storage.loot.LootParams
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<ResourceLocation, LootParams.DynamicDrop> private final ServerLevelprivate final floatprivate final Map<LootContextParam<?>, Object> -
Constructor Summary
ConstructorsConstructorDescriptionLootParams(ServerLevel p_287766_, Map<LootContextParam<?>, Object> p_287705_, Map<ResourceLocation, LootParams.DynamicDrop> p_287642_, float p_287671_) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDynamicDrops(ResourceLocation p_287768_, Consumer<ItemStack> p_287711_) getLevel()floatgetLuck()<T> TgetOptionalParameter(LootContextParam<T> p_287644_) <T> TgetParameter(LootContextParam<T> p_287670_) <T> TgetParamOrNull(LootContextParam<T> p_287769_) booleanhasParam(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()
-