TestBlockPaste-Without-Water #146
@ -34,6 +34,7 @@ import com.sk89q.worldedit.function.mask.Mask;
|
||||
import com.sk89q.worldedit.function.mask.Mask2D;
|
||||
import com.sk89q.worldedit.function.operation.ForwardExtentCopy;
|
||||
import com.sk89q.worldedit.function.operation.Operations;
|
||||
import com.sk89q.worldedit.function.pattern.WaterloggedRemover;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.math.transform.AffineTransform;
|
||||
import com.sk89q.worldedit.regions.CuboidRegion;
|
||||
@ -42,12 +43,10 @@ import com.sk89q.worldedit.regions.selector.CuboidRegionSelector;
|
||||
import com.sk89q.worldedit.session.ClipboardHolder;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
import de.steamwar.bausystem.region.Color;
|
||||
import de.steamwar.bausystem.region.PasteOptions;
|
||||
import de.steamwar.bausystem.region.Point;
|
||||
import net.minecraft.server.v1_15_R1.AreaFactory;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
@ -166,10 +165,15 @@ public class FlatteningWrapper15 implements FlatteningWrapper {
|
||||
public boolean test(BlockVector3 blockVector3) {
|
||||
BaseBlock block = clipboard.getFullBlock(blockVector3);
|
||||
String blockName = block.toString().toLowerCase();
|
||||
|
||||
if (blocks.contains(blockName) && pasteOptions.isOnlyColors()) return true;
|
||||
if (pasteOptions.isTestBlock()) {
|
||||
if (blockName.startsWith("minecraft:water")) return false;
|
||||
if (block.toString().toLowerCase().contains("waterlogged=true")) return false;
|
||||
if (blockName.contains("waterlogged=true")) try {
|
||||
e.setBlock(blockVector3, new WaterloggedRemover(clipboard).applyBlock(blockVector3));
|
||||
} catch (WorldEditException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren