Code example for Set

Methods: add, contains

0
            LocalWorld world, BlockVector pos,
            Vector origin, int size, int initialType,
            Set<BlockVector> visited)
            throws MaxChangedBlocksException { 
 
        if (origin.distance(pos) > size || visited.contains(pos)) {
            return; 
        } 
 
        visited.add(pos);
 
        if (editSession.getBlock(pos).getType() == initialType) {
            editSession.setBlock(pos, pattern.next(pos));
        } else { 
            return; 
        } 
 
        recurse(server, editSession, world, pos.add(1, 0, 0).toBlockVector(),
                origin, size, initialType, visited);
        recurse(server, editSession, world, pos.add(-1, 0, 0).toBlockVector(),
                origin, size, initialType, visited);