Class BaseListConfigEntry<T>
java.lang.Object
net.glasslauncher.mods.api.gcapi.impl.config.ConfigBase
net.glasslauncher.mods.api.gcapi.impl.config.ConfigEntry<T[]>
net.glasslauncher.mods.api.gcapi.impl.config.entry.BaseListConfigEntry<T>
- All Implemented Interfaces:
ConfigEntryWithButton
- Direct Known Subclasses:
FloatListConfigEntry,IntegerListConfigEntry,StringListConfigEntry
public abstract class BaseListConfigEntry<T>
extends ConfigEntry<T[]>
implements ConfigEntryWithButton
-
Field Summary
Fields inherited from class net.glasslauncher.mods.api.gcapi.impl.config.ConfigEntry
defaultValue, drawableList, maxLength, multiplayerLoaded, parent, valueFields inherited from class net.glasslauncher.mods.api.gcapi.impl.config.ConfigBase
description, id, multiplayerSynced, name, parentField, parentObject -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract BaseListScreenBuilder<T>@NotNull List<HasDrawable>T[]voidinit(net.minecraft.client.gui.screen.Screen parent, net.minecraft.client.font.TextRenderer textRenderer) voidonClick()Fired when someone clicks a button for your config category.voidCalled when resetting the entry to the default value.voidsetDrawableValue(T[] value) abstract TMethods inherited from class net.glasslauncher.mods.api.gcapi.impl.config.ConfigEntry
getMaxLength, isValueValid, saveToField, vanillaServerBehavior
-
Constructor Details
-
BaseListConfigEntry
-
-
Method Details
-
init
public void init(net.minecraft.client.gui.screen.Screen parent, net.minecraft.client.font.TextRenderer textRenderer) - Overrides:
initin classConfigEntry<T[]>
-
createListScreen
-
strToVal
-
getDrawableValue
- Specified by:
getDrawableValuein classConfigEntry<T[]>
-
setDrawableValue
- Specified by:
setDrawableValuein classConfigEntry<T[]>
-
getDrawables
- Specified by:
getDrawablesin classConfigBase
-
onClick
@Environment(CLIENT) public void onClick()Description copied from interface:ConfigEntryWithButtonFired when someone clicks a button for your config category.- Specified by:
onClickin interfaceConfigEntryWithButton
-
reset
Description copied from class:ConfigEntryCalled when resetting the entry to the default value. Yes, I'm making you write this part yourself, I don't know how your custom objects work and how to properly deep clone them.- Specified by:
resetin classConfigEntry<T[]>- Throws:
IllegalAccessException- Reflection can be used inside here without try/catch.
-