mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-03 09:00:55 +01:00
Set unspecified blocks from the schematic to air
If this isn't done, any blocks not specified in the schematic will remain after a clear, which is obviously undesirable.
This commit is contained in:
parent
941821e453
commit
b366b0d261
@ -11,7 +11,7 @@ import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue
|
|||||||
import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue;
|
import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||||
|
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
@ -96,6 +96,9 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||||||
for (int y = 0; y < blocks.length; y++) {
|
for (int y = 0; y < blocks.length; y++) {
|
||||||
if (blocks[y] != null) {
|
if (blocks[y] != null) {
|
||||||
queue.setBlock(x, minY + y, z, blocks[y]);
|
queue.setBlock(x, minY + y, z, blocks[y]);
|
||||||
|
} else {
|
||||||
|
// This is necessary, otherwise any blocks not specified in the schematic will remain after a clear
|
||||||
|
queue.setBlock(x, minY + y, z, BlockTypes.AIR.getDefaultState().toBaseBlock());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user