Interface CompoundTagSetter<R>

    • Method Detail

      • put

        @NotNull
        R put​(@NotNull
              @NotNull String key,
              @NotNull
              @NotNull BinaryTag tag)
        Inserts a tag.
        Parameters:
        key - the key
        tag - the tag
        Returns:
        a compound tag
        Since:
        4.0.0
      • put

        @NotNull
        R put​(@NotNull
              @NotNull CompoundBinaryTag tag)
        Inserts the tags in tag, overwriting any that are in this.
        Parameters:
        tag - the tag
        Returns:
        a compound tag
        Since:
        4.6.0
      • put

        @NotNull
        R put​(@NotNull
              @NotNull Map<String,​? extends BinaryTag> tags)
        Inserts some tags.
        Parameters:
        tags - the tags
        Returns:
        a compound tag
        Since:
        4.4.0
      • remove

        @NotNull
        default R remove​(@NotNull
                         @NotNull String key)
        Removes a tag.
        Parameters:
        key - the key
        Returns:
        a compound tag
        Since:
        4.4.0
      • remove

        @NotNull
        R remove​(@NotNull
                 @NotNull String key,
                 @Nullable
                 @Nullable Consumer<? super BinaryTag> removed)
        Removes a tag.
        Parameters:
        key - the key
        removed - a consumer that accepts the removed tag
        Returns:
        a compound tag
        Since:
        4.4.0
      • putBoolean

        @NotNull
        default R putBoolean​(@NotNull
                             @NotNull String key,
                             boolean value)
        Inserts a boolean.

        Booleans are stored as a ByteBinaryTag with a value of 0 for false and 1 for true.

        Parameters:
        key - the key
        value - the value
        Returns:
        a compound tag
        Since:
        4.0.0
      • putByte

        @NotNull
        default R putByte​(@NotNull
                          @NotNull String key,
                          byte value)
        Inserts a byte.
        Parameters:
        key - the key
        value - the value
        Returns:
        a compound tag
        Since:
        4.0.0
      • putShort

        @NotNull
        default R putShort​(@NotNull
                           @NotNull String key,
                           short value)
        Inserts a short.
        Parameters:
        key - the key
        value - the value
        Returns:
        a compound tag
        Since:
        4.0.0
      • putInt

        @NotNull
        default R putInt​(@NotNull
                         @NotNull String key,
                         int value)
        Inserts an int.
        Parameters:
        key - the key
        value - the value
        Returns:
        a compound tag
        Since:
        4.0.0
      • putLong

        @NotNull
        default R putLong​(@NotNull
                          @NotNull String key,
                          long value)
        Inserts a long.
        Parameters:
        key - the key
        value - the value
        Returns:
        a compound tag
        Since:
        4.0.0
      • putFloat

        @NotNull
        default R putFloat​(@NotNull
                           @NotNull String key,
                           float value)
        Inserts a float.
        Parameters:
        key - the key
        value - the value
        Returns:
        a compound tag
        Since:
        4.0.0
      • putDouble

        @NotNull
        default R putDouble​(@NotNull
                            @NotNull String key,
                            double value)
        Inserts a double.
        Parameters:
        key - the key
        value - the value
        Returns:
        a compound tag
        Since:
        4.0.0
      • putByteArray

        @NotNull
        default R putByteArray​(@NotNull
                               @NotNull String key,
                               byte @NotNull [] value)
        Inserts an array of bytes.
        Parameters:
        key - the key
        value - the value
        Returns:
        a compound tag
        Since:
        4.0.0
      • putString

        @NotNull
        default R putString​(@NotNull
                            @NotNull String key,
                            @NotNull
                            @NotNull String value)
        Inserts a string.
        Parameters:
        key - the key
        value - the value
        Returns:
        a compound tag
        Since:
        4.0.0
      • putIntArray

        @NotNull
        default R putIntArray​(@NotNull
                              @NotNull String key,
                              int @NotNull [] value)
        Inserts an array of ints.
        Parameters:
        key - the key
        value - the value
        Returns:
        a compound tag
        Since:
        4.0.0
      • putLongArray

        @NotNull
        default R putLongArray​(@NotNull
                               @NotNull String key,
                               long @NotNull [] value)
        Inserts an array of longs.
        Parameters:
        key - the key
        value - the value
        Returns:
        a compound tag
        Since:
        4.0.0