NBTViewCompound

trait NBTViewCompound[A] extends NBTView[A, NBTCompound]

An extra trait so Scala's derives has something to latch on to.

Companion
object
class Object
trait Matchable
class Any

Value members

Inherited methods

def contramap[NewRepr](f: NewRepr => A): NBTSerializer[NewRepr, NBTCompound]

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 => NBTCompound): NBTDeserializer[A, NewNBT]

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
def from(arg: NBTCompound): Option[A]

Convert a value from NBT.

Convert a value from NBT.

Inherited from
NBTDeserializer
def imap[NewRepr](f: A => NewRepr, g: NewRepr => A): NBTView[NewRepr, NBTCompound]
Inherited from
NBTView
def imapNbt[NewNBT <: NBTTag](f: NBTCompound => NewNBT, g: NewNBT => NBTCompound): NBTView[A, NewNBT]
Inherited from
NBTView
def imapOpt[NewRepr](f: A => Option[NewRepr], g: NewRepr => A): NBTView[NewRepr, NBTCompound]
Inherited from
NBTView
def map[NewRepr](f: A => NewRepr): NBTDeserializer[NewRepr, NBTCompound]

Map the result of running this deserializer.

Map the result of running this deserializer.

Inherited from
NBTDeserializer
def mapNbt[NewNBT <: NBTTag](f: NBTCompound => NewNBT): NBTSerializer[A, 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: NBTCompound)(f: A => 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: A => Option[NewRepr]): NBTDeserializer[NewRepr, NBTCompound]

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 to(v: A): NBTCompound

Convert a value to NBT.

Convert a value to NBT.

Inherited from
NBTSerializer