Class DynamicTreesSetting
java.lang.Object
com.minecolonies.core.colony.buildings.modules.settings.IntSetting
com.minecolonies.core.colony.buildings.modules.settings.DynamicTreesSetting
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new dynamic trees setting, using the config value as initial value.DynamicTreesSetting(int value, int defaultValue) Create a new dynamic tree setting -
Method Summary
Modifier and TypeMethodDescriptionbooleanisActive(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).booleanConfigures if this setting is inactive, whether it should show in the settings at all.Methods inherited from class com.minecolonies.core.colony.buildings.modules.settings.IntSetting
copyValue, getDefault, getLayoutItem, getValue, render, setupHandler, setValueMethods 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
getInactiveReason, getToolTipText, onUpdate, setHoverPane, trigger, updateSetting
-
Constructor Details
-
DynamicTreesSetting
public DynamicTreesSetting()Create a new dynamic trees setting, using the config value as initial value. -
DynamicTreesSetting
public DynamicTreesSetting(int value, int defaultValue) Create a new dynamic tree setting- Parameters:
value- the current valuedefaultValue- the default value
-
-
Method Details
-
isActive
Description copied from interface:ISettingCheck if this setting is active (providedISettingsModule.getOptionalSetting(ISettingKey)is used).- Returns:
- true if the setting is active;
-
shouldHideWhenInactive
public boolean shouldHideWhenInactive()Description copied from interface:ISettingConfigures if this setting is inactive, whether it should show in the settings at all. This would default to false in most cases as we want to prevent not showing settings, but certain settings related to addon mods may want to be hidden if another mod is not loaded.- Returns:
- true if the inactive setting should be hidden.
-
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.
-