Package com.mojang.datafixers
Interface DSL
public interface DSL
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
static interface
-
Method Summary
Modifier and TypeMethodDescriptionstatic TypeTemplate
allWithRemainder
(TypeTemplate first, TypeTemplate... rest) static TypeTemplate
and
(TypeTemplate first, TypeTemplate second) static TypeTemplate
and
(TypeTemplate first, TypeTemplate... rest) bool()
byteType()
static TypeTemplate
check
(String name, int index, TypeTemplate element) static TypeTemplate
compoundList
(TypeTemplate element) static TypeTemplate
compoundList
(TypeTemplate key, TypeTemplate element) static <K,
V> CompoundList.CompoundListType<K, V> compoundList
(Type<K> key, Type<V> value) static <V> CompoundList.CompoundListType<String,
V> compoundList
(Type<V> value) static TypeTemplate
static TypeTemplate
static TypeTemplate
field
(String name, TypeTemplate element) static <A> Tag.TagType<A>
static <FT> OpticFinder<FT>
fieldFinder
(String name, Type<FT> type) static TypeTemplate
fields
(String name1, TypeTemplate element1) static TypeTemplate
fields
(String name, TypeTemplate element, TypeTemplate rest) static TypeTemplate
fields
(String name1, TypeTemplate element1, String name2, TypeTemplate element2) static TypeTemplate
fields
(String name1, TypeTemplate element1, String name2, TypeTemplate element2, TypeTemplate rest) static TypeTemplate
fields
(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3) static TypeTemplate
fields
(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3, TypeTemplate rest) static TypeTemplate
hook
(TypeTemplate template, Hook.HookFunction preRead, Hook.HookFunction postWrite) static <A> Type<A>
hook
(Type<A> type, Hook.HookFunction preRead, Hook.HookFunction postWrite) static TypeTemplate
id
(int index) intType()
static TypeTemplate
list
(TypeTemplate element) static <A> List.ListType<A>
longType()
static TypeTemplate
named
(String name, TypeTemplate element) static <FT> OpticFinder<FT>
namedChoice
(String name, Type<FT> type) static TypeTemplate
optional
(TypeTemplate value) static TypeTemplate
optionalFields
(String name, TypeTemplate element) static TypeTemplate
optionalFields
(String name, TypeTemplate element, TypeTemplate rest) static TypeTemplate
optionalFields
(String name1, TypeTemplate element1, String name2, TypeTemplate element2) static TypeTemplate
optionalFields
(String name1, TypeTemplate element1, String name2, TypeTemplate element2, TypeTemplate rest) static TypeTemplate
optionalFields
(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3) static TypeTemplate
optionalFields
(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3, TypeTemplate rest) static TypeTemplate
optionalFields
(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3, String name4, TypeTemplate element4) static TypeTemplate
optionalFields
(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3, String name4, TypeTemplate element4, TypeTemplate rest) static TypeTemplate
optionalFields
(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3, String name4, TypeTemplate element4, String name5, TypeTemplate element5) static TypeTemplate
optionalFields
(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3, String name4, TypeTemplate element4, String name5, TypeTemplate element5, TypeTemplate rest) static TypeTemplate
or
(TypeTemplate left, TypeTemplate right) static TypeTemplate
static OpticFinder<Dynamic<?>>
string()
static <K> TaggedChoice<K>
taggedChoice
(String name, Type<K> keyType, Map<K, TypeTemplate> templates) static <K> TaggedChoice<K>
taggedChoiceLazy
(String name, Type<K> keyType, Map<K, Supplier<TypeTemplate>> templates) taggedChoiceType
(String name, Type<K> keyType, Map<K, ? extends Type<?>> types) static <FT> OpticFinder<FT>
typeFinder
(Type<FT> type) static Unit
unit()
-
Method Details
-
bool
-
intType
-
longType
-
byteType
-
shortType
-
floatType
-
doubleType
-
string
-
emptyPart
-
emptyPartType
-
remainder
-
remainderType
-
check
-
compoundList
-
compoundList
-
compoundList
-
compoundList
-
constType
-
hook
static TypeTemplate hook(TypeTemplate template, Hook.HookFunction preRead, Hook.HookFunction postWrite) -
hook
-
list
-
list
-
named
-
named
-
and
-
and
-
allWithRemainder
-
and
-
and
-
and
-
id
-
or
-
or
-
field
-
field
-
taggedChoice
static <K> TaggedChoice<K> taggedChoice(String name, Type<K> keyType, Map<K, TypeTemplate> templates) -
taggedChoiceLazy
static <K> TaggedChoice<K> taggedChoiceLazy(String name, Type<K> keyType, Map<K, Supplier<TypeTemplate>> templates) -
taggedChoiceType
-
func
-
optional
-
optional
-
fields
-
fields
static TypeTemplate fields(String name1, TypeTemplate element1, String name2, TypeTemplate element2) -
fields
static TypeTemplate fields(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3) -
fields
-
fields
static TypeTemplate fields(String name1, TypeTemplate element1, String name2, TypeTemplate element2, TypeTemplate rest) -
fields
static TypeTemplate fields(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3, TypeTemplate rest) -
optionalFields
-
optionalFields
static TypeTemplate optionalFields(String name1, TypeTemplate element1, String name2, TypeTemplate element2) -
optionalFields
static TypeTemplate optionalFields(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3) -
optionalFields
static TypeTemplate optionalFields(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3, String name4, TypeTemplate element4) -
optionalFields
static TypeTemplate optionalFields(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3, String name4, TypeTemplate element4, String name5, TypeTemplate element5) -
optionalFields
-
optionalFields
static TypeTemplate optionalFields(String name1, TypeTemplate element1, String name2, TypeTemplate element2, TypeTemplate rest) -
optionalFields
static TypeTemplate optionalFields(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3, TypeTemplate rest) -
optionalFields
static TypeTemplate optionalFields(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3, String name4, TypeTemplate element4, TypeTemplate rest) -
optionalFields
static TypeTemplate optionalFields(String name1, TypeTemplate element1, String name2, TypeTemplate element2, String name3, TypeTemplate element3, String name4, TypeTemplate element4, String name5, TypeTemplate element5, TypeTemplate rest) -
remainderFinder
-
typeFinder
-
fieldFinder
-
namedChoice
-
unit
-