Comments (3)
Due to type erasure, Configured does it's best to guess which type it is. For an empty list, it relies on the element validator to determine the type. If you simply return true in the element validator, Configured will assume it's the correct value. It just happens to be that Boolean is the first value tested. Basically ensure you have a strong element validator.
from configured.
Thanks for responding on Christmas Day!
But as I said in bottom of the first comment, the element validator doesn't exactly work here.
Here are more examples I tried using the element validator:
ConfigValue<List<? extends Integer>> emptyIntConfig1 = builder.defineList("empty int list 1", Arrays.<Integer> asList(), obj -> obj instanceof Integer);
ConfigValue<List<? extends Integer>> emptyIntConfig2 = builder.defineList("empty int list 2", Arrays.asList(), (obj) -> { try { Integer.parseInt(obj.toString()); return true; } catch (NumberFormatException excep) { return false; } });
ConfigValue<List<? extends String>> emptyStrConfig = builder.defineList("empty string list", new ArrayList<String>(), obj -> obj instanceof String);
None of these config options allow me to add values to the lists in the Configured GUI. On the Add... screen, the text I type turns red, and the Done button can't be pressed, no matter what I type.
from configured.
Fixed issue in e8c64d0
As for the config value defined in the steps, refer to my previous reply.
from configured.
Related Issues (20)
- Latest version for 1.20.1 not working, crash when try to open game HOT 2
- [1.20.1][Forge] Config files not separated by mod. HOT 2
- crash minecraft HOT 2
- crash on launch 1.20.1 Fabric HOT 3
- Crash with night config fixes on 1.18.2 HOT 1
- Cant see the text from the controls menu.
- Jei not see configured fabric 1.20.1
- [Suggestion]: Button to open config file.
- Modrinth Upload
- JEI 1.20.4 fabric doesnt see "configured" and ask to download it HOT 3
- How do I even open the Configuration menu on 1.20.1? HOT 2
- {missing upload} ver 1.20.2 HOT 1
- [Bug] Fabric 1.20.1 semi-working HOT 1
- Can't find button to open configured in any screen.
- "configured" button isnt there in title screen or options HOT 4
- Configured 2.2.3 (Forge 1.20.1) crashes at start HOT 1
- Crash when saving new configuration on Minecraft 1.21 / Neoforge 21.0.61 beta
- [1.21] [Neoforge] Crash on launch HOT 10
- 1.20.1 crash when changing config
- Not working at all in 1.21 [fabric] :( HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from configured.