Class TagValueOutput
java.lang.Object
net.minecraft.world.level.storage.TagValueOutput
- All Implemented Interfaces:
ValueOutput,ValueOutputExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final record(package private) static class(package private) static classNested classes/interfaces inherited from interface net.minecraft.world.level.storage.ValueOutput
ValueOutput.TypedOutputList<T>, ValueOutput.ValueOutputList -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.mojang.serialization.DynamicOps<Tag> private final CompoundTagprivate final ProblemReporter -
Constructor Summary
ConstructorsConstructorDescriptionTagValueOutput(ProblemReporter problemReporter, com.mojang.serialization.DynamicOps<Tag> ops, CompoundTag tag) -
Method Summary
Modifier and TypeMethodDescriptionchildrenList(String key) static TagValueOutputcreateWithContext(ProblemReporter problemReporter, HolderLookup.Provider lookup) static TagValueOutputcreateWithoutContext(ProblemReporter problemReporter) voidbooleanisEmpty()<T> ValueOutput.TypedOutputList<T> voidputBoolean(String key, boolean value) voidvoidvoidvoidvoidputIntArray(String key, int[] value) voidvoidvoidprivate ProblemReporterreporterForChild(String name) <T> voidstore(com.mojang.serialization.MapCodec<T> codec, T value) <T> voidvoidstore(CompoundTag tag) Store the elements of the giventagin the root level of this object, with the same keys as in thetag.<T> voidstoreNullable(String key, com.mojang.serialization.Codec<T> codec, T value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.common.extensions.ValueOutputExtension
putChild
-
Field Details
-
problemReporter
-
ops
-
output
-
-
Constructor Details
-
TagValueOutput
TagValueOutput(ProblemReporter problemReporter, com.mojang.serialization.DynamicOps<Tag> ops, CompoundTag tag)
-
-
Method Details
-
createWithContext
public static TagValueOutput createWithContext(ProblemReporter problemReporter, HolderLookup.Provider lookup) -
createWithoutContext
-
store
- Specified by:
storein interfaceValueOutput
-
storeNullable
public <T> void storeNullable(String key, com.mojang.serialization.Codec<T> codec, @Nullable T value) - Specified by:
storeNullablein interfaceValueOutput
-
store
public <T> void store(com.mojang.serialization.MapCodec<T> codec, T value) - Specified by:
storein interfaceValueOutput
-
store
Description copied from interface:ValueOutputExtensionStore the elements of the giventagin the root level of this object, with the same keys as in thetag.- Specified by:
storein interfaceValueOutputExtension- Parameters:
tag- the tag to store into this object
-
putBoolean
- Specified by:
putBooleanin interfaceValueOutput
-
putByte
- Specified by:
putBytein interfaceValueOutput
-
putShort
- Specified by:
putShortin interfaceValueOutput
-
putInt
- Specified by:
putIntin interfaceValueOutput
-
putLong
- Specified by:
putLongin interfaceValueOutput
-
putFloat
- Specified by:
putFloatin interfaceValueOutput
-
putDouble
- Specified by:
putDoublein interfaceValueOutput
-
putString
- Specified by:
putStringin interfaceValueOutput
-
putIntArray
- Specified by:
putIntArrayin interfaceValueOutput
-
reporterForChild
-
child
- Specified by:
childin interfaceValueOutput
-
childrenList
- Specified by:
childrenListin interfaceValueOutput
-
list
public <T> ValueOutput.TypedOutputList<T> list(String key, com.mojang.serialization.Codec<T> elementCodec) - Specified by:
listin interfaceValueOutput
-
discard
- Specified by:
discardin interfaceValueOutput
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceValueOutput
-
buildResult
-