mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-11-21 01:13:09 +08:00
Fix queryRel for //deform and //brush deform
This commit is contained in:
parent
292dae65cb
commit
570ec87790
@ -2440,9 +2440,12 @@ public int deformRegion(final Region region, final Vector3 zero, final Vector3 u
|
||||
|
||||
final DoubleArrayList<BlockVector3, BaseBlock> queue = new DoubleArrayList<>(false);
|
||||
|
||||
for (BlockVector3 position : region) {
|
||||
for (BlockVector3 targetBlockPosition : region) {
|
||||
final Vector3 targetPosition = targetBlockPosition.toVector3();
|
||||
environment.setCurrentBlock(targetPosition);
|
||||
|
||||
// offset, scale
|
||||
final Vector3 scaled = position.toVector3().subtract(zero).divide(unit);
|
||||
final Vector3 scaled = targetPosition.subtract(zero).divide(unit);
|
||||
|
||||
// transform
|
||||
expression.evaluate(new double[]{ scaled.x(), scaled.y(), scaled.z() }, timeout);
|
||||
@ -2453,7 +2456,7 @@ public int deformRegion(final Region region, final Vector3 zero, final Vector3 u
|
||||
final BaseBlock material = world.getFullBlock(sourcePosition);
|
||||
|
||||
// queue operation
|
||||
queue.put(position, material);
|
||||
queue.put(targetBlockPosition, material);
|
||||
}
|
||||
|
||||
int affected = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user