NAME
Minecraft::NBTReader - Parse Minecraft NBT files
SYNOPSIS
use Minecraft::NBTReader;
my $reader = Minecraft::NBTReader->new();
my %data = $reader->readFile("12345-12345-12345.dat"); # some playerdata file from server
my @pos = @{$data{'unnamed_0000001'}->{Pos}};
print "Player is at ", join(' / ', @pos), "\n";
DESCRIPTION
This module parses NBT files, as defined by Notch. Only plain and GZIP compression have been implemented at this time.
Please note that write support is not supported and not planned, this is for reading the files only at this point in time.
Values without a name (but expected to have one) will be given an auto-numbered named in the form of "unnamed_00000001".
Module doesn't work or doesn't install
Please test first if you get the error message "pack() does not support 64bit quads!" when running "make test".
This indicates that your perl interpreter isn't compiled with 64 bit support or your operating system doesn't support 64 bit. This is rather unfortunate, since NBT files can store 64 bit numbers. I'm open to any suggestions on how to work around that problem.
WARNING
As currently implemented, gzipped files are unzipped to a temporary file "temp.dat" in the current working directory.
EXPORT
None by default.
SEE ALSO
This is based on the original description of the file format by Notch: http://web.archive.org/web/20110723210920/http://www.minecraft.net/docs/NBT.txt. This distribution also contains the original test files provided by Notch for the automated test scripts.
AUTHOR
Rene Schickbauer, <cavac@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2015 by Rene Schickbauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.18.1 or, at your option, any later version of Perl 5 you may have available.