NBT Library

A Java library for reading and writing NBT data.

License

License

Categories

Categories

Akka Container Microservices Reactive libraries
GroupId

GroupId

io.github.lordakkarin
ArtifactId

ArtifactId

nbt
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

NBT Library
A Java library for reading and writing NBT data.
Project URL

Project URL

https://github.com/dotStart/NBT
Source Code Management

Source Code Management

https://github.com/dotStart/NBT

Download nbt

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.lordakkarin/nbt/ -->
<dependency>
    <groupId>io.github.lordakkarin</groupId>
    <artifactId>nbt</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.lordakkarin/nbt/
implementation 'io.github.lordakkarin:nbt:1.1.0'
// https://jarcasting.com/artifacts/io.github.lordakkarin/nbt/
implementation ("io.github.lordakkarin:nbt:1.1.0")
'io.github.lordakkarin:nbt:jar:1.1.0'
<dependency org="io.github.lordakkarin" name="nbt" rev="1.1.0">
  <artifact name="nbt" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.lordakkarin', module='nbt', version='1.1.0')
)
libraryDependencies += "io.github.lordakkarin" % "nbt" % "1.1.0"
[io.github.lordakkarin/nbt "1.1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
io.netty : netty-buffer jar 4.1.21.Final

provided (1)

Group / Artifact Type Version
com.github.spotbugs : spotbugs-annotations jar 3.1.1

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-core jar 2.15.0

Project Modules

There are no modules declared in this project.

License Maven Central GitHub Release CircleCI

NBT

A modern NBT library for Java featuring both an event based and a tree based API.

Table of Contents

Contacts

License

Copyright (C) 2016 Johannes "Akkarin" Donath and other copyright owners as documented in the project's IP log. License

Usage

<dependency>
        <groupId>io.github.lordakkarin</groupId>
        <artifactId>nbt</artifactId>
        <version>1.1.0</version>
</dependency>
TagVisitor visitor = new MyVisitor();
ValidationVisitor validationVisitor = new ValidationVisitor(visitor);

TagReader reader = new TagReader(inputStream);
reader.accept(validationVisitor);
TreeVisitor visitor = new TreeVisitor();
ValidationVisitor validationVisitor = new ValidationVisitor(visitor);

TagReader reader = new TagReader(inputStream);
reader.accept(validationVisitor);

CompoundTag tag = reader.getRoot();

System.out.println(tag.getString("test"));
tag.setString("test", "foobar");

TagWriter writer = new TagWriter();
tag.accept(writer);
writer.write(outputStream);

Downloads

Released versions of the library can be found on GitHub.

Issues

You encountered problems with the library or have a suggestion? Create an issue!

  1. Make sure your issue has not been fixed in a newer version (check the list of closed issues
  2. Create a new issue from the issues page
  3. Enter your issue's title (something that summarizes your issue) and create a detailed description containing:
    • What is the expected result?
    • What problem occurs?
    • How to reproduce the problem?
    • Crash Log (Please use a Pastebin service)
  4. Click "Submit" and wait for further instructions

Building

  1. Clone this repository via git clone https://github.com/dotStart/NBT.git or download a zip
  2. Build the modification by running mvn clean install
  3. The resulting jars can be found in their respective target directories as well as your local maven repository

Contributing

Before you add any major changes to the library you may want to discuss them with us (see Contact) as we may choose to reject your changes for various reasons. All contributions are applied via Pull-Requests. Patches will not be accepted. Also be aware that all of your contributions are made available under the terms of the Apache License 2.0. Please read the Contribution Guidelines for more information.

Versions

Version
1.1.0
1.0