Skip to content

Commit

Permalink
Merge branch 'EngineHub:version/7.3.x' into version/7.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Euphillya authored Jul 21, 2024
2 parents 80c6d3b + 9fae677 commit 818c135
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 818c135

Please sign in to comment.