-
Notifications
You must be signed in to change notification settings - Fork 17
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
Limit Jar network to pairs only #29
base: master
Are you sure you want to change the base?
Conversation
This gives a good overview: That's a single player using them excessively in their setup |
Refactor Mirrored Jars to only trade in pairs, massively enhancing performance. Also fixes Jar labels being lost on placement
Pairing of jars always results into a new network, regardless of existing connections either jar had. Networks in overcapacity will simply disconnect jars past the last valid connection rather than all its jars.
I object to this PR, I get what you’re trying to do, but if performance is the issue, we need to look into the specifics of why, instead of massive nerfs that just crutch the issue. |
EDIT: no it doesn't, but if sorting is the problem maybe try a sorted collection. I'd assume the network rarely updates so it doesn't need to be sorted once per tick |
Sorting the list keeps the level of all jars equal. This is a cause of a major TPS lag. My rework gets rid of it without losing its main functionality (which stays true to the original concept as mirrors work in pairs). The fix already benefits its intended playerbase so whether the GTNH team adopts it or not is of no relevance to me. I won't volunteer my time and lose myself in a process that does not benefit me but hope my PR inspires you to take matters on to your own hand.
|
Refactored Mirrored Jars.
Jar Network capacity is now capped at 2, to trade only in pairs, significantly improving performance.
These jars will function exactly as expected as TC4 mirrors can only be paired.
It's important to note that this PR is a nerf, as Mirrored Jars Networks currently can hold infinite Mirrored Jars which will degrade performance massively relative to the network's size.
The existing mechanism continuously sorts an ArrayList of all jars to find those with the most and least essentia.
After transferring 1 Essentia, it restarts the entire process, causing substantial lag and being terribly inefficiency.
Fixes:
GTNewHorizons/GT-New-Horizons-Modpack#8724
Extra: Jar labels are no longer lost on placement.
Fixes:
GTNewHorizons/GT-New-Horizons-Modpack#4942 (It wasn't fixed)