mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-15 23:26:33 +01:00
*
This commit is contained in:
parent
fb444ad5c4
commit
7d24236dfe
@ -88,9 +88,9 @@ public class BlockTransformExtent extends ResettableExtent {
|
|||||||
if (direction != null) {
|
if (direction != null) {
|
||||||
Vector applyAbsolute = transform.apply(direction.toVector());
|
Vector applyAbsolute = transform.apply(direction.toVector());
|
||||||
Vector applyOrigin = transform.apply(Vector.ZERO);
|
Vector applyOrigin = transform.apply(Vector.ZERO);
|
||||||
applyAbsolute.mutX(applyAbsolute.getBlockX() - applyOrigin.getBlockX());
|
applyAbsolute.mutX(applyAbsolute.getX() - applyOrigin.getX());
|
||||||
applyAbsolute.mutY(applyAbsolute.getBlockY() - applyOrigin.getBlockY());
|
applyAbsolute.mutY(applyAbsolute.getY() - applyOrigin.getY());
|
||||||
applyAbsolute.mutZ(applyAbsolute.getBlockZ() - applyOrigin.getBlockZ());
|
applyAbsolute.mutZ(applyAbsolute.getZ() - applyOrigin.getZ());
|
||||||
|
|
||||||
Direction newDirection = Direction.findClosest(applyAbsolute, Direction.Flag.CARDINAL | Direction.Flag.ORDINAL | Direction.Flag.SECONDARY_ORDINAL);
|
Direction newDirection = Direction.findClosest(applyAbsolute, Direction.Flag.CARDINAL | Direction.Flag.ORDINAL | Direction.Flag.SECONDARY_ORDINAL);
|
||||||
|
|
||||||
@ -117,9 +117,9 @@ public class BlockTransformExtent extends ResettableExtent {
|
|||||||
if (direction != null) {
|
if (direction != null) {
|
||||||
Vector applyAbsolute = transformInverse.apply(direction.toVector());
|
Vector applyAbsolute = transformInverse.apply(direction.toVector());
|
||||||
Vector applyOrigin = transformInverse.apply(Vector.ZERO);
|
Vector applyOrigin = transformInverse.apply(Vector.ZERO);
|
||||||
applyAbsolute.mutX(applyAbsolute.getBlockX() - applyOrigin.getBlockX());
|
applyAbsolute.mutX(applyAbsolute.getX() - applyOrigin.getX());
|
||||||
applyAbsolute.mutY(applyAbsolute.getBlockY() - applyOrigin.getBlockY());
|
applyAbsolute.mutY(applyAbsolute.getY() - applyOrigin.getY());
|
||||||
applyAbsolute.mutZ(applyAbsolute.getBlockZ() - applyOrigin.getBlockZ());
|
applyAbsolute.mutZ(applyAbsolute.getZ() - applyOrigin.getZ());
|
||||||
|
|
||||||
Direction newDirection = Direction.findClosest(applyAbsolute, Direction.Flag.CARDINAL | Direction.Flag.ORDINAL | Direction.Flag.SECONDARY_ORDINAL);
|
Direction newDirection = Direction.findClosest(applyAbsolute, Direction.Flag.CARDINAL | Direction.Flag.ORDINAL | Direction.Flag.SECONDARY_ORDINAL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user