Various minor

refactor some region dependencies
swithc masking extent to a filter (so it can be parallelized)
Some unfinished refactoring of the filters
remove piston messages from strings.json
This commit is contained in:
Jesse Boyd
2019-12-16 09:07:51 +00:00
parent a36778794b
commit 6ddeb2ebf5
37 changed files with 323 additions and 197 deletions

View File

@ -23,6 +23,7 @@ import com.boydti.fawe.beta.Filter;
import com.boydti.fawe.beta.implementation.filter.block.FilterBlock;
import com.sk89q.worldedit.math.BlockVector3;
import javax.annotation.Nullable;
import java.util.function.Consumer;
/**
* Tests whether a given vector meets a criteria.
@ -92,12 +93,12 @@ public interface Mask {
return new InverseMask(this);
}
default Filter toFilter(Runnable run) {
default Filter toFilter(Consumer<FilterBlock> run) {
return new Filter() {
@Override
public void applyBlock(FilterBlock block) {
if (test(block)) {
run.run();
run.accept(block);
}
}
};