GitXplorerGitXplorer
d

libnbt

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
1775c636dd7b8141da6d192196097829c7f93c7c

Update README.md

ddarichey committed 8 years ago
Unverified
ad03e3fed77c5446558fa481f7dff9ce57ec5889

Added build script

ddarichey committed 8 years ago
Unverified
f868e4343300e9ca91977bc41e299e54a845cf0f

Added methods to TagCompound to make getting tag types easier.

ddarichey committed 8 years ago
Unverified
4fbc3fd5a4c21ccc11ad61ee0e2ec5ea74e33039

Update README.md

ddarichey committed 8 years ago
Unverified
cb5dec565d0adb993296cb235f3ab711d81c54a3

Ignore for real this time??

ddarichey committed 8 years ago
Unverified
1ad8970c78be0b6d24b3ba7e54b160138a7bb7c8

Ignore .idea files

ddarichey committed 8 years ago

README

The README file for this repository.

#libnbt A small library for reading the Named Binary Tag (NBT) format.

##Adding libnbt as a dependency

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
   <dependency>
        <groupId>com.github.grandpanda</groupId>
        <artifactId>libnbt</artifactId>
        <version>1.0</version>
    </dependency>
</dependencies>

##Quick Start Currently, this library supports the reading of uncompressed NBT files, gzip compressed NBT files, and .mca files. The following example exhibits the reading of each file.

public class Main {
	public static void main(String[] args) {
		// Reading an uncompressed nbt file
        TagCompound uncompressed = LibNBT.readFromNBTFile(new File("uncompressed.nbt"), false);
        TagByte tagByte = (TagByte) uncompressed.get("byte"); // Reading a tag called "byte" from the compound.

        // Reading a compressed nbt file
        TagCompound compressed = LibNBT.readFromNBTFile(new File("compressed.nbt"), true);
        TagByte tagByte = (TagByte) compressed.get("byte"); // Reading a tag called "byte" from the compound.

        // Reading a .mca region file
        List<TagCompound> tags = LibNBT.readFromMCAFile(new File("r.0.0.mca"));
	}
}

##Notes The writing of NBT files is not currently supported by this library.