A NBTView is a sort of Prism allowing you to see and modify NBT easier.
- Type Params
- NBT
The corresponding nbt type
- Repr
The type it represents
- Companion
- object
Value members
Concrete methods
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 methods
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
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
Map the result of running this deserializer.
Map the result of running this deserializer.
- Inherited from
- NBTDeserializer
Maps the NBT that resulted from using this serializer.
Maps the NBT that resulted from using this serializer.
- Inherited from
- NBTSerializer
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