int regionX = x & (REGION_SIZE - 1);
int regionZ = z & (REGION_SIZE - 1);
DataOutputStream out = region.getChunkDataOutputStream(regionX, regionZ);
try {
NBTOutputStream nbtOut = new NBTOutputStream(out, false);
Map<String, Tag> tagMap = new HashMap<String, Tag>(1);
tagMap.put("Level", levelTag);
CompoundTag tag = new CompoundTag("", tagMap);
nbtOut.writeTag(tag);
} finally {
out.close();
}
// TODO: Close the regionfile