DailyStruggle / RTP

fun with spatial math
25 stars 6 forks source link

[BUG] Config maxY/minY get ignored. #41

Closed lolo45654 closed 2 weeks ago

lolo45654 commented 6 months ago

Describe the bug The vertical adjustor minY/maxY always use hardcoded values. I used a custom world generation of a desert where the terrain is at about y 260, which is higher than the hardcoded values.

Context Java version: Java 21 Server build: Purpur 2151 Server version: 1.20.4 Player version: 1.20.4 Plugins: Chunky, CommandAPI, F3NPerm, FastAsyncWorldEdit, FasterCrystals, GrimAC, LPC, LuckPerms, packetdelay, PersonalKits, RTP, spark, Terra, ViaBackwards, ViaVersion, voicechat

I compiled the plugin myself to find out what happened, changes made due to compile errors:

To Reproduce Steps to reproduce the behavior:

  1. Setup a server with Terra
  2. Add desert.zip to plugins/Terra/packs
  3. Modify bukkit.yml:
    worlds:
    world:
    generator: Terra:DUNE_DESERT
  4. Start the server with no changes made to the plugin / config and rtp (doesn't work)
  5. Start the server with maxY changed to 320 and rtp (still doesn't work)
  6. Start the server with the suggested changes below and maxY changed to 320, rtp (works fine)

Expected behavior Config should be respected

Screenshots -

Cause Region.java#L958

The map validY is being modified before the data changes, and is being used after the data changes. Moving the map changes to after data change, fixed it for me.

DailyStruggle commented 6 months ago

Given long term testing showing the settings working and the overall lack of utilization of "validY" since splitting the values, I find this to be an unlikely bug and solution, the assumptions here may be premature.

I'll run tests later to confirm the issue.