Class TagValueInput
java.lang.Object
net.minecraft.world.level.storage.TagValueInput
- All Implemented Interfaces:
ValueInput,ValueInputExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classstatic final recordstatic final recordstatic final record(package private) static class(package private) static classstatic final recordstatic final recordstatic final recordNested classes/interfaces inherited from interface net.minecraft.world.level.storage.ValueInput
ValueInput.TypedInputList<T>, ValueInput.ValueInputList -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ValueInputContextHelperprivate final CompoundTagprivate final ProblemReporter -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTagValueInput(ProblemReporter problemReporter, ValueInputContextHelper context, CompoundTag input) -
Method Summary
Modifier and TypeMethodDescriptionchildOrEmpty(String key) childrenList(String key) static ValueInput.ValueInputListcreate(ProblemReporter problemReporter, HolderLookup.Provider lookup, List<CompoundTag> input) static ValueInputcreate(ProblemReporter problemReporter, HolderLookup.Provider lookup, CompoundTag input) booleangetBooleanOr(String key, boolean defaultValue) bytedoublegetDoubleOr(String key, double defaultValue) floatgetFloatOr(String key, float defaultValue) Optional<int[]> getIntArray(String key) intlongprivate NumericTaggetNumericTag(String key) private <T extends Tag>
TgetOptionalTypedTag(String key, TagType<T> type) intgetShortOr(String key, short defaultValue) getStringOr(String key, String defaultValue) keySet()Returns the top-level keys of this object.<T> Optional<ValueInput.TypedInputList<T>> <T> ValueInput.TypedInputList<T> listOrEmpty(String key, com.mojang.serialization.Codec<T> elementCodec) lookup()<T> Optional<T> read(com.mojang.serialization.MapCodec<T> codec) <T> Optional<T> private ValueInputwrapChild(String key, CompoundTag tag) (package private) static ValueInputwrapChild(ProblemReporter problemReporter, ValueInputContextHelper context, CompoundTag tag) private ValueInput.ValueInputListwrapList(String key, ValueInputContextHelper context, ListTag tag) private <T> ValueInput.TypedInputList<T> wrapTypedList(String key, ListTag tag, com.mojang.serialization.Codec<T> codec)
-
Field Details
-
problemReporter
-
context
-
input
-
-
Constructor Details
-
TagValueInput
private TagValueInput(ProblemReporter problemReporter, ValueInputContextHelper context, CompoundTag input)
-
-
Method Details
-
create
public static ValueInput create(ProblemReporter problemReporter, HolderLookup.Provider lookup, CompoundTag input) -
create
public static ValueInput.ValueInputList create(ProblemReporter problemReporter, HolderLookup.Provider lookup, List<CompoundTag> input) -
read
- Specified by:
readin interfaceValueInput
-
read
- Specified by:
readin interfaceValueInput
-
getOptionalTypedTag
-
getNumericTag
-
child
- Specified by:
childin interfaceValueInput
-
childOrEmpty
- Specified by:
childOrEmptyin interfaceValueInput
-
childrenList
- Specified by:
childrenListin interfaceValueInput
-
childrenListOrEmpty
- Specified by:
childrenListOrEmptyin interfaceValueInput
-
list
public <T> Optional<ValueInput.TypedInputList<T>> list(String key, com.mojang.serialization.Codec<T> elementCodec) - Specified by:
listin interfaceValueInput
-
listOrEmpty
public <T> ValueInput.TypedInputList<T> listOrEmpty(String key, com.mojang.serialization.Codec<T> elementCodec) - Specified by:
listOrEmptyin interfaceValueInput
-
getBooleanOr
- Specified by:
getBooleanOrin interfaceValueInput
-
getByteOr
- Specified by:
getByteOrin interfaceValueInput
-
getShortOr
- Specified by:
getShortOrin interfaceValueInput
-
getInt
- Specified by:
getIntin interfaceValueInput
-
getIntOr
- Specified by:
getIntOrin interfaceValueInput
-
getLongOr
- Specified by:
getLongOrin interfaceValueInput
-
getLong
- Specified by:
getLongin interfaceValueInput
-
getFloatOr
- Specified by:
getFloatOrin interfaceValueInput
-
getDoubleOr
- Specified by:
getDoubleOrin interfaceValueInput
-
getString
- Specified by:
getStringin interfaceValueInput
-
getStringOr
- Specified by:
getStringOrin interfaceValueInput
-
getIntArray
- Specified by:
getIntArrayin interfaceValueInput
-
lookup
- Specified by:
lookupin interfaceValueInput
-
keySet
Description copied from interface:ValueInputExtensionReturns the top-level keys of this object.- Specified by:
keySetin interfaceValueInputExtension- Returns:
- the top-level keys of this object
-
wrapChild
-
wrapChild
static ValueInput wrapChild(ProblemReporter problemReporter, ValueInputContextHelper context, CompoundTag tag) -
wrapList
private ValueInput.ValueInputList wrapList(String key, ValueInputContextHelper context, ListTag tag) -
wrapTypedList
private <T> ValueInput.TypedInputList<T> wrapTypedList(String key, ListTag tag, com.mojang.serialization.Codec<T> codec)
-