Skip to content

Commit

Permalink
Merge pull request #528 from Pieter12345/master
Browse files Browse the repository at this point in the history
Fix stack command diagonal shifting with -s flag
  • Loading branch information
octylFractal committed Oct 29, 2019
2 parents 21f3d96 + bf3b91a commit 94bdd76
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -373,9 +373,9 @@ public int stack(Actor actor, World world, EditSession editSession, LocalSession


if (moveSelection) { if (moveSelection) {
try { 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); region.shift(shiftVector);


session.getRegionSelector(world).learnChanges(); session.getRegionSelector(world).learnChanges();
Expand Down

0 comments on commit 94bdd76

Please sign in to comment.