mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Fixed //stack -s only shifting by 1 block, regardless of the selection size.
This commit is contained in:
parent
a5a761a126
commit
258bdc11b0
@ -290,9 +290,12 @@ public class RegionCommands {
|
||||
|
||||
if (args.hasFlag('s')) {
|
||||
try {
|
||||
Region region = session.getSelection(player.getWorld());
|
||||
region.expand(dir.multiply(count));
|
||||
region.contract(dir.multiply(count));
|
||||
final Region region = session.getSelection(player.getWorld());
|
||||
final Vector size = region.getMaximumPoint().subtract(region.getMinimumPoint());
|
||||
|
||||
final Vector shiftVector = dir.multiply(count * Math.abs(size.dot(size)));
|
||||
region.expand(shiftVector);
|
||||
region.contract(shiftVector);
|
||||
|
||||
session.getRegionSelector().learnChanges();
|
||||
session.getRegionSelector().explainRegionAdjust(player, session);
|
||||
|
Loading…
Reference in New Issue
Block a user