Class NBTDynamicOps

java.lang.Object
net.minecraft.nbt.NBTDynamicOps
All Implemented Interfaces:
com.mojang.serialization.DynamicOps<INBT>

public class NBTDynamicOps extends Object implements com.mojang.serialization.DynamicOps<INBT>
  • Field Details

  • Constructor Details

    • NBTDynamicOps

      protected NBTDynamicOps()
  • Method Details

    • empty

      public INBT empty()
      Specified by:
      empty in interface com.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 interface com.mojang.serialization.DynamicOps<INBT>
    • getNumberValue

      public com.mojang.serialization.DataResult<Number> getNumberValue(INBT p_getNumberValue_1_)
      Specified by:
      getNumberValue in interface com.mojang.serialization.DynamicOps<INBT>
    • createNumeric

      public INBT createNumeric(Number p_createNumeric_1_)
      Specified by:
      createNumeric in interface com.mojang.serialization.DynamicOps<INBT>
    • createByte

      public INBT createByte(byte p_createByte_1_)
      Specified by:
      createByte in interface com.mojang.serialization.DynamicOps<INBT>
    • createShort

      public INBT createShort(short p_createShort_1_)
      Specified by:
      createShort in interface com.mojang.serialization.DynamicOps<INBT>
    • createInt

      public INBT createInt(int p_createInt_1_)
      Specified by:
      createInt in interface com.mojang.serialization.DynamicOps<INBT>
    • createLong

      public INBT createLong(long p_createLong_1_)
      Specified by:
      createLong in interface com.mojang.serialization.DynamicOps<INBT>
    • createFloat

      public INBT createFloat(float p_createFloat_1_)
      Specified by:
      createFloat in interface com.mojang.serialization.DynamicOps<INBT>
    • createDouble

      public INBT createDouble(double p_createDouble_1_)
      Specified by:
      createDouble in interface com.mojang.serialization.DynamicOps<INBT>
    • createBoolean

      public INBT createBoolean(boolean p_createBoolean_1_)
      Specified by:
      createBoolean in interface com.mojang.serialization.DynamicOps<INBT>
    • getStringValue

      public com.mojang.serialization.DataResult<String> getStringValue(INBT p_getStringValue_1_)
      Specified by:
      getStringValue in interface com.mojang.serialization.DynamicOps<INBT>
    • createString

      public INBT createString(String p_createString_1_)
      Specified by:
      createString in interface com.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_, 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 interface com.mojang.serialization.DynamicOps<INBT>
    • mergeToList

      public com.mojang.serialization.DataResult<INBT> mergeToList(INBT p_mergeToList_1_, List<INBT> p_mergeToList_2_)
      Specified by:
      mergeToList in interface com.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 interface com.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 interface com.mojang.serialization.DynamicOps<INBT>
    • getMapValues

      public com.mojang.serialization.DataResult<Stream<com.mojang.datafixers.util.Pair<INBT,INBT>>> getMapValues(INBT p_getMapValues_1_)
      Specified by:
      getMapValues in interface com.mojang.serialization.DynamicOps<INBT>
    • getMapEntries

      public com.mojang.serialization.DataResult<Consumer<BiConsumer<INBT,INBT>>> getMapEntries(INBT p_getMapEntries_1_)
      Specified by:
      getMapEntries in interface com.mojang.serialization.DynamicOps<INBT>
    • getMap

      public com.mojang.serialization.DataResult<com.mojang.serialization.MapLike<INBT>> getMap(INBT p_getMap_1_)
      Specified by:
      getMap in interface com.mojang.serialization.DynamicOps<INBT>
    • createMap

      public INBT createMap(Stream<com.mojang.datafixers.util.Pair<INBT,INBT>> p_createMap_1_)
      Specified by:
      createMap in interface com.mojang.serialization.DynamicOps<INBT>
    • getStream

      public com.mojang.serialization.DataResult<Stream<INBT>> getStream(INBT p_getStream_1_)
      Specified by:
      getStream in interface com.mojang.serialization.DynamicOps<INBT>
    • getList

      public com.mojang.serialization.DataResult<Consumer<Consumer<INBT>>> getList(INBT p_getList_1_)
      Specified by:
      getList in interface com.mojang.serialization.DynamicOps<INBT>
    • getByteBuffer

      public com.mojang.serialization.DataResult<ByteBuffer> getByteBuffer(INBT p_getByteBuffer_1_)
      Specified by:
      getByteBuffer in interface com.mojang.serialization.DynamicOps<INBT>
    • createByteList

      public INBT createByteList(ByteBuffer p_createByteList_1_)
      Specified by:
      createByteList in interface com.mojang.serialization.DynamicOps<INBT>
    • getIntStream

      public com.mojang.serialization.DataResult<IntStream> getIntStream(INBT p_getIntStream_1_)
      Specified by:
      getIntStream in interface com.mojang.serialization.DynamicOps<INBT>
    • createIntList

      public INBT createIntList(IntStream p_createIntList_1_)
      Specified by:
      createIntList in interface com.mojang.serialization.DynamicOps<INBT>
    • getLongStream

      public com.mojang.serialization.DataResult<LongStream> getLongStream(INBT p_getLongStream_1_)
      Specified by:
      getLongStream in interface com.mojang.serialization.DynamicOps<INBT>
    • createLongList

      public INBT createLongList(LongStream p_createLongList_1_)
      Specified by:
      createLongList in interface com.mojang.serialization.DynamicOps<INBT>
    • createList

      public INBT createList(Stream<INBT> p_createList_1_)
      Specified by:
      createList in interface com.mojang.serialization.DynamicOps<INBT>
    • remove

      public INBT remove(INBT p_remove_1_, String p_remove_2_)
      Specified by:
      remove in interface com.mojang.serialization.DynamicOps<INBT>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • mapBuilder

      public com.mojang.serialization.RecordBuilder<INBT> mapBuilder()
      Specified by:
      mapBuilder in interface com.mojang.serialization.DynamicOps<INBT>