WorldEdit

WorldEdit

43M Downloads

Area calculations should not overflow

octylFractal opened this issue ยท 1 comments

commented

Versions
WorldEdit version: 7.2.0-SNAPSHOT, #5003
Platform version: N/A

Describe the bug
Selecting a large enough area results in integer overflow in the area calculation, and a negative number being printed/returned for the area.

To Reproduce

  1. //pos1 0,0,0
  2. //pos2 10000,255,10000

Expected behavior
The area is listed next to the new position.

Note that adding this will require an API break, perhaps something we can mitigate by using a different name for the new function.

commented

This is as good a time as any to change getArea to getVolume to be accurate.