use of net.coderbot.iris.Iris in project Iris by IrisShaders.
the class IrisSodiumOptions method createMaxShadowDistanceSlider.
public static OptionImpl<Options, Integer> createMaxShadowDistanceSlider(MinecraftOptionsStorage vanillaOpts) {
OptionImpl<Options, Integer> maxShadowDistanceSlider = OptionImpl.createBuilder(int.class, vanillaOpts).setName("Max Shadow Distance").setTooltip("The shadow render distance controls how far away terrain can potentially be rendered in the shadow pass. Lower distances mean that less terrain will be " + "rendered, improving frame rates. This option cannot be changed on packs which explicitly specify a shadow render distance. The actual shadow render distance is capped by the " + "View Distance setting.").setControl(option -> new SliderControl(option, 0, 32, 1, ControlValueFormatter.quantity("Chunks"))).setBinding((options, value) -> {
IrisVideoSettings.shadowDistance = value;
try {
Iris.getIrisConfig().save();
} catch (IOException e) {
e.printStackTrace();
}
}, options -> IrisVideoSettings.getOverriddenShadowDistance(IrisVideoSettings.shadowDistance)).setImpact(OptionImpact.HIGH).setEnabled(true).build();
((OptionImplExtended) maxShadowDistanceSlider).iris$dynamicallyEnable(IrisVideoSettings::isShadowDistanceSliderEnabled);
return maxShadowDistanceSlider;
}
Aggregations