Package net.benwoodworth.knbt

Types

CompositeNbtDecoder
Link copied to clipboard
common
interface CompositeNbtDecoder : CompositeDecoder
CompositeNbtEncoder
Link copied to clipboard
common
interface CompositeNbtEncoder : CompositeEncoder
Nbt
Link copied to clipboard
common
sealed class Nbt : NbtFormat, BinaryFormat
NbtBuilder
Link copied to clipboard
common
class NbtBuilder
Builder of the Nbt instance provided by Nbt { ... } factory function.
NbtByte
Link copied to clipboard
common
value class NbtByte(value: Byte) : NbtTag
NbtByteArray
Link copied to clipboard
common
class NbtByteArray : NbtTag, List<Byte>
NbtCompound
Link copied to clipboard
common
class NbtCompound(content: Map<String, NbtTag>) : NbtTag, Map<String, NbtTag>
NbtCompoundBuilder
Link copied to clipboard
common
class NbtCompoundBuilder
NbtCompression
Link copied to clipboard
common
abstract class NbtCompression
NbtConfiguration
Link copied to clipboard
common
class NbtConfiguration : NbtFormatConfiguration
NbtDecoder
Link copied to clipboard
common
interface NbtDecoder : Decoder
NbtDouble
Link copied to clipboard
common
value class NbtDouble(value: Double) : NbtTag
NbtEncoder
Link copied to clipboard
common
interface NbtEncoder : Encoder
NbtFloat
Link copied to clipboard
common
value class NbtFloat(value: Float) : NbtTag
NbtFormat
Link copied to clipboard
common
interface NbtFormat : SerialFormat
NbtFormatConfiguration
Link copied to clipboard
common
interface NbtFormatConfiguration
NbtInt
Link copied to clipboard
common
value class NbtInt(value: Int) : NbtTag
NbtIntArray
Link copied to clipboard
common
class NbtIntArray : NbtTag, List<Int>
NbtList
Link copied to clipboard
common
class NbtList<out T : NbtTag> : NbtTag, List<T>
NbtListBuilder
Link copied to clipboard
common
class NbtListBuilder<T : NbtTag>
NbtLong
Link copied to clipboard
common
value class NbtLong(value: Long) : NbtTag
NbtLongArray
Link copied to clipboard
common
class NbtLongArray : NbtTag, List<Long>
NbtShort
Link copied to clipboard
common
value class NbtShort(value: Short) : NbtTag
NbtString
Link copied to clipboard
common
value class NbtString(value: String) : NbtTag
NbtTag
Link copied to clipboard
common
interface NbtTag
NbtVariant
Link copied to clipboard
common
abstract class NbtVariant
StringifiedNbt
Link copied to clipboard
common
sealed class StringifiedNbt : NbtFormat, StringFormat
StringifiedNbtBuilder
Link copied to clipboard
common
class StringifiedNbtBuilder
Builder of the StringifiedNbt instance provided by StringifiedNbt { ... } factory function.
StringifiedNbtConfiguration
Link copied to clipboard
common
class StringifiedNbtConfiguration : NbtFormatConfiguration

Functions

