Class LootParams.Builder
java.lang.Object
net.minecraft.world.level.storage.loot.LootParams.Builder
- Enclosing class:
LootParams
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<ResourceLocation, LootParams.DynamicDrop> private final ServerLevel
private float
private final Map
<LootContextParam<?>, Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate
(LootContextParamSet pParams) getLevel()
<T> T
getOptionalParameter
(LootContextParam<T> pParameter) <T> T
getParameter
(LootContextParam<T> pParameter) withDynamicDrop
(ResourceLocation pName, LootParams.DynamicDrop pDynamicDrop) withLuck
(float pLuck) withOptionalParameter
(LootContextParam<T> pParameter, T pValue) withParameter
(LootContextParam<T> pParameter, T pValue)
-
Field Details
-
level
-
params
-
dynamicDrops
-
luck
private float luck
-
-
Constructor Details
-
Builder
-
-
Method Details
-
getLevel
-
withParameter
-
withOptionalParameter
public <T> LootParams.Builder withOptionalParameter(LootContextParam<T> pParameter, @Nullable T pValue) -
getParameter
-
getOptionalParameter
-
withDynamicDrop
public LootParams.Builder withDynamicDrop(ResourceLocation pName, LootParams.DynamicDrop pDynamicDrop) -
withLuck
-
create
-