/** * Gets whether or not the specified {@link BlockState} passes the {@link SpongeBlockFilter}s. * * @param filters The filters * @param state The state to test * @return If it passes */ public static boolean doesStatePassFilters(Collection<SpongeBlockFilter> filters, BlockState state) { for(SpongeBlockFilter filter : filters) if(doesStatePassFilter(filter, state)) return true; return false; }
public boolean isValid(CartMechanismBlocks blocks) { return BlockUtil.doesStatePassFilter(getBlockFilter(), blocks.getBase().getBlock()) && (!requiresSign() || blocks.hasSign()); }