Allow deny/allow by ExtendedFacing directly

This commit is contained in:
Glease committed 2021-05-29 17:56:28 +08:00
1 parent 3573185ee2
commit 671da2dc1a
1 file changed
+10
@@ -48,6 +48,16 @@ public interface IAlignmentLimits {
return this;
}
public Builder deny(ExtendedFacing o) {
validStates[o.getIndex()] = false;
return this;
}
public Builder allow(ExtendedFacing o) {
validStates[o.getIndex()] = true;
return this;
}
public Builder deny(Rotation fd) {
ExtendedFacing.getAllWith(fd).stream().mapToInt(ExtendedFacing::getIndex).forEach(v -> validStates[v] = false);
return this;