I'm having a bit of a run in with disinformation on the wiki.
First off, I want to make a tool that accesses the block data. On Beta Level Format, it links to RegionFile and RegionFileCache... Okay... I put r.0.0.mcr into my project and write the following code.
RegionFile region = new RegionFile(new File("r.0.0.mcr"));
InputStream in = region.getChunkDataInputStream(0, 0);
in.close();
region.close();
No errors so far.
It also says that "The uncompressed data is in NBT format with the same structure as in alpha". I try to find the NBT files. I eventually fall upon the broken link http://www.minecraft.net/docs/NBT.txt. I keep trying and manage to find this. I add to my code.
RegionFile region = new RegionFile(new File("r.0.0.mcr"));
InputStream in = region.getChunkDataInputStream(0, 0);
in.skip(4);
Tag head = Tag.readFrom(in);
Tag level = head.findTagByName("Level");
in.close();
region.close();
There is a problem with the NBT code still using GZip. I fix that then... null pointer exception. The problem is that head was loaded as an TAG_End. I don't know where to go from here.
If yes, don't read the rest of the post:
Does anybody know where an up to date version of http://www.minecraftwiki.net/wiki/NBT_class is?
I'm having a bit of a run in with disinformation on the wiki.
First off, I want to make a tool that accesses the block data. On Beta Level Format, it links to RegionFile and RegionFileCache... Okay... I put r.0.0.mcr into my project and write the following code.
No errors so far.
It also says that "The uncompressed data is in NBT format with the same structure as in alpha". I try to find the NBT files. I eventually fall upon the broken link http://www.minecraft.net/docs/NBT.txt. I keep trying and manage to find this. I add to my code.
There is a problem with the NBT code still using GZip. I fix that then... null pointer exception. The problem is that head was loaded as an TAG_End. I don't know where to go from here.