Class LootContext.Builder
java.lang.Object
net.minecraft.world.level.storage.loot.LootContext.Builder
- Enclosing class:
- LootContext
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map<ResourceLocation,
LootContext.DynamicDrop> private final ServerLevel
private float
private final Map<LootContextParam<?>,
Object> private ResourceLocation
private RandomSource
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(LootContextParamSet p_78976_) getLevel()
<T> T
getOptionalParameter
(LootContextParam<T> p_78983_) <T> T
getParameter
(LootContextParam<T> p_78971_) withDynamicDrop
(ResourceLocation p_78980_, LootContext.DynamicDrop p_78981_) withLuck
(float p_78964_) withOptionalParameter
(LootContextParam<T> p_78985_, T p_78986_) withOptionalRandomSeed
(long p_78966_) withOptionalRandomSeed
(long p_230909_, RandomSource p_230910_) withParameter
(LootContextParam<T> p_78973_, T p_78974_) withRandom
(RandomSource p_230912_)
-
Field Details
-
level
-
params
-
dynamicDrops
-
random
-
luck
private float luck -
queriedLootTableId
-
-
Constructor Details
-
Builder
-
Builder
-
-
Method Details
-
withRandom
-
withOptionalRandomSeed
-
withOptionalRandomSeed
-
withLuck
-
withParameter
-
withOptionalParameter
public <T> LootContext.Builder withOptionalParameter(LootContextParam<T> p_78985_, @Nullable T p_78986_) -
withDynamicDrop
public LootContext.Builder withDynamicDrop(ResourceLocation p_78980_, LootContext.DynamicDrop p_78981_) -
getLevel
-
getParameter
-
getOptionalParameter
-
create
-