mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-21 04:49:51 +08:00
Masks are now checked in setBlock instead of rawSetBlock.
Untested!!!
This commit is contained in:
parent
69bcaa7133
commit
803b4df72e
@ -190,12 +190,6 @@ public boolean rawSetBlock(Vector pt, BaseBlock block) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mask != null) {
|
||||
if (!mask.matches(this, pt)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
final int existing = world.getBlockType(pt);
|
||||
|
||||
// Clear the container block so that it doesn't drop items
|
||||
@ -259,6 +253,12 @@ public boolean setBlock(Vector pt, BaseBlock block)
|
||||
throws MaxChangedBlocksException {
|
||||
BlockVector blockPt = pt.toBlockVector();
|
||||
|
||||
if (mask != null) {
|
||||
if (!mask.matches(this, blockPt)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// if (!original.containsKey(blockPt)) {
|
||||
original.put(blockPt, getBlock(pt));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user