/** * Checks whether a given block is in a list of base blocks. * * @param collection the collection * @param o the block * @return true if the collection contains the given block */ public static <B extends BlockStateHolder<B>> boolean containsFuzzy(Collection<? extends BlockStateHolder<?>> collection, B o) { // Allow masked data in the searchBlocks to match various types for (BlockStateHolder<?> b : collection) { if (b.equalsFuzzy(o)) { return true; } } return false; }