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

Configurable Cache for NetherPortalSearcher.java #37

Open
thojo0 opened this issue Feb 14, 2023 · 7 comments
Open

Configurable Cache for NetherPortalSearcher.java #37

thojo0 opened this issue Feb 14, 2023 · 7 comments

Comments

@thojo0
Copy link

thojo0 commented Feb 14, 2023

A world specific configuration to enable/disable/change the cache lifetime + cache search range would be nice.

So basicly:

@bergerkiller
Copy link
Member

I don't really see the use of making these things configurable. Is there a measurable reason to do so? Keep in mind that for actual searching, it defers to Minecraft servers own search, for which paper's (per-world) portal search configuration already applies.

Searching for portals also isn't as laggy as it used to be, as nowadays that information is tracked in the POI (point of interest) files.

@bergerkiller
Copy link
Member

The LOAD_LIFETIME might be interesting to make configurable I guess, as it reduces the number of times the chunk area in the nether/overworld load and unload as people come and go.

@thojo0
Copy link
Author

thojo0 commented Feb 15, 2023

First of all, I'm the opinion to make thinks configurable if posible.

But I try to explain what is the problem for me:
If you link 2 worlds by netherportal-linking it is posible that you exit on the wrong portal.
This is a problem in classic portal chunk loader setups.

Steps to reproduce:

  1. Enter red portal in overworld
  2. Go through any portal back (both working fine from nether->overworld)
  3. Enter green portal in overworld in the next 5 seconds
  4. You will exit the red portal in the nether
  5. (You can repeat this with the other way arround to)

2023-02-15_09 14 08
2023-02-15_09 14 23

@bergerkiller
Copy link
Member

I see, feels more like I need to get rid of that 32x4x32 way of caching entirely then. I'll have to fix that as using portals like this is common for nether-hub systems.

@thojo0 thojo0 changed the title Configurable Cache fore NetherPortalSearcher.java Configurable Cache for NetherPortalSearcher.java Feb 15, 2023
@thojo0
Copy link
Author

thojo0 commented Jul 16, 2024

Is this still in doing and planed or whats the current state?

@bergerkiller
Copy link
Member

oh, I kinda forgot. One sec

@bergerkiller
Copy link
Member

https://ci.mg-dev.eu/job/MyWorlds/304/

Adds a config.yml option:

# MyWorlds caches destinations for portals frequently entered to minimize lag
# When a portal block is activated near to a previously activated one, search results are reused
# The width and height control the sensitivity of matching these results
# If a wrong portal is entered because of this, you can lower these values to fix that
portalSearchMatchRadius:
  width: 32
  height: 4

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

No branches or pull requests

2 participants