mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Fixed //replace. Closes #1069
This commit is contained in:
parent
da6ccd1f98
commit
0bea058328
@ -1275,17 +1275,9 @@ public class EditSession {
|
|||||||
for (int z = minZ; z <= maxZ; ++z) {
|
for (int z = minZ; z <= maxZ; ++z) {
|
||||||
Vector pt = new Vector(x, y, z);
|
Vector pt = new Vector(x, y, z);
|
||||||
BaseBlock curBlockType = getBlock(pt);
|
BaseBlock curBlockType = getBlock(pt);
|
||||||
|
//replace <from-block> <to-block>
|
||||||
if (definiteBlockTypes == null) {
|
if (!definiteBlockTypes.contains(curBlockType) && !fuzzyBlockTypes.contains(curBlockType.getType())) {
|
||||||
//replace <to-block>
|
continue;
|
||||||
if (curBlockType.isAir()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//replace <from-block> <to-block>
|
|
||||||
if (!definiteBlockTypes.contains(curBlockType) && fuzzyBlockTypes.contains(curBlockType.getType())) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setBlock(pt, toBlock)) {
|
if (setBlock(pt, toBlock)) {
|
||||||
@ -1298,16 +1290,9 @@ public class EditSession {
|
|||||||
for (Vector pt : region) {
|
for (Vector pt : region) {
|
||||||
BaseBlock curBlockType = getBlock(pt);
|
BaseBlock curBlockType = getBlock(pt);
|
||||||
|
|
||||||
if (definiteBlockTypes == null) {
|
//replace <from-block> <to-block>
|
||||||
//replace <to-block>
|
if (!definiteBlockTypes.contains(curBlockType) && !fuzzyBlockTypes.contains(curBlockType.getType())) {
|
||||||
if (curBlockType.isAir()) {
|
continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//replace <from-block> <to-block>
|
|
||||||
if (!definiteBlockTypes.contains(curBlockType) && fuzzyBlockTypes.contains(curBlockType.getType())) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setBlock(pt, toBlock)) {
|
if (setBlock(pt, toBlock)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user