Class LootContextParamSet
java.lang.Object
net.minecraft.world.level.storage.loot.parameters.LootContextParamSet
A LootContextParamSet defines a set of required and optional
LootContextParam
s.
This is used to validate that conditions, functions and other LootContextUser
s only use those parameters that are present for the given loot table.- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Set
<LootContextParam<?>> private final Set
<LootContextParam<?>> -
Constructor Summary
ConstructorsConstructorDescriptionLootContextParamSet
(Set<LootContextParam<?>> pRequired, Set<LootContextParam<?>> pOptional) -
Method Summary
Modifier and TypeMethodDescriptionstatic LootContextParamSet.Builder
builder()
Set
<LootContextParam<?>> Set
<LootContextParam<?>> boolean
isAllowed
(LootContextParam<?> pParam) Whether the given parameter is allowed in this set.toString()
void
validateUser
(ProblemReporter pProblemReporter, LootContextUser pLootContextUser) void
validateUser
(ValidationContext pValidationContext, LootContextUser pLootContextUser) Validate that all parameters referenced by the given LootContextUser are present in this set.
-
Field Details
-
required
-
all
-
-
Constructor Details
-
LootContextParamSet
LootContextParamSet(Set<LootContextParam<?>> pRequired, Set<LootContextParam<?>> pOptional)
-
-
Method Details