Package net.minecraft.client.option
Class DoubleOption
java.lang.Object
net.minecraft.client.option.Option
net.minecraft.client.option.DoubleOption
- Direct Known Subclasses:
FullScreenOption,LogarithmicOption
@Environment(CLIENT) public class DoubleOption extends Option
-
Field Summary
Fields Modifier and Type Field Description private BiFunction<GameOptions,DoubleOption,Text>displayStringGetterprivate Function<MinecraftClient,List<OrderedText>>field_27958private Function<GameOptions,Double>getterprotected doublemaxprotected doubleminprivate BiConsumer<GameOptions,Double>setterprotected floatstepFields inherited from class net.minecraft.client.option.Option
AO, ATTACK_INDICATOR, AUTO_JUMP, AUTO_SUGGESTIONS, BIOME_BLEND_RADIUS, CHAT_COLOR, CHAT_DELAY_INSTANT, CHAT_HEIGHT_FOCUSED, CHAT_LINE_SPACING, CHAT_LINKS, CHAT_LINKS_PROMPT, CHAT_OPACITY, CHAT_SCALE, CHAT_WIDTH, CLOUDS, DISCRETE_MOUSE_SCROLL, DISTORTION_EFFECT_SCALE, ENTITY_DISTANCE_SCALING, ENTITY_SHADOWS, FORCE_UNICODE_FONT, FOV, FOV_EFFECT_SCALE, FRAMERATE_LIMIT, FULLSCREEN, GAMMA, GRAPHICS, GUI_SCALE, HIDE_MATCHED_NAMES, INVERT_MOUSE, MAIN_HAND, MIPMAP_LEVELS, MOUSE_WHEEL_SENSITIVITY, NARRATOR, PARTICLES, RAW_MOUSE_INPUT, REALMS_NOTIFICATIONS, REDUCED_DEBUG_INFO, RENDER_DISTANCE, SATURATION, SENSITIVITY, SNEAK_TOGGLED, SNOOPER, SPRINT_TOGGLED, SUBTITLES, TEXT_BACKGROUND, TEXT_BACKGROUND_OPACITY, TOUCHSCREEN, VIEW_BOBBING, VISIBILITY, VSYNC -
Constructor Summary
Constructors Constructor Description DoubleOption(String key, double min, double max, float step, Function<GameOptions,Double> getter, BiConsumer<GameOptions,Double> setter, BiFunction<GameOptions,DoubleOption,Text> displayStringGetter)DoubleOption(String key, double min, double max, float step, Function<GameOptions,Double> getter, BiConsumer<GameOptions,Double> setter, BiFunction<GameOptions,DoubleOption,Text> displayStringGetter, Function<MinecraftClient,List<OrderedText>> function) -
Method Summary
Modifier and Type Method Description private doubleadjust(double value)AbstractButtonWidgetcreateButton(GameOptions options, int x, int y, int width)doubleget(GameOptions options)TextgetDisplayString(GameOptions options)doublegetMax()doublegetMin()doublegetRatio(double value)doublegetValue(double ratio)voidset(GameOptions options, double value)voidsetMax(float max)Methods inherited from class net.minecraft.client.option.Option
getDisplayPrefix, getGenericLabel, getGenericLabel, getPercentAdditionLabel, getPercentLabel, getPixelLabel
-
Field Details
-
step
protected final float step -
min
protected final double min -
max
protected double max -
getter
-
setter
-
displayStringGetter
-
field_27958
-
-
Constructor Details
-
DoubleOption
public DoubleOption(String key, double min, double max, float step, Function<GameOptions,Double> getter, BiConsumer<GameOptions,Double> setter, BiFunction<GameOptions,DoubleOption,Text> displayStringGetter, Function<MinecraftClient,List<OrderedText>> function) -
DoubleOption
public DoubleOption(String key, double min, double max, float step, Function<GameOptions,Double> getter, BiConsumer<GameOptions,Double> setter, BiFunction<GameOptions,DoubleOption,Text> displayStringGetter)
-
-
Method Details
-
createButton
- Specified by:
createButtonin classOption
-
getRatio
public double getRatio(double value) -
getValue
public double getValue(double ratio) -
adjust
private double adjust(double value) -
getMin
public double getMin() -
getMax
public double getMax() -
setMax
public void setMax(float max) -
set
-
get
-
getDisplayString
-