mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00: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
1 changed files with 4 additions and 1 deletions
|
@ -11,7 +11,7 @@ import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue
|
|||
import com.github.intellectualsites.plotsquared.plot.util.block.LocalBlockQueue;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
|
@ -96,6 +96,9 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||
for (int y = 0; y < blocks.length; y++) {
|
||||
if (blocks[y] != null) {
|
||||
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 a new issue