2023-10-08 08:16:44 +02:00
# ViaNBT
ViaNBT is a library for dealing with [NBT ](https://minecraft.wiki/w/NBT_format ) and SNBT.
This project is derived from an earlier version of [OpenNBT ](https://github.com/GeyserMC/OpenNBT/ ) and contains various fundamental improvements and changes to it, including:
2014-03-02 01:46:32 +01:00
2021-03-14 15:40:10 +01:00
* Most notably, move the tag name out the of tags themselves
2023-10-08 08:16:44 +02:00
* `SNBT` for string serialization
2021-03-14 15:40:10 +01:00
* Add primitive getter methods to number types
* Don't wrap values given in Tag#setValue / Tag constructors
* Abstract NumberTag class for easier number handling
* Always read/write CompoundTags in NBTIO
* Don't use reflection when creating tag instances
* Directly use value in clone()
* Implement tag specific equals() methods
* Update to Java 8
2023-10-08 08:16:44 +02:00
This project also includes code from [adventure ](https://github.com/KyoriPowered/adventure ) used for SNBT serialization.
## Dependency
**Maven:**
```xml
< repository >
< id > viaversion-repo< / id >
< url > https://repo.viaversion.com< / url >
< / repository >
```
```xml
< dependency >
< groupId > com.viaversion< / groupId >
< artifactId > nbt< / artifactId >
2023-10-16 07:31:17 +02:00
< version > 3.2.0< / version >
2023-10-08 08:16:44 +02:00
< / dependency >
```
**Gradle:**
```kotlin
repositories {
maven("https://repo.viaversion.com")
}
dependencies {
implementation("com.viaversion:nbt:3.0.0")
}
```
## Building
Run `mvn install` in the source's directory via Maven.
2014-03-02 01:46:32 +01:00
2015-07-20 20:02:11 +02:00
## License
2023-10-08 08:16:44 +02:00
ViaNBT is licensed under the ** [MIT license ](http://www.opensource.org/licenses/mit-license.html )**.