[Bug]: Structure Compass does not respect the configured search range limit.
JustAnotherGhostName opened this issue ยท 14 comments
General Info
- I am running a modpack
- I can reproduce this issue consistently in single-player
- I can reproduce this issue consistently in multi-player
- I have searched for this issue previously and it was either (1) not previously reported, or (2) previously fixed and I am having the same problem.
- I am crashing and can provide my crash report(s)
- I am using the latest version of the mod
Forge version
43.1.55
Mod version
1.3.5
Java version
Java 17.0.5
Issue Description
The structure compass currently does not respect the configured range limit. This is tested in ATM8 version 1.0.7. This is mostly observed with the Ancient Pyramid structure from All The Modium, however, I am assuming it does the same for other structures. This issue just happens to be observed more often with looking for the ancient pyramid as that's what everyone is using the compass for.
Currently, it is configured to do 2500 blocks away from the compass, however, the compass tends to keep searching going as far as 30k blocks out to find a structure, past the world border. This causes a MASSIVE lag spike on a server which times everyone out. What makes matters worse is that when you do the /locate structure allthemodium:ancient_pyramid
command, it will accurately find the nearest structure which may be only 2k blocks out.
Additional Information
No specific images or logs to show, just that when its used there is a high chance that most people on the server will time out because its searching for something 30k+ blocks away.
Ah, I did not notice that. I assumed it was in blocks since it was not indicated in the config if its in chunks or blocks. My apologies, I will adjust it then confirm.
It will try to locate a structure within 300 chunks by default, this can be changed in the config.
(From the curse description)
To be honest, I originally guessed it was blocks, but someone in my discord found out it's in chunks so I adjusted the description of the mod from blocks to chunks
Just know it also counts the chunk you're in, so if you were to set it to 4 it limits it to <80 ish, etc etc
I should probably add a max value for the config as to not allow searching too far away
That is good to know, thank you for pointing that out. I think it might be an issue though that the locate command was locating the nearest structure better though? Not sure why locate could detect the structure 2k blocks out, but the compass found one 30k blocks out.
Update:
Tested on my server with it decreased to 180 chunks (so should be 2,880 blocks) and everyone timed out. Upon joining back, its pointing to a structure 35,278 blocks away. It seems that besides misunderstanding the config, it still is an issue.
I also want to note that my server has a world border at 30k, so you cant go out more than 15k in any direction centered on 0 0, and I did this test centered on 0 0. It would occur regardless though of me being at 0 0 or not.
Are you sure you restarted the server when changing the config?
Else there's not much I can do. All I do is call a vanilla function, the same one that's called when doing a /locate
command but with a different distance value.
If I want to completely fix all issues I'd have to write my own method for gathering structures, which would take me weeks to do
I can confirm the server was restarted when updating the config, I waited for my servers scheduled 6 hour restarts to change the config, and confirmed that the file was in fact saved before the restart.
A new jar has been uploaded (1.4.0) that changes the method of finding structures and changes it to directly use compassRange
The config option has been changed to represent the distance in blocks
Apologies for the late update, this week has been unexpectedly busy for me. I updated to 1.4.0, and have the default configs. See here:
So, it appears what causes the insane spikes is specifically when "locateUnexplored" is set to true. It is nearly instant when it is set to false as default.
I should be able to unban the item now with this update and have locateUnexplored off. My server has rtp's, and the main structure in question still spawns the main mob people are looking for after it was explored.