Package dev.myriadclient.api.setting
@NullMarked
package dev.myriadclient.api.setting
Settings: typed, saved values grouped per module or panel, with the builders to declare them and
SavedSettings to migrate them across versions.-
ClassDescriptionA button: clicking it in the settings window, or setting it from a command with any value, runs its action on the render thread.Builds an
ActionSetting.A block position: an anchor, a schematic origin, a home.Builds aBlockPosSetting;0 0 0by default.On or off, shown as a checkbox.Builds aBoolSetting; off by default.One of a list of names that's only known at runtime (schematic files, kits, profiles), shown as a dropdown.Builds aChoiceSetting; empty (nothing chosen) by default.A colour: a fixed ARGB colour, a rainbow, or a theme role that follows the theme (seeSettingColor), with a picker.Builds aColorSetting; opaque white by default.A number with decimals, set with a slider or typed into a box (DoubleSetting.Builder.typed()).Builds aDoubleSetting; 0, unbounded and 2 decimals by default.EnumSetSetting<E extends Enum<E>>Any number of an enum's constants ("which of these"): sound kinds to block, what to notify about, which parts to draw.EnumSetSetting.Builder<E extends Enum<E>>Builds anEnumSetSetting; empty by default.EnumSetting<E extends Enum<E>>One of an enum's constants.EnumSetting.Builder<E extends Enum<E>>Builds anEnumSetting, starting at the default given to the constructor.A file on disk (a schematic, a song, a list to import), chosen with the system's file picker or typed in.Builds aFileSetting; no file by default.An icon the player picks fromIcons(a glyph of the UI's icon font).Builds anIconSetting; empty (the default icon) by default.A list of whole numbers: hotbar slots, entity ids, y levels.Builds anIntListSetting; empty and unbounded by default.A whole number, set with a slider or typed into a box (IntSetting.Builder.typed()).Builds anIntSetting; 0 and unbounded by default.A key or mouse button.Builds aKeybindSetting; unbound (Keybind.NONE) by default.A set of modules, e.g.Builds aModuleListSetting; empty by default.A set of entries from a vanilla registry (blocks, items, entity types, status effects, …).Builds aRegistryListSetting; empty by default.One entry of a game registry: a single item (what to place), block (what to mine), and so on.Builds aRegistrySetting, starting at the default given to the constructor.Saved settings as they are on disk, for updating them after you rename, move or change settings (seeModule#migrateSettings).Setting<T>A typed, serialisable, user-editable value.Fluent builder base.Who lays a value over the player's, lowest first: a later layer wins over an earlier one.A colour value as edited byColorSetting: a fixed ARGB colour, a rainbow, or a theme role such asSettingColor.Mode.ACCENTorSettingColor.Mode.REDthat follows the active theme.Where aSettingColor's colour comes from.A named, collapsible section of settings, fromSettings.group(String).The settings of one module or panel, organised in groups.An ordered list of strings, without duplicates when added one at a time.Builds aStringListSetting; empty by default.Free text, shown as a text box; anything typed is accepted as it is.Builds aStringSetting; empty by default.