I hope these are the last few errors

This commit is contained in:
MattBDev
2019-10-03 20:27:19 -04:00
parent f963e63f58
commit 51a5c22677
6 changed files with 44 additions and 20 deletions

View File

@ -21,16 +21,12 @@ public abstract class ABlockMask extends AbstractExtentMask {
List<String> strings = new ArrayList<>();
for (BlockType type : BlockTypes.values) {
if (type != null) {
boolean hasAll = true;
boolean hasAny = false;
boolean hasAll;
List<BlockState> all = type.getAllStates();
for (BlockState state : all) {
hasAll &= test(state);
hasAny = true;
}
hasAll = all.stream().map(this::test).reduce(true, (a, b) -> a && b);
if (hasAll) {
strings.add(type.getId());
} else if (hasAny) {
} else {
for (BlockState state : all) {
if (test(state)) {
strings.add(state.getAsString());

View File

@ -81,15 +81,15 @@ public interface Mask {
return value == null ? this : value;
}
default Mask and(Mask other) {
Mask value = and(other);
return value == null ? new MaskIntersection(this, other) : value;
}
// default Mask and(Mask other) {
// Mask value = and(other);
// return value == null ? new MaskIntersection(this, other) : value;
// }
default Mask or(Mask other) {
Mask value = or(other);
return value == null ? new MaskUnion(this, other) : value;
}
// default Mask or(Mask other) {
// Mask value = or(other);
// return value == null ? new MaskUnion(this, other) : value;
// }
default Mask inverse() {
if (this instanceof Masks.AlwaysTrue) {