Skip to content
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

Only add marker after someone discovers structure #26

Open
ryantheleach opened this issue Jan 18, 2020 · 6 comments
Open

Only add marker after someone discovers structure #26

ryantheleach opened this issue Jan 18, 2020 · 6 comments

Comments

@ryantheleach
Copy link

ryantheleach commented Jan 18, 2020

Is your feature request related to a problem? Please describe.
I installed this and went to bed, expecting it to highlight farm locations for witches huts and ocean monuments and stuff, and couldn't get it working, when I woke up, it had started working and had revealed way way more then I was expecting, and anything that had been generated, not just discovered.

Describe the solution you'd like
I'd like the plugin to (be configured) to only show structures that had been entered or raided by players.

Describe alternatives you've considered
Turning problematic structures off in the config.

@jaz-on
Copy link

jaz-on commented Jul 29, 2020

+1 I installed it on my server today and it shows undiscovered places where people begin to rush!
It is however a very good plugin.

@KovuTheHusky
Copy link
Owner

The major issue with this is how to define and detect if/when a player discovers a structure. What does "discover" mean? Seeing it, being within a certain distance of it, entering it, opening a chest within it? Is it different for different types of structures? Each of these also presents varying levels of difficulty regarding implementation.

I understand why this feature is desirable and I'm interested in working on it, but I would greatly appreciate any thoughts on what "discovery" means to you.

@axipher
Copy link

axipher commented Jul 29, 2020

I'm not sure exactly how structures are tracked and listed.

I think "discovering" structures, you could just look at defining a basic radius around the center of the structure. So a Which Hut and a Woodland mansion would have different radii that would trigger a "discover".

For hidden structures like Strong Holds though, you probably could just a smaller radius if it could possible be centered on the End Portal. You run the small chance that a player can possible run/boat/fly right over top of it randomly, but arguably when you are that close, you would hear the sounds anyway.

Even for the surface structures, you could even use a slightly smaller radius as well then the physical foot print to only trigger the discovery once they've been inside of it.

Each type of structure would like have a defined default block radius, this could be part of config as well for servers that want full control.

The discovery-offset-percent could be a variable that just adjusts the radius as a percent:

  • negative value: requires players to step inside the structure
  • zero value: extends far enough to cover the whole outer structure
  • positive value: extends out from the structure so it gets discovered as players come near it

So either could shrink the defined radius by 15% to only "discover" it once a player has gotten pretty much inside the structure or increase it by 75% to discover it as a player just gets within a couple chunks of it.

Adding extra layers like "is it raided" or "has it been explored" or "has the end portal been activated" would create more complication then the majority of users of this are probably looking for.

@ryantheleach
Copy link
Author

Discovery to me, means triggering the advancement for entering a place. To use much else is pretty nebulous.

@ryantheleach
Copy link
Author

ryantheleach commented Aug 23, 2020

Mimicing vanilla behavior (for lack of an advancement trigger hook without creating a datapack), would probably be to run locateNearestStructure on the player with radius 1, every 20 ticks

reference:
https://www.spigotmc.org/threads/how-to-know-when-a-player-enters-a-structure.449789/#post-3868018

@devbaraus
Copy link

It could only show where the render has been generated or only structures around the player...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants