OMGPIDocs

OMGPI

Source

JavaDocs

SpigotMC

BlockInfo

BlockInfo is a NBT format file that saves blocks.

Create new BlockInfo to load or save blocks with new BlockInfo(anchor), where anchor is a location relative to which blocks will be placed (e.g. anchor is 0,1,0 and block 0,2,1 will be set at 0,3,1). Then to get blocks into the blockinfo, use getFromCoordinates(double[] cuboid), where cuboid can be gotten from Coordinates.parse("x1,y1,z1,x2,y2,z2", Coordinates.CoordinateType.AREA) or created by hand with new double[]{x1, y1, z1, x2, y2, z2}. Structure void blocks will be ignored, air blocks will be saved. To save blocks into a file you can use binf.saveToFile(File f).

File is text with each line meaning new block NBT:

{id:stone,x:1,y:2,z:3}
{...}

To load blocks from a file you can use binf.loadFromFile(File f) - will fill list binf.blocks with lines from file. Then use binf.setBlocks() and it will set blocks relative to the anchor.