Yes.
As for NBTs, this is a segment of working code:
try {
//I'm saving data to the world's save directory, inside a custom subfolder. You can also get/save NBTs
//To other locations as well. Someone I know is reading (not writing) a file out of their mod's zip
File rendersFolder = new File(DimensionManager.getCurrentSaveRootDirectory(), "LinkRenders");
rendersFolder.mkdir();
try {
FileInputStream fis = new FileInputStream(new File(rendersFolder, s));
DataInputStream instream = new DataInputStream(fis);
nbt = CompressedStreamTools.read(instream);
instream.close();
fis.close();
}
catch (FileNotFoundException e) {
nbt = new NBTTagCompound("tag");
}
NBTTagCompound yawtag = new NBTTagCompound("tag");
yawtag.setIntArray("imagedata", allData);
nbt.setIntArray("imagedata", allData);
int y = (int)Math.round(yaw / 22.5);
nbt.setTag("yaw"+y, yawtag);
nbt.setLong("date",world.getWorldInfo().getWorldTotalTime());
CompressedStreamTools.write(nbt, new File(rendersFolder, s));
}
catch (IOException e) {
System.out.println("Failed to write nbt " + s);
}