Interface DispatcherProvider<Value extends Validatable>
- All Superinterfaces:
Validatable
- All Known Implementing Classes:
NumberDispatcher, NumberDispatcher
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordDispatcherProvider.Case<Value extends Validatable>static interfaceDispatcherProvider.Factory<Value extends Validatable, Self extends DispatcherProvider<Value>> -
Method Summary
Modifier and TypeMethodDescriptioncases()static <Value extends Validatable, Self extends DispatcherProvider<Value>>
com.mojang.serialization.MapCodec<Self> mapCodec(com.mojang.serialization.Codec<Holder<Value>> valueCodec, Holder<Value> defaultCase, DispatcherProvider.Factory<Value, Self> factory) selectValue(LootContext context) default voidvalidate(ValidationContext context)
-
Method Details
-
mapCodec
static <Value extends Validatable, Self extends DispatcherProvider<Value>> com.mojang.serialization.MapCodec<Self> mapCodec(com.mojang.serialization.Codec<Holder<Value>> valueCodec, Holder<Value> defaultCase, DispatcherProvider.Factory<Value, Self> factory) -
selectValue
-
cases
List<DispatcherProvider.Case<Value>> cases() -
defaultValue
-
validate
- Specified by:
validatein interfaceValidatable
-