@Environment(value=CLIENT) public class DoubleOption extends Option
Modifier and Type | Field and Description |
---|---|
private BiFunction<GameOptions,DoubleOption,Text> |
displayStringGetter |
private Function<GameOptions,Double> |
getter |
protected double |
max |
protected double |
min |
private BiConsumer<GameOptions,Double> |
setter |
protected float |
step |
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, field_26924, FORCE_UNICODE_FONT, FOV, FOV_EFFECT_SCALE, FRAMERATE_LIMIT, FULLSCREEN, GAMMA, GRAPHICS, GUI_SCALE, 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 and Description |
---|
DoubleOption(String key,
double min,
double max,
float step,
Function<GameOptions,Double> getter,
BiConsumer<GameOptions,Double> setter,
BiFunction<GameOptions,DoubleOption,Text> displayStringGetter) |
Modifier and Type | Method and Description |
---|---|
private double |
adjust(double value) |
AbstractButtonWidget |
createButton(GameOptions options,
int x,
int y,
int width) |
double |
get(GameOptions options) |
Text |
getDisplayString(GameOptions options) |
double |
getMax() |
double |
getMin() |
double |
getRatio(double value) |
double |
getValue(double ratio) |
void |
set(GameOptions options,
double value) |
void |
setMax(float max) |
getDisplayPrefix, getGenericLabel, getGenericLabel, getPercentAdditionLabel, getPercentLabel, getPixelLabel, getTooltip, setTooltip
protected final float step
protected final double min
protected double max
private final Function<GameOptions,Double> getter
private final BiConsumer<GameOptions,Double> setter
private final BiFunction<GameOptions,DoubleOption,Text> displayStringGetter
public DoubleOption(String key, double min, double max, float step, Function<GameOptions,Double> getter, BiConsumer<GameOptions,Double> setter, BiFunction<GameOptions,DoubleOption,Text> displayStringGetter)
public AbstractButtonWidget createButton(GameOptions options, int x, int y, int width)
createButton
in class Option
public double getRatio(double value)
public double getValue(double ratio)
private double adjust(double value)
public double getMin()
public double getMax()
public void setMax(float max)
public void set(GameOptions options, double value)
public double get(GameOptions options)
public Text getDisplayString(GameOptions options)