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 8a425cc435 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -142,36 +142,32 @@ public class FlatteningWrapper15 implements FlatteningWrapper {
if (pasteOptions.getColor() != Color.YELLOW) {
changeColor(clipboard, pasteOptions.getColor());
}
if (pasteOptions.isOnlyColors()) {
Set<String> blocks = new HashSet<>();
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_wool");
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_terracotta");
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_glazed_terracotta");
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_stained_glass");
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_stained_glass_pane");
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_concrete");
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_concrete_powder");
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_carpet");
e.setMask(new Mask() {
@Override
public boolean test(BlockVector3 blockVector3) {
BaseBlock block = clipboard.getFullBlock(blockVector3);
String blockName = block.toString().toLowerCase();
return blocks.contains(blockName);
e.setMask(new Mask() {
@Override
public boolean test(BlockVector3 blockVector3) {
Set<String> blocks = new HashSet<>();
if (pasteOptions.isOnlyColors()) {
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_wool");
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_terracotta");
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_glazed_terracotta");
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_stained_glass");
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_stained_glass_pane");
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_concrete");
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_concrete_powder");
blocks.add("minecraft:" + pasteOptions.getColor().name().toLowerCase() + "_carpet");
}
@Nullable
@Override
public Mask2D toMask2D() {
return null;
}
BaseBlock block = clipboard.getFullBlock(blockVector3);
String blockName = block.toString().toLowerCase();
return blockName.equals("minecraft:water") || blocks.contains(blockName);
}
public Mask copy() {
return this;
}
});
}
@Nullable
@Override
public Mask2D toMask2D() {
return null;
}
});
ClipboardHolder ch = new ClipboardHolder(clipboard);
BlockVector3 dimensions = clipboard.getDimensions();