public StructureInfo(int length, int height, int width, BlockData[] blockData) { this.structureWidth = width; this.structureHeight = height; this.structureLength = length; IBlockState[][][] states = new IBlockState[height][length][width]; for(int y = 0; y < height; y++) { for(int x = 0; x < length; x++) { for(int z = 0; z < width; z++) { for(BlockData data : blockData) { if(inside(x, y, z, data.pos, data.endPos)) { states[y][x][z] = convert(data); break; } } } } } data = states; maxBlockIndex = blockIndex = structureHeight * structureLength * structureWidth; }