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