-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A prototype that makes Nature's Compass worse :D #63
base: forge-1.12.2
Are you sure you want to change the base?
A prototype that makes Nature's Compass worse :D #63
Conversation
RenderUtils.drawConfiguredStringOnHUD(I18n.format("string.naturescompass.coordinates"), 5, 5, 0xFFFFFF, 6); | ||
RenderUtils.drawConfiguredStringOnHUD(compass.getFoundBiomeX(stack) + ", " + compass.getFoundBiomeZ(stack), 5, 5, 0xAAAAAA, 7); | ||
|
||
RenderUtils.drawConfiguredStringOnHUD(I18n.format("string.naturescompass.distance"), 5, 5, 0xFFFFFF, 9); | ||
RenderUtils.drawConfiguredStringOnHUD(String.valueOf(BiomeUtils.getDistanceToBiome(player, compass.getFoundBiomeX(stack), compass.getFoundBiomeZ(stack))), 5, 5, 0xAAAAAA, 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No no no, too helpful!
sortingCategory = sortingCategory.next(); | ||
sortByButton.displayString = I18n.format("string.naturescompass.sortBy") + ": " + sortingCategory.getLocalizedName(); | ||
selectionList.refreshList(); | ||
} else if (button == searchRadiusButton) { | ||
searchRadius = searchRadius.next(); | ||
searchRadiusButton.displayString = I18n.format("string.naturescompass.searchRadius") + ": " + searchRadius.getLocalizedName(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I loved this next
interface. Much nicer than inline maths.
((ItemNaturesCompass) stack.getItem()).setFound(stack, x, z, samples, player); | ||
((ItemNaturesCompass) stack.getItem()).setFound(stack, x, z, samples, maxDistance, player); | ||
} else { | ||
NaturesCompass.logger.info("Search failed: " + getRadius() + " radius, " + samples + " samples"); | ||
((ItemNaturesCompass) stack.getItem()).setNotFound(stack, player, getRadius(), samples); | ||
((ItemNaturesCompass) stack.getItem()).setNotFound(stack, player, maxDistance, samples); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than reporting the actual distance searched (since you could use that to triangulate) we just parrot back the requested radius.
@@ -0,0 +1,26 @@ | |||
package com.chaosthedude.naturescompass.util; | |||
|
|||
public class SearchRadius { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it would be cute to use powers of 2
If the radius of the search is really big, it is not fun to have to guess which direction to go. So the Compass will tell you a cardinal direction and give you a milestone about half-way. Other changes to language are included
@MattCzyr do you plan to merge this at some point? Or is this more like a troll pull? |
Go ahead and close it. It's not a troll, we use this on our server instead of the vanilla nature's compass, but if there's no interest in it then it's just clutter. Thanks! |
Oh yeah I added the hint thing. It's cool, when the biome you seek is really far out the compass says "the biome you seek is to the north, past the mountains" or something like that. It samples the biome half way and adds that as a clue. |
Oh and I changed the compass to point north all the time :D it's been a while since I touched this. |
Sounds interesting, but wouldn't it be wiser to have this optional perhaps? Knowing more what this does, i think it's a good PR and should be considered to be merged! |
Hey hey, I modded your mod for a private modpack and I thought you might appreciate it. If you like this idea, then consider this a prototype and I will make it into a config option for you. If you do not like it, then close this PR and think of it as a friendly joke ;)
Motivation:
My buddy spent like 6 hours searching for a Mystic Grove. This made me feel a mix of emotions:
All of this combined into my brain to form: Nature's Scanner
Nature's Scanner is modelled after Scanning in Eve Online. You hold the scanner in your hand and choose a biome to search for as normal. Then you dial in a radius to search in, and scan. In short order the scanner tells you whether your desired biome exists in the radius... and that's all. No direction, no distance, no coords.
A casual scanner, like my friend, can then use it to at least validate their search. He can search for Mystic Grove at the max radius (2^13) and at least know that it's out there. He can periodically get a sense of whether he's going in the right direction by scanning again.
For the professional scanner, this device lets you zero in on the biome but requires that you move, and take additional measurements. The journey to find a rare biome will still be long and arduous... but it will terminate in a finite number of steps.
Thanks everyone! Let me know what you think ;)