Package net.minecraft.nbt
Class NBTDynamicOps
- java.lang.Object
-
- net.minecraft.nbt.NBTDynamicOps
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
NBTDynamicOps.NBTRecordBuilder
-
Field Summary
Fields Modifier and Type Field Description static NBTDynamicOps
INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description protected
NBTDynamicOps()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <U> U
convertTo(com.mojang.serialization.DynamicOps<U> p_convertTo_1_, INBT p_convertTo_2_)
INBT
createBoolean(boolean p_createBoolean_1_)
INBT
createByte(byte p_createByte_1_)
INBT
createByteList(java.nio.ByteBuffer p_createByteList_1_)
INBT
createDouble(double p_createDouble_1_)
INBT
createFloat(float p_createFloat_1_)
private static CollectionNBT<?>
createGenericList(byte p_240602_0_, byte p_240602_1_)
INBT
createInt(int p_createInt_1_)
INBT
createIntList(java.util.stream.IntStream p_createIntList_1_)
INBT
createList(java.util.stream.Stream<INBT> p_createList_1_)
INBT
createLong(long p_createLong_1_)
INBT
createLongList(java.util.stream.LongStream p_createLongList_1_)
INBT
createMap(java.util.stream.Stream<com.mojang.datafixers.util.Pair<INBT,INBT>> p_createMap_1_)
INBT
createNumeric(java.lang.Number p_createNumeric_1_)
INBT
createShort(short p_createShort_1_)
INBT
createString(java.lang.String p_createString_1_)
INBT
empty()
private static <T extends INBT>
voidfillMany(CollectionNBT<T> p_240608_0_, INBT p_240608_1_, java.util.List<INBT> p_240608_2_)
private static <T extends INBT>
voidfillOne(CollectionNBT<T> p_240609_0_, INBT p_240609_1_, INBT p_240609_2_)
com.mojang.serialization.DataResult<java.nio.ByteBuffer>
getByteBuffer(INBT p_getByteBuffer_1_)
com.mojang.serialization.DataResult<java.util.stream.IntStream>
getIntStream(INBT p_getIntStream_1_)
com.mojang.serialization.DataResult<java.util.function.Consumer<java.util.function.Consumer<INBT>>>
getList(INBT p_getList_1_)
com.mojang.serialization.DataResult<java.util.stream.LongStream>
getLongStream(INBT p_getLongStream_1_)
com.mojang.serialization.DataResult<com.mojang.serialization.MapLike<INBT>>
getMap(INBT p_getMap_1_)
com.mojang.serialization.DataResult<java.util.function.Consumer<java.util.function.BiConsumer<INBT,INBT>>>
getMapEntries(INBT p_getMapEntries_1_)
com.mojang.serialization.DataResult<java.util.stream.Stream<com.mojang.datafixers.util.Pair<INBT,INBT>>>
getMapValues(INBT p_getMapValues_1_)
com.mojang.serialization.DataResult<java.lang.Number>
getNumberValue(INBT p_getNumberValue_1_)
com.mojang.serialization.DataResult<java.util.stream.Stream<INBT>>
getStream(INBT p_getStream_1_)
com.mojang.serialization.DataResult<java.lang.String>
getStringValue(INBT p_getStringValue_1_)
com.mojang.serialization.RecordBuilder<INBT>
mapBuilder()
com.mojang.serialization.DataResult<INBT>
mergeToList(INBT p_mergeToList_1_, java.util.List<INBT> p_mergeToList_2_)
com.mojang.serialization.DataResult<INBT>
mergeToList(INBT p_mergeToList_1_, INBT p_mergeToList_2_)
com.mojang.serialization.DataResult<INBT>
mergeToMap(INBT p_mergeToMap_1_, com.mojang.serialization.MapLike<INBT> p_mergeToMap_2_)
com.mojang.serialization.DataResult<INBT>
mergeToMap(INBT p_mergeToMap_1_, INBT p_mergeToMap_2_, INBT p_mergeToMap_3_)
INBT
remove(INBT p_remove_1_, java.lang.String p_remove_2_)
java.lang.String
toString()
private static boolean
typesMatch(byte p_240603_0_, byte p_240603_1_, byte p_240603_2_)
-
-
-
Field Detail
-
INSTANCE
public static final NBTDynamicOps INSTANCE
-
-
Method Detail
-
empty
public INBT empty()
- Specified by:
empty
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
convertTo
public <U> U convertTo(com.mojang.serialization.DynamicOps<U> p_convertTo_1_, INBT p_convertTo_2_)
- Specified by:
convertTo
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
getNumberValue
public com.mojang.serialization.DataResult<java.lang.Number> getNumberValue(INBT p_getNumberValue_1_)
- Specified by:
getNumberValue
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createNumeric
public INBT createNumeric(java.lang.Number p_createNumeric_1_)
- Specified by:
createNumeric
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createByte
public INBT createByte(byte p_createByte_1_)
- Specified by:
createByte
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createShort
public INBT createShort(short p_createShort_1_)
- Specified by:
createShort
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createInt
public INBT createInt(int p_createInt_1_)
- Specified by:
createInt
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createLong
public INBT createLong(long p_createLong_1_)
- Specified by:
createLong
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createFloat
public INBT createFloat(float p_createFloat_1_)
- Specified by:
createFloat
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createDouble
public INBT createDouble(double p_createDouble_1_)
- Specified by:
createDouble
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createBoolean
public INBT createBoolean(boolean p_createBoolean_1_)
- Specified by:
createBoolean
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
getStringValue
public com.mojang.serialization.DataResult<java.lang.String> getStringValue(INBT p_getStringValue_1_)
- Specified by:
getStringValue
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createString
public INBT createString(java.lang.String p_createString_1_)
- Specified by:
createString
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createGenericList
private static CollectionNBT<?> createGenericList(byte p_240602_0_, byte p_240602_1_)
-
typesMatch
private static boolean typesMatch(byte p_240603_0_, byte p_240603_1_, byte p_240603_2_)
-
fillOne
private static <T extends INBT> void fillOne(CollectionNBT<T> p_240609_0_, INBT p_240609_1_, INBT p_240609_2_)
-
fillMany
private static <T extends INBT> void fillMany(CollectionNBT<T> p_240608_0_, INBT p_240608_1_, java.util.List<INBT> p_240608_2_)
-
mergeToList
public com.mojang.serialization.DataResult<INBT> mergeToList(INBT p_mergeToList_1_, INBT p_mergeToList_2_)
- Specified by:
mergeToList
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
mergeToList
public com.mojang.serialization.DataResult<INBT> mergeToList(INBT p_mergeToList_1_, java.util.List<INBT> p_mergeToList_2_)
- Specified by:
mergeToList
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
mergeToMap
public com.mojang.serialization.DataResult<INBT> mergeToMap(INBT p_mergeToMap_1_, INBT p_mergeToMap_2_, INBT p_mergeToMap_3_)
- Specified by:
mergeToMap
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
mergeToMap
public com.mojang.serialization.DataResult<INBT> mergeToMap(INBT p_mergeToMap_1_, com.mojang.serialization.MapLike<INBT> p_mergeToMap_2_)
- Specified by:
mergeToMap
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
getMapValues
public com.mojang.serialization.DataResult<java.util.stream.Stream<com.mojang.datafixers.util.Pair<INBT,INBT>>> getMapValues(INBT p_getMapValues_1_)
- Specified by:
getMapValues
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
getMapEntries
public com.mojang.serialization.DataResult<java.util.function.Consumer<java.util.function.BiConsumer<INBT,INBT>>> getMapEntries(INBT p_getMapEntries_1_)
- Specified by:
getMapEntries
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
getMap
public com.mojang.serialization.DataResult<com.mojang.serialization.MapLike<INBT>> getMap(INBT p_getMap_1_)
- Specified by:
getMap
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createMap
public INBT createMap(java.util.stream.Stream<com.mojang.datafixers.util.Pair<INBT,INBT>> p_createMap_1_)
- Specified by:
createMap
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
getStream
public com.mojang.serialization.DataResult<java.util.stream.Stream<INBT>> getStream(INBT p_getStream_1_)
- Specified by:
getStream
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
getList
public com.mojang.serialization.DataResult<java.util.function.Consumer<java.util.function.Consumer<INBT>>> getList(INBT p_getList_1_)
- Specified by:
getList
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
getByteBuffer
public com.mojang.serialization.DataResult<java.nio.ByteBuffer> getByteBuffer(INBT p_getByteBuffer_1_)
- Specified by:
getByteBuffer
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createByteList
public INBT createByteList(java.nio.ByteBuffer p_createByteList_1_)
- Specified by:
createByteList
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
getIntStream
public com.mojang.serialization.DataResult<java.util.stream.IntStream> getIntStream(INBT p_getIntStream_1_)
- Specified by:
getIntStream
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createIntList
public INBT createIntList(java.util.stream.IntStream p_createIntList_1_)
- Specified by:
createIntList
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
getLongStream
public com.mojang.serialization.DataResult<java.util.stream.LongStream> getLongStream(INBT p_getLongStream_1_)
- Specified by:
getLongStream
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createLongList
public INBT createLongList(java.util.stream.LongStream p_createLongList_1_)
- Specified by:
createLongList
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
createList
public INBT createList(java.util.stream.Stream<INBT> p_createList_1_)
- Specified by:
createList
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
remove
public INBT remove(INBT p_remove_1_, java.lang.String p_remove_2_)
- Specified by:
remove
in interfacecom.mojang.serialization.DynamicOps<INBT>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-