Building Gadgets

Building Gadgets

100M Downloads

When selecting a area that's way too large, the server will be frozen until calculations are done

Satherov opened this issue ยท 1 comments

commented

Building Gadgets Version
1.0.7

Describe the bug
When you select an area that is way way too large for anything sensible, the game will try to calculate said area and only after it's done, come to the the conclusion that the area selected is too large.

To Reproduce

  • get a copy paste gadget
  • set position 1
  • tp 100k+ blocks away
  • set position 2
  • game will freeze until the area has been calculated

Expected behavior
I think the calcuation should be stopped upon realizing that the area is too large to prevent the game from freezing

Screenshots
image

Log Files
Unfortunately, I'm playing on a server and do not have access to any logs. Client logs don't say anything besides "area too large"

Potential Fix
Without looking at your Code, I think there is a rather simple solution to this issue. Just compare the first and second coordinate and if the area in-between is too large, don't try to calculate anything and immediately return and display the "area too large" message

commented

This should be fixed in newer versions