Commit Graph

3 Commits

Author SHA1 Message Date
Nassim Jahnke e356a35aa7 Improve Gradle scripts
Don't create runnable platform jars anymore, since all they really do is increase build time. Also fix texts and Gradle deprecations. Also also publish common with its shadowed configuration, not the plain java components.
2023-11-06 14:31:44 +10:00
Nassim Jahnke cb2165eb93
Greatly reduce the number of (anonymous) inner classes
Reduces code complexity, and much more importantly, reduces the number of classes loaded at runtime by *hundreds*
2023-02-12 11:46:48 +01:00
KennyTV 104fa4e29f
Optimize protocol path finding
Not perfect, but better. This prevents the path checks from exponentially increasing (if it weren't for the maxProtocolPathSize fail safe).

By default, a path will never go to a protocol version that puts it farther from the desired server protocol version, even if a path existed.
Otherwise as well as previously, *all* possible paths will be checked until a fitting one is found.

Negative examples if the new boolean is set to true:
    A possible path from 3 to 5 in order of 3->10->5 will be dismissed.
    A possible path from 5 to 3 in order of 5->0->3 will be dismissed.

Negative examples if set to false:
    While searching for a path from 3 to 5, 3->2->1 could be checked first before 3->4->5 is found.
    While searching for a path from 5 to 3, 5->6->7 could be checked first before 5->4->3 is found.

Assuming custom platforms like Bedrock protocol use the normal registering methods, they will have to change the boolean to false to revert to previous behavior (tho still somewhat better optimized).
2021-06-01 18:54:36 +02:00