SteamWar/BauSystem
Archiviert
13
0

Merge remote-tracking branch 'origin/ProtectUpgrade' into ProtectUpgrade

Dieser Commit ist enthalten in:
yoyosource 2021-04-09 20:36:42 +02:00
Commit 6453ec6616
2 geänderte Dateien mit 10 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -30,6 +30,7 @@ import com.sk89q.worldedit.function.operation.Operations;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.math.transform.AffineTransform;
import com.sk89q.worldedit.session.ClipboardHolder;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockType;
import com.sk89q.worldedit.world.block.BlockTypes;
import java.io.File;
@ -84,17 +85,18 @@ class Region_15 {
for (int y = 0; y < clipboard.getDimensions().getY(); y++) {
for (int z = 0; z < clipboard.getDimensions().getZ(); z++) {
BlockVector3 blockPointer = clipboard.getMinimumPoint().add(x, y, z);
clipboard.setBlock(blockPointer, mapColor(clipboard.getFullBlock(blockPointer).getBlockType(), color).getDefaultState().toBaseBlock());
BaseBlock baseBlock = clipboard.getFullBlock(blockPointer);
BlockType blockType = baseBlock.getBlockType();
if (blockType != BlockTypes.YELLOW_CONCRETE && blockType != BlockTypes.YELLOW_STAINED_GLASS) {
continue;
}
clipboard.setBlock(blockPointer, mapColor(blockType, color).getDefaultState().toBaseBlock());
}
}
}
}
private static BlockType mapColor(BlockType original, Color color) {
if (original != BlockTypes.YELLOW_CONCRETE && original != BlockTypes.YELLOW_STAINED_GLASS) {
return original;
}
switch (color) {
case WHITE:
if (original == BlockTypes.YELLOW_CONCRETE) {

Datei anzeigen

@ -151,6 +151,9 @@ public class Prototype {
if (schem == null) {
return paste(new File(schematic), x, y, z, rotate, ignoreAir, color);
} else {
if (schem.getSchemType().fightType() || schem.getSchemType().check()) {
return paste(schem.load(), x, y, z, !rotate, ignoreAir, color);
}
return paste(schem.load(), x, y, z, rotate, ignoreAir, color);
}
}