[Finder Compass] [1.18] Does not work at y<=0
RtHiaHB opened this issue ยท 8 comments
If you go below 0 in 1.18, the finder compass stops working.
The y-coordinate in this screenshot is -59. There is an iron ore directly in front of me, and my compass is in my off-hand, and I confirmed that it was in Workman's Mineables mode. The off-white needle isn't showing.
Here, the y-coordinate is 16; everything else in this setup is exactly the same, but I get a different result.
Yes, there is a hardcoded limit to y>0 in the implementation. I was not aware it is possible for world to exist lower than that. Is that modded?
I checked my code and i did not in fact hard code this, but it is in the default compass settings.
There is a DimensionDefaults that says Overworld goes to 384 now.
Example from findercompass.cfg:
"{\"block\":\"minecraft:gold_ore\"}": [245,245,0,15,1,1,100,0],
values: color R, color G, color B, xz searchrange, y searchrange, min y, max y, searchEvery15SecOnly
So, min y and max y need to be adapted. Fixed example:
"{\"block\":\"minecraft:gold_ore\"}": [245,245,0,15,1,-64,384,0],
I will change the config defaults in my code.
6dd0acd the adjusted defaults are commited, and a new version pushed to curse
Oops, used 320 in there. Ah it'll be fine. I doubt the overworld actually has ores in these lofty heights.
Aha! I've figured it out. All ores now have a deepslate variant: there is the iron_ore we all know and love, but there is now also "deepslate_iron_ore", too. Below y=0, there are no legacy stone-type ores; all of them are the deepslate variant. That means that every entry in the config file also needs to list a deepslate variant of the respective ore. For example, the following lines would need to be added to the config file for Workman's Mineables:
"{\"block\":\"minecraft:deepslate_iron_ore\"}": [
112,
112,
112,
15,
1,
-63,
320,
0
],
"{\"block\":\"minecraft:deepslate_gold_ore\"}": [
245,
245,
0,
15,
1,
-63,
320,
0
],
"{\"block\":\"minecraft:deepslate_copper_ore\"}": [
141,
83,
46,
15,
1,
-63,
320,
0
],
"{\"block\":\"minecraft:deepslate_coal_ore\"}": [
51,
26,
0,
15,
1,
-63,
320,
0
]
This will solve the problem completely. I have tested this and it works.
OK so here is a picture that actually shows where ores can occur now: https://static.wikia.nocookie.net/minecraft_gamepedia/images/e/e3/1-18-ore-distribution.jpg and ores found below y=0 are the deepslate variants.
Rather than keeping up with updates, i will change the config defaults to -64 to 0 for all deepslate ores and 0 to 384 for classic ores. Even knowing that diamond should not appear at y>16 .... because i really do not want to update this every patch.
OK, tested it myself and it works fine. Commited to curse... 82ecd85