3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 02:20:07 +01:00

Fix long-range build tool.

Blocks were always placed around 0,0,0 since the trace direction was being used as a position.
Also the message was backwards.
Dieser Commit ist enthalten in:
wizjany 2019-02-03 19:27:30 -05:00
Ursprung f3ec5bbdde
Commit dddf2b963a
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -205,7 +205,7 @@ public class ToolCommands {
if (secondary instanceof BlockPattern) { if (secondary instanceof BlockPattern) {
secondaryName = ((BlockPattern) secondary).getBlock().getBlockType().getName(); secondaryName = ((BlockPattern) secondary).getBlock().getBlockType().getName();
} }
player.print("Left-click set to " + secondaryName + "; right-click set to " player.print("Left-click set to " + primaryName + "; right-click set to "
+ primaryName + "."); + secondaryName + ".");
} }
} }

Datei anzeigen

@ -61,7 +61,7 @@ public class LongRangeBuildTool extends BrushTool implements DoubleActionTraceTo
if (applied.getBlockType().getMaterial().isAir()) { if (applied.getBlockType().getMaterial().isAir()) {
eS.setBlock(blockPoint, secondary); eS.setBlock(blockPoint, secondary);
} else { } else {
eS.setBlock(pos.getDirection().toBlockPoint(), secondary); eS.setBlock(pos.toVector().subtract(pos.getDirection()).toBlockPoint(), secondary);
} }
return true; return true;
} catch (MaxChangedBlocksException e) { } catch (MaxChangedBlocksException e) {
@ -82,7 +82,7 @@ public class LongRangeBuildTool extends BrushTool implements DoubleActionTraceTo
if (applied.getBlockType().getMaterial().isAir()) { if (applied.getBlockType().getMaterial().isAir()) {
eS.setBlock(blockPoint, primary); eS.setBlock(blockPoint, primary);
} else { } else {
eS.setBlock(pos.getDirection().toBlockPoint(), primary); eS.setBlock(pos.toVector().subtract(pos.getDirection()).toBlockPoint(), primary);
} }
return true; return true;
} catch (MaxChangedBlocksException e) { } catch (MaxChangedBlocksException e) {