SteamWar/BauSystem2.0
Archiviert
12
0

TestBlockPaste-Without-Water #146

Zusammengeführt
YoyoNow hat 25 Commits von TestBlockPaste-Without-Water nach master 2023-08-19 23:29:20 +02:00 zusammengeführt
Nur Änderungen aus Commit 5d55784f79 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -19,8 +19,6 @@
package de.steamwar.bausystem.utils; package de.steamwar.bausystem.utils;
import com.google.common.collect.ImmutableMap;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.WorldEditException; import com.sk89q.worldedit.WorldEditException;
@ -45,11 +43,11 @@ import com.sk89q.worldedit.session.ClipboardHolder;
import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.world.block.BlockTypes;
import de.steamwar.bausystem.region.Color; import de.steamwar.bausystem.region.Color;
import de.steamwar.bausystem.region.PasteOptions; import de.steamwar.bausystem.region.PasteOptions;
import de.steamwar.bausystem.region.Point; import de.steamwar.bausystem.region.Point;
import net.minecraft.server.v1_15_R1.AreaFactory;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.block.Block; import org.bukkit.block.Block;
@ -169,7 +167,12 @@ public class FlatteningWrapper15 implements FlatteningWrapper {
BaseBlock block = clipboard.getFullBlock(blockVector3); BaseBlock block = clipboard.getFullBlock(blockVector3);
String blockName = block.toString().toLowerCase(); String blockName = block.toString().toLowerCase();
if (blocks.contains(blockName) && pasteOptions.isOnlyColors()) return true; if (blocks.contains(blockName) && pasteOptions.isOnlyColors()) return true;
if (pasteOptions.isTestBlock() && blockName.startsWith("minecraft:water")) return false; if (pasteOptions.isTestBlock()) {
if (blockName.startsWith("minecraft:water")) return false;
if (block.toString().toLowerCase().contains("waterlogged=true")) return false;
}
return true; return true;
} }