Class BuilderModeSetting
java.lang.Object
com.minecolonies.core.colony.buildings.modules.settings.StringSetting
com.minecolonies.core.colony.buildings.modules.settings.BuilderModeSetting
- All Implemented Interfaces:
ISetting<String>,IStringSetting<String>
Stores the builder mode setting.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringReason display constants.Fields inherited from class com.minecolonies.core.colony.buildings.modules.settings.StringSetting
currentIndex, MAX_BUTTON_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionCreate the builder mode setting.BuilderModeSetting(List<String> value, int curr) Create the builder mode setting. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull StringgetActualValue(@NotNull IBuilding building) protected net.minecraft.network.chat.ComponentGet the text to render on the button, defaults to the stored index value.@Nullable net.minecraft.network.chat.ComponentGet the reason why this setting is inactive.net.minecraft.network.chat.ComponentGet the tooltip text to render on the button, defaults to null.booleanisActive(ISettingsModule module) Check if this setting is active (providedISettingsModule.getOptionalSetting(ISettingKey)is used).booleanisActive(ISettingsModuleView module) Check if this setting is active (providedISettingsModule.getOptionalSetting(ISettingKey)is used).Methods inherited from class com.minecolonies.core.colony.buildings.modules.settings.StringSetting
copyValue, getButtonWidth, getCurrentIndex, getDefault, getLayoutItem, getSettings, getValue, isIndexAllowed, render, set, setupHandler, trigger, updateSettingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.buildings.modules.settings.ISetting
onUpdate, setHoverPane, shouldHideWhenInactive
-
Field Details
-
NEEDS_RESEARCH_REASON
Reason display constants.- See Also:
-
BUILDER_MODES_RESEARCH
- See Also:
-
-
Constructor Details
-
BuilderModeSetting
public BuilderModeSetting()Create the builder mode setting. -
BuilderModeSetting
Create the builder mode setting.- Parameters:
value- the list of possible settings.curr- the current setting.
-
-
Method Details
-
getActualValue
-
getDisplayText
protected net.minecraft.network.chat.Component getDisplayText()Description copied from class:StringSettingGet the text to render on the button, defaults to the stored index value.- Overrides:
getDisplayTextin classStringSetting- Returns:
- the component to render on the button.
-
getToolTipText
public net.minecraft.network.chat.Component getToolTipText()Description copied from interface:ISettingGet the tooltip text to render on the button, defaults to null.- Returns:
- the tooltip component to render on the button.
-
isActive
Description copied from interface:ISettingCheck if this setting is active (providedISettingsModule.getOptionalSetting(ISettingKey)is used).- Returns:
- true if the setting is active;
-
isActive
Description copied from interface:ISettingCheck if this setting is active (providedISettingsModule.getOptionalSetting(ISettingKey)is used).- Returns:
- a component containing a message why this setting is not active, return null if the setting is supposed to be active.
-
getInactiveReason
@Nullable public @Nullable net.minecraft.network.chat.Component getInactiveReason()Description copied from interface:ISettingGet the reason why this setting is inactive.- Returns:
- a component stating why this is inactive, or null if no reason.
-