add
Link copied to clipboard
common
fun NbtListBuilder<NbtByteArray>.add(value: ByteArray): Boolean
fun NbtListBuilder<NbtByteArray>.add(tag: NbtByteArray): Boolean
fun NbtListBuilder<NbtByte>.add(value: Boolean): Boolean
fun NbtListBuilder<NbtByte>.add(value: Byte): Boolean
fun NbtListBuilder<NbtByte>.add(tag: NbtByte): Boolean
fun NbtListBuilder<NbtCompound>.add(tag: NbtCompound): Boolean
fun NbtListBuilder<NbtDouble>.add(value: Double): Boolean
fun NbtListBuilder<NbtDouble>.add(tag: NbtDouble): Boolean
fun NbtListBuilder<NbtFloat>.add(value: Float): Boolean
fun NbtListBuilder<NbtFloat>.add(tag: NbtFloat): Boolean
fun NbtListBuilder<NbtIntArray>.add(value: IntArray): Boolean
fun NbtListBuilder<NbtIntArray>.add(tag: NbtIntArray): Boolean
fun NbtListBuilder<NbtInt>.add(value: Int): Boolean
fun NbtListBuilder<NbtInt>.add(tag: NbtInt): Boolean
fun <T : NbtTag> NbtListBuilder<NbtList<T>>.add(tag: NbtList<T>): Boolean
fun NbtListBuilder<NbtLongArray>.add(value: LongArray): Boolean
fun NbtListBuilder<NbtLongArray>.add(tag: NbtLongArray): Boolean
fun NbtListBuilder<NbtLong>.add(value: Long): Boolean
fun NbtListBuilder<NbtLong>.add(tag: NbtLong): Boolean
fun NbtListBuilder<NbtShort>.add(value: Short): Boolean
fun NbtListBuilder<NbtShort>.add(tag: NbtShort): Boolean
fun NbtListBuilder<NbtString>.add(value: String): Boolean
fun NbtListBuilder<NbtString>.add(tag: NbtString): Boolean
addNbtCompound
Link copied to clipboard
common
inline fun NbtListBuilder<NbtCompound>.addNbtCompound(builderAction: NbtCompoundBuilder.() -> Unit): Boolean
addNbtList
Link copied to clipboard
common
@JvmName(name = addNbtList$T)
inline fun <T : NbtTag> NbtListBuilder<NbtList<T>>.addNbtList(builderAction: NbtListBuilder<T>.() -> Unit): Boolean
inline fun <T : NbtTag> NbtListBuilder<NbtList<NbtTag>>.addNbtList(builderAction: NbtListBuilder<T>.() -> Unit): Boolean
asNbtDecoder
Link copied to clipboard
common
fun Decoder.asNbtDecoder(): NbtDecoder
asNbtEncoder
Link copied to clipboard
common
fun Encoder.asNbtEncoder(): NbtEncoder
buildNbtCompound
Link copied to clipboard
common
inline fun buildNbtCompound(builderAction: NbtCompoundBuilder.() -> Unit): NbtCompound
inline fun buildNbtCompound(name: String, builderAction: NbtCompoundBuilder.() -> Unit): NbtCompound
Build an NbtCompound suitable for being written to an NBT file.
buildNbtList
Link copied to clipboard
common
inline fun <T : NbtTag> buildNbtList(builderAction: NbtListBuilder<T>.() -> Unit): NbtList<T>
inline fun <T : NbtTag> buildNbtList(name: String, builderAction: NbtListBuilder<T>.() -> Unit): NbtCompound
Build an NbtList suitable for being written to an NBT file.
decodeFromNbtTag
Link copied to clipboard
common
inline fun <T> NbtFormat.decodeFromNbtTag(tag: NbtTag): T
Decodes and deserializes the given tag to a value of type T using serializer retrieved from the reified type parameter.
decodeFromSource
Link copied to clipboard
common
inline fun <T> Nbt.decodeFromSource(source: Source): T
Decode NBT from a Source.
decodeFromStream
Link copied to clipboard
inline fun <T> Nbt.decodeFromStream(input: InputStream): T
Decode NBT from an InputStream.
fun <T> Nbt.decodeFromStream(deserializer: DeserializationStrategy<T>, input: InputStream): T
Decode NBT from an InputStream.
detect
Link copied to clipboard
fun NbtCompression.Companion.detect(stream: InputStream): NbtCompression
Peek in the stream and detect what NbtCompression is used.
common
fun NbtCompression.Companion.detect(byteArray: ByteArray): NbtCompression
Peek in the byteArray and detect what NbtCompression is used.
common
fun NbtCompression.Companion.detect(source: BufferedSource): NbtCompression
Peek in the source and detect what NbtCompression is used.
encodeToNbtTag
Link copied to clipboard
common
inline fun <T> NbtFormat.encodeToNbtTag(value: T): NbtTag
Serializes and encodes the given value to an NbtTag using serializer retrieved from the reified type parameter.
encodeToSink
Link copied to clipboard
common
inline fun <T> Nbt.encodeToSink(value: T, sink: Sink)
Encode NBT to a Sink.
encodeToStream
Link copied to clipboard
inline fun <T> Nbt.encodeToStream(value: T, output: OutputStream)
Encode NBT to an OutputStream.
fun <T> Nbt.encodeToStream(serializer: SerializationStrategy<T>, value: T, output: OutputStream)
Encode NBT to an OutputStream.
Nbt
Link copied to clipboard
common
fun Nbt(from: Nbt = DefaultNbt, builderAction: NbtBuilder.() -> Unit): Nbt
Creates an instance of Nbt configured from the optionally given Nbt instance and adjusted with builderAction.
nbtList
Link copied to clipboard
common
inline fun <T : NbtTag> NbtTag.nbtList(): NbtList<T>
Convenience method to get this element as an NbtList<T>
put
Link copied to clipboard
common
fun NbtCompoundBuilder.put(key: String, value: Boolean): NbtTag?
fun NbtCompoundBuilder.put(key: String, value: Byte): NbtTag?
fun NbtCompoundBuilder.put(key: String, value: ByteArray): NbtTag?
fun NbtCompoundBuilder.put(key: String, value: Double): NbtTag?
fun NbtCompoundBuilder.put(key: String, value: Float): NbtTag?
fun NbtCompoundBuilder.put(key: String, value: Int): NbtTag?
fun NbtCompoundBuilder.put(key: String, value: IntArray): NbtTag?
fun NbtCompoundBuilder.put(key: String, value: Long): NbtTag?
fun NbtCompoundBuilder.put(key: String, value: LongArray): NbtTag?
fun NbtCompoundBuilder.put(key: String, value: Short): NbtTag?
fun NbtCompoundBuilder.put(key: String, value: String): NbtTag?
putNbtCompound
Link copied to clipboard
common
inline fun NbtCompoundBuilder.putNbtCompound(key: String, builderAction: NbtCompoundBuilder.() -> Unit): NbtTag?
putNbtList
Link copied to clipboard
common
@JvmName(name = putNbtList$T)
inline fun <T : NbtTag> NbtCompoundBuilder.putNbtList(key: String, builderAction: NbtListBuilder<T>.() -> Unit): NbtTag?
StringifiedNbt
Link copied to clipboard
common
fun StringifiedNbt(from: StringifiedNbt = StringifiedNbt.Default, builderAction: StringifiedNbtBuilder.() -> Unit): StringifiedNbt
Creates an instance of StringifiedNbt configured from the optionally given StringifiedNbt instance and adjusted with builderAction.

