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 level, Map<LootContextParam<?>, Object> params, Map<ResourceLocation, LootParams.DynamicDrop> dynamicDrops, float luck) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDynamicDrops(ResourceLocation location, Consumer<ItemStack> consumer) getLevel()floatgetLuck()<T> TgetOptionalParameter(LootContextParam<T> param) <T> TgetParameter(LootContextParam<T> param) <T> TgetParamOrNull(LootContextParam<T> param) booleanhasParam(LootContextParam<?> param)
-
Field Details
-
level
-
params
-
dynamicDrops
-
luck
private final float luck
-
-
Constructor Details
-
LootParams
public LootParams(ServerLevel level, Map<LootContextParam<?>, Object> params, Map<ResourceLocation, LootParams.DynamicDrop> dynamicDrops, float luck)
-
-
Method Details
-
getLevel
-
hasParam
-
getParameter
-
getOptionalParameter
-
getParamOrNull
-
addDynamicDrops
-
getLuck
public float getLuck()
-