NBTType

sealed
trait NBTType[Repr, NBT <: Aux[Repr]] extends SafeNBTView[Repr, NBT]

A special type of NBTView that represents a real nbt type. It's also both safe and contains the numerical id of the type.

Companion
object
trait SafeNBTView[Repr, NBT]
trait SafeNBTDeserializer[Repr, NBT]
trait NBTView[Repr, NBT]
trait NBTDeserializer[Repr, NBT]
trait NBTSerializer[Repr, NBT]
class Object
trait Matchable
class Any
class NBTListType[ElementRepr, ElementNBT]
object TAG_Byte
object TAG_Double
object TAG_End
object TAG_Float
object TAG_Int
object TAG_Long
object TAG_Short
object TAG_String

Value members

Abstract methods

def from(arg: NBT): Option[Repr]
Implicitly added by listType

Convert a value from NBT.

Convert a value from NBT.

def fromSafe(arg: NBT): Repr
Implicitly added by listType

A safer version of NBTDeserializer.from that can't fail.

A safer version of NBTDeserializer.from that can't fail.

def id: Byte
def to(v: Repr): NBT
Implicitly added by listType

Convert a value to NBT.

Convert a value to NBT.

Concrete methods

def contramap[NewRepr](f: NewRepr => Repr): NBTSerializer[NewRepr, NBT]
Implicitly added by listType

Create a new serializer that uses this serializer as a stepping stone.

Create a new serializer that uses this serializer as a stepping stone.

def contramapNbt[NewNBT <: NBTTag](f: NewNBT => NBT): NBTDeserializer[Repr, NewNBT]
Implicitly added by listType

Create a new deserializer that changes the NBT type and uses this deserializer as a stepping stone.

Create a new deserializer that changes the NBT type and uses this deserializer as a stepping stone.

override
def fromSafe(arg: NBT): Repr
Definition Classes
def imap[NewRepr](f: Repr => NewRepr, g: NewRepr => Repr): NBTView[NewRepr, NBT]
Implicitly added by listType
def imapNbt[NewNBT <: NBTTag](f: NBT => NewNBT, g: NewNBT => NBT): NBTView[Repr, NewNBT]
Implicitly added by listType
def imapOpt[NewRepr](f: Repr => Option[NewRepr], g: NewRepr => Repr): NBTView[NewRepr, NBT]
Implicitly added by listType
def map[NewRepr](f: Repr => NewRepr): NBTDeserializer[NewRepr, NBT]
Implicitly added by listType

Map the result of running this deserializer.

Map the result of running this deserializer.

def mapNbt[NewNBT <: NBTTag](f: NBT => NewNBT): NBTSerializer[Repr, NewNBT]
Implicitly added by listType

Maps the NBT that resulted from using this serializer.

Maps the NBT that resulted from using this serializer.

def modify[NewRepr, NewNBT <: NBTTag](nbt: NBT)(f: Repr => NewRepr)(implicit newView: NBTView[NewRepr, NewNBT]): Option[NewNBT]
Implicitly added by listType

Modifies a nbt in value form before returning a new NBT. Thew two types of NBT does not have to be the same.

Modifies a nbt in value form before returning a new NBT. Thew two types of NBT does not have to be the same.

Type Params
NewNBT

The new NBT type

NewRepr

The new value type

Value Params
f

The function to apply to the NBT

nbt

The NBT to modify

newView

A view providing a way to get back to the world of NBTs after the modification.

Example
 val stringNbt: Option[NBTString] =
 NBTView.TagInt.modify(NBTInt(5))(_.toString) 
def optMap[NewRepr](f: Repr => Option[NewRepr]): NBTDeserializer[NewRepr, NBT]
Implicitly added by listType

Map the result of running this deserializer using a function that can fail.

Map the result of running this deserializer using a function that can fail.

Inherited methods

def contramap[NewRepr](f: NewRepr => Seq[ElementNBT]): NBTSerializer[NewRepr, NBTList[ElementRepr, ElementNBT]]
Implicitly added by listType

