Skip to content

Class NbtTagBooleanAdapter

Namespace: Void.Minecraft.Nbt.Serializers.Json.Adapter
Assembly: Void.Minecraft.dll

Maps JSON boolean tokens to the conventional NBT byte values zero and one.

public class NbtTagBooleanAdapter

Inheritance

objectNbtTagBooleanAdapter

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Methods

DeserializeBoolean(ref Utf8JsonReader)

Reads the current JSON boolean token as an NBT byte tag.

public static NbtTag DeserializeBoolean(ref Utf8JsonReader reader)

Parameters

reader Utf8JsonReader

The reader positioned on a boolean token.

Returns

NbtTag

One for true or zero for false.

Exceptions

JsonException

The current token is not a JSON boolean.