Use immutable collections for settings
Using an ImmutableSet seems to be faster according to this benchmark, but that would either require a breaking API change or improperly making the settings ImmutableSets while exposing only their list views (i.e. lists that behave as ordered sets, which currently works because we only use them as ordered sets).
Seems like this would really help with #3479. Are there any downsides?
Also I don't care about breaking API changes as long as impact client isn't affected 😈 (joke) (but only sorta)
Others can still put in their own implementations like
BaritoneAPI.getSettings().acceptableThrowawayItems.value = new ArrayList<>();
// some time later
BaritoneAPI.getSettings().acceptableThrowawayItems.value.add(net.minecraft.init.Blocks.DIAMOND_BLOCK);
or even the unrealistic
BaritoneAPI.getSettings().acceptableThrowawayItems.value = new MyCursedListThatRandomlyRepopulatesOnEveryAccess<>();
which both screw up the caching and in the latter case even the current implementation. Apart from that there's nothing coming to my mind.
Is any of those scenarios or something else holding this back?