Create a new serializer that uses this serializer as a stepping stone.

Create a new serializer that uses this serializer as a stepping stone.

Inherited from
NBTSerializer
def contramap[NewRepr](f: NewRepr => Repr): NBTSerializer[NewRepr, NBT]
Implicitly added by listType

Create a new serializer that uses this serializer as a stepping stone.

Create a new serializer that uses this serializer as a stepping stone.

Inherited from
NBTSerializer
def contramap[NewRepr](f: NewRepr => Repr): NBTSerializer[NewRepr, NBT]

Create a new serializer that uses this serializer as a stepping stone.

Create a new serializer that uses this serializer as a stepping stone.

Inherited from
NBTSerializer
def contramapNbt[NewNBT <: NBTTag](f: NewNBT => NBT): NBTDeserializer[Repr, NewNBT]
Implicitly added by listType

Create a new deserializer that changes the NBT type and uses this deserializer as a stepping stone.

Create a new deserializer that changes the NBT type and uses this deserializer as a stepping stone.

Inherited from
NBTDeserializer
override
def contramapNbt[NewNBT <: NBTTag](f: NewNBT => NBT): SafeNBTDeserializer[Repr, NewNBT]
Definition Classes
Inherited from
SafeNBTDeserializer
def from(arg: NBT): Option[Repr]
Implicitly added by listType

Convert a value from NBT.

Convert a value from NBT.

Inherited from
NBTDeserializer
override
def from(arg: NBT): Option[Repr]
Definition Classes
Inherited from
SafeNBTDeserializer
override
def imap[NewRepr](f: Repr => NewRepr, g: NewRepr => Repr): SafeNBTView[NewRepr, NBT]
Definition Classes
Inherited from
SafeNBTView
override
def imapNbt[NewNBT <: NBTTag](f: NBT => NewNBT, g: NewNBT => NBT): SafeNBTView[Repr, NewNBT]
Definition Classes
Inherited from
SafeNBTView
def imapOpt[NewRepr](f: Seq[ElementNBT] => Option[NewRepr], g: NewRepr => Seq[ElementNBT]): NBTView[NewRepr, NBTList[ElementRepr, ElementNBT]]
Implicitly added by listType
Inherited from
NBTView
def imapOpt[NewRepr](f: Repr => Option[NewRepr], g: NewRepr => Repr): NBTView[NewRepr, NBT]
Inherited from
NBTView
def map[NewRepr](f: Repr => NewRepr): NBTDeserializer[NewRepr, NBT]
Implicitly added by listType

Map the result of running this deserializer.

Map the result of running this deserializer.

Inherited from
NBTDeserializer
override
def map[NewRepr](f: Repr => NewRepr): SafeNBTDeserializer[NewRepr, NBT]
Definition Classes
Inherited from
SafeNBTDeserializer
def mapNbt[NewNBT <: NBTTag](f: NBTList[ElementRepr, ElementNBT] => NewNBT): NBTSerializer[Seq[ElementNBT], NewNBT]
Implicitly added by listType

Maps the NBT that resulted from using this serializer.

Maps the NBT that resulted from using this serializer.

Inherited from
NBTSerializer
def mapNbt[NewNBT <: NBTTag](f: NBT => NewNBT): NBTSerializer[Repr, NewNBT]
Implicitly added by listType

Maps the NBT that resulted from using this serializer.

Maps the NBT that resulted from using this serializer.

Inherited from
NBTSerializer
def mapNbt[NewNBT <: NBTTag](f: NBT => NewNBT): NBTSerializer[Repr, NewNBT]

Maps the NBT that resulted from using this serializer.

Maps the NBT that resulted from using this serializer.

Inherited from
NBTSerializer
def modify[NewRepr, NewNBT <: NBTTag](nbt: NBTList[ElementRepr, ElementNBT])(f: Seq[ElementNBT] => NewRepr)(implicit newView: NBTView[NewRepr, NewNBT]): Option[NewNBT]
Implicitly added by listType

