Skip to content
Permalink
Browse files

Merge pull request #528 from Pieter12345/master

Fix stack command diagonal shifting with -s flag
  • Loading branch information
octylFractal committed Oct 29, 2019
2 parents 21f3d96 + bf3b91a commit 94bdd7678d4540e2b381f57e3b4a8ccc44a9f338
Showing with 2 additions and 2 deletions.
  1. +2 −2 worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java
@@ -373,9 +373,9 @@ public int stack(Actor actor, World world, EditSession editSession, LocalSession

if (moveSelection) {
try {
final BlockVector3 size = region.getMaximumPoint().subtract(region.getMinimumPoint());
final BlockVector3 size = region.getMaximumPoint().subtract(region.getMinimumPoint()).add(1, 1, 1);

final BlockVector3 shiftVector = direction.toVector3().multiply(count * (Math.abs(direction.dot(size)) + 1)).toBlockPoint();
final BlockVector3 shiftVector = direction.multiply(size).multiply(count);
region.shift(shiftVector);

session.getRegionSelector(world).learnChanges();

0 comments on commit 94bdd76

Please sign in to comment.
You can’t perform that action at this time.