Properties

nbtByte
Link copied to clipboard
common
val NbtTag.nbtByte: NbtByte
Convenience method to get this element as an NbtByte
nbtByteArray
Link copied to clipboard
common
val NbtTag.nbtByteArray: NbtByteArray
Convenience method to get this element as an NbtByteArray
nbtCompound
Link copied to clipboard
common
val NbtTag.nbtCompound: NbtCompound
Convenience method to get this element as an NbtCompound
nbtDouble
Link copied to clipboard
common
val NbtTag.nbtDouble: NbtDouble
Convenience method to get this element as an NbtDouble
nbtFloat
Link copied to clipboard
common
val NbtTag.nbtFloat: NbtFloat
Convenience method to get this element as an NbtFloat
nbtInt
Link copied to clipboard
common
val NbtTag.nbtInt: NbtInt
Convenience method to get this element as an NbtInt
nbtIntArray
Link copied to clipboard
common
val NbtTag.nbtIntArray: NbtIntArray
Convenience method to get this element as an NbtIntArray
nbtList
Link copied to clipboard
common
val NbtTag.nbtList: NbtList<*>
Convenience method to get this element as an NbtList
nbtLong
Link copied to clipboard
common
val NbtTag.nbtLong: NbtLong
Convenience method to get this element as an NbtLong
nbtLongArray
Link copied to clipboard
common
val NbtTag.nbtLongArray: NbtLongArray
Convenience method to get this element as an NbtLongArray
nbtShort
Link copied to clipboard
common
val NbtTag.nbtShort: NbtShort
Convenience method to get this element as an NbtShort
nbtString
Link copied to clipboard
common
val NbtTag.nbtString: NbtString
Convenience method to get this element as an NbtString