Modifies a nbt in value form before returning a new NBT. Thew two types of NBT does not have to be the same.

Modifies a nbt in value form before returning a new NBT. Thew two types of NBT does not have to be the same.

Type Params
NewNBT

The new NBT type

NewRepr

The new value type

Value Params
f

The function to apply to the NBT

nbt

The NBT to modify

newView

A view providing a way to get back to the world of NBTs after the modification.

Example
 val stringNbt: Option[NBTString] =
 NBTView.TagInt.modify(NBTInt(5))(_.toString) 
Inherited from
NBTView
def modify[NewRepr, NewNBT <: NBTTag](nbt: NBT)(f: Repr => NewRepr)(implicit newView: NBTView[NewRepr, NewNBT]): Option[NewNBT]

Modifies a nbt in value form before returning a new NBT. Thew two types of NBT does not have to be the same.

Modifies a nbt in value form before returning a new NBT. Thew two types of NBT does not have to be the same.

Type Params
NewNBT

The new NBT type

NewRepr

The new value type

Value Params
f

The function to apply to the NBT

nbt

The NBT to modify

newView

A view providing a way to get back to the world of NBTs after the modification.

Example
 val stringNbt: Option[NBTString] =
 NBTView.TagInt.modify(NBTInt(5))(_.toString) 
Inherited from
NBTView
def optMap[NewRepr](f: Seq[ElementNBT] => Option[NewRepr]): NBTDeserializer[NewRepr, NBTList[ElementRepr, ElementNBT]]
Implicitly added by listType

Map the result of running this deserializer using a function that can fail.

Map the result of running this deserializer using a function that can fail.

Inherited from
NBTDeserializer
def optMap[NewRepr](f: Repr => Option[NewRepr]): NBTDeserializer[NewRepr, NBT]
Implicitly added by listType

Map the result of running this deserializer using a function that can fail.

Map the result of running this deserializer using a function that can fail.

Inherited from
NBTDeserializer
def optMap[NewRepr](f: Repr => Option[NewRepr]): NBTDeserializer[NewRepr, NBT]
Implicitly added by listType

Map the result of running this deserializer using a function that can fail.

Map the result of running this deserializer using a function that can fail.

Inherited from
NBTDeserializer
def optMap[NewRepr](f: Repr => Option[NewRepr]): NBTDeserializer[NewRepr, NBT]

Map the result of running this deserializer using a function that can fail.

Map the result of running this deserializer using a function that can fail.

Inherited from
NBTDeserializer
def safeModify[NewRepr, NewNBT <: NBTTag](nbt: NBTList[ElementRepr, ElementNBT])(f: Seq[ElementNBT] => NewRepr)(implicit newView: NBTView[NewRepr, NewNBT]): NewNBT
Implicitly added by listType

Same as NBTView.modify except it uses SafeNBTDeserializer.fromSafe so the result isn't an option.

Same as NBTView.modify except it uses SafeNBTDeserializer.fromSafe so the result isn't an option.

Inherited from
SafeNBTView
def safeModify[NewRepr, NewNBT <: NBTTag](nbt: NBT)(f: Repr => NewRepr)(implicit newView: NBTView[NewRepr, NewNBT]): NewNBT

Same as NBTView.modify except it uses SafeNBTDeserializer.fromSafe so the result isn't an option.

Same as NBTView.modify except it uses SafeNBTDeserializer.fromSafe so the result isn't an option.

Inherited from
SafeNBTView
def to(v: Repr): NBT
Implicitly added by listType

Convert a value to NBT.

Convert a value to NBT.

Inherited from
NBTSerializer
def to(v: Repr): NBT

Convert a value to NBT.

Convert a value to NBT.

Inherited from
NBTSerializer

Concrete fields

val elementType: NBTType[ElementRepr, ElementNBT]
Implicitly added by listType