Skip to content

Conversation

@tintinkung
Copy link
Contributor

Support for all Terra server y level

if (plotHeight < MIN_WORLD_HEIGHT) throw new IOException("Plot height is not supported");

  • Fix fatal exception for plots below MIN_WORLD_HEIGHT by clamping height to 0

  • Previously, any plot saved with a Y level below MIN_WORLD_HEIGHT caused a fatal exception, making it impossible to generate. This is fixed by snapping out-of-bound plots to MIN_WORLD_HEIGHT, therefore getWorldHeight() returns 0 in such cases.

  • Alternatively, getWorldHeight() could directly return 0 to prevent the issue.


dev notes:

  • This is a very simple fix perhaps this pr wont even need to get merge, just decide it when you guys want to fix this bug.
  • I just finished setting up asean bte plot server for 1.21 and this issue has always been here, better if this get fix to main repo some day.
  • I tested the plot pasting mechanism and this fix would get handled by PlotUtil code very well i dont see any concerning bug at all.
  • ⚠️ one bug i saw is an edge case where a plot is saved at the lowest build limit, then plot schematic and environment schematic doesnt get paste of the same level.
  • this also fixes opening issue here: [Bug] - Plots are useless when height is below zero  #123 [Bug] - [23:06:33 ERROR]: An error occurred while generating plot! #109

* Fix fatal exception for plots below MIN_WORLD_HEIGHT by clamping height to 0

* Previously, any plot saved with a Y level below MIN_WORLD_HEIGHT caused a fatal exception, making it impossible to generate. This is fixed by snapping out-of-bound plots to MIN_WORLD_HEIGHT, ensuring getWorldHeight() returns 0 in such cases. 

* Alternatively, getWorldHeight() could directly return 0 to prevent the issue."
Copy link
Member

@Cinnazeyy Cinnazeyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great job! :)

@Cinnazeyy Cinnazeyy merged commit caaf702 into AlpsBTE:main Apr 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants