3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 18:40:05 +01:00

Made a few commands obey //toggleplace

Dieser Commit ist enthalten in:
Wizjany 2011-06-21 12:44:12 -04:00
Ursprung 0830eecd48
Commit 1aa08104b5
2 geänderte Dateien mit 7 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -532,7 +532,8 @@ public enum BlockType {
* @return * @return
*/ */
public static boolean canTransferRedstone(int id) { public static boolean canTransferRedstone(int id) {
return id == 75 // Redstone torch (off) return id == 27 // Powered rail
|| id == 75 // Redstone torch (off)
|| id == 76 // Redstone torch (on) || id == 76 // Redstone torch (on)
|| id == 55 // Redstone wire || id == 55 // Redstone wire
|| id == 93 // Diode (off) || id == 93 // Diode (off)

Datei anzeigen

@ -236,8 +236,9 @@ public class UtilityCommands {
to = we.getBlock(player, args.getString(2)); to = we.getBlock(player, args.getString(2));
} }
Vector min = player.getBlockIn().subtract(size, size, size); Vector base = session.getPlacementPosition(player);
Vector max = player.getBlockIn().add(size, size, size); Vector min = base.subtract(size, size, size);
Vector max = base.add(size, size, size);
Region region = new CuboidRegion(min, max); Region region = new CuboidRegion(min, max);
int affected = editSession.replaceBlocks(region, from, to); int affected = editSession.replaceBlocks(region, from, to);
@ -258,7 +259,7 @@ public class UtilityCommands {
int size = args.argsLength() > 0 ? Math.max(1, args.getInteger(0)) : 10; int size = args.argsLength() > 0 ? Math.max(1, args.getInteger(0)) : 10;
int affected = editSession.simulateSnow(player.getBlockIn(), size); int affected = editSession.simulateSnow(session.getPlacementPosition(player), size);
player.print(affected + " surfaces covered. Let it snow~"); player.print(affected + " surfaces covered. Let it snow~");
} }
@ -276,7 +277,7 @@ public class UtilityCommands {
int size = args.argsLength() > 0 ? Math.max(1, args.getInteger(0)) : 10; int size = args.argsLength() > 0 ? Math.max(1, args.getInteger(0)) : 10;
int affected = editSession.thaw(player.getBlockIn(), size); int affected = editSession.thaw(session.getPlacementPosition(player), size);
player.print(affected + " surfaces thawed."); player.print(affected + " surfaces thawed.");
} }