use of net.coderbot.iris.shaderpack.option.OptionSet in project Iris by IrisShaders.
the class Iris method queueDefaultShaderPackOptionValues.
// Used in favor of resetShaderPackOptions as the aforementioned requires the pack to be reloaded
public static void queueDefaultShaderPackOptionValues() {
clearShaderPackOptionQueue();
getCurrentPack().ifPresent(pack -> {
OptionSet options = pack.getShaderPackOptions().getOptionSet();
OptionValues values = pack.getShaderPackOptions().getOptionValues();
options.getStringOptions().forEach((key, mOpt) -> {
if (values.getStringValue(key).isPresent()) {
getShaderPackOptionQueue().put(key, mOpt.getOption().getDefaultValue());
}
});
options.getBooleanOptions().forEach((key, mOpt) -> {
if (values.getBooleanValue(key) != OptionalBoolean.DEFAULT) {
getShaderPackOptionQueue().put(key, Boolean.toString(mOpt.getOption().getDefaultValue()));
}
});
});
}
Aggregations