update vs

This commit is contained in:
Jesse Boyd
2019-07-11 20:27:29 +10:00
parent 4dea4f4c45
commit b44dcc91b8
3 changed files with 35 additions and 7 deletions

View File

@ -67,6 +67,23 @@ public class BlockMask extends ABlockMask {
return this;
}
public BlockMask remove(BlockState... states) {
for (BlockState state : states) ordinals[state.getOrdinal()] = false;
return this;
}
public BlockMask clear() {
Arrays.fill(ordinals, false);
return this;
}
public boolean isEmpty() {
for (boolean value : ordinals) {
if (value) return false;
}
return true;
}
public BlockMask addStates(Collection<BlockState> states) {
for (BlockState state : states) ordinals[state.getOrdinal()] = true;
return this;