Closed kmecpp closed 3 years ago
Thank you for your pull request, I was hesitant about adding it myself as I don't understand how it works. Please may you explain it, specifically the (a, b) -> true
portion? I find it tricky to wrap my head around the multiple nested lambdas of Forge's extension points. :/
The code is just copied directly from https://mcforge.readthedocs.io/en/latest/concepts/sides/#writing-one-sided-mods which also has an okay description of what it does.
The DISPLAYTEST extension point explains lambdas in a little more detail
/**
* Compatibility display test for the mod.
* Used for displaying compatibility with remote servers with the same mod, and on disk saves.
*
* The supplier provides my "local" version for sending across the network or writing to disk
* The predicate tests the version from a remote instance or save for acceptability (Boolean is true for network, false for local save)
*/
public static final ExtensionPoint<Pair<Supplier<String>, BiPredicate<String, Boolean>>> DISPLAYTEST = new ExtensionPoint<>();
Fixes this with the mod installed only on the client