Complex lists are not being saved
Kir-Antipov opened this issue ยท 2 comments
AutoConfig
is now part of the Cloth Config
library, but it seems that some old bugs are still here: shedaniel/AutoConfig#34, shedaniel/AutoConfig#12
When editing a List of custom objects as shown below, they get parsed correctly, but when editing them in the GUI config they are not saved.
private final List<PairOfInts> complexList = Arrays.asList(new PairOfInts(0, 1), new PairOfInts(3, 7));
private static class PairOfInts {
private int foo;
private int bar;
PairOfInts() {
this(1, 2);
}
PairOfInts(int foo, int bar) {
this.foo = foo;
this.bar = bar;
}
}
I just don't have the resources and time to figure out what went wrong with complex lists, lists in general is hard, with many quirks already in different serializers, jankson for example is very strict and requires you to set a mutable list for its default value, etc, etc.