mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Add config description lore for basic config gui.
This commit is contained in:
parent
c8a8b70422
commit
4b50499442
2 changed files with 54 additions and 24 deletions
|
|
@ -18,6 +18,7 @@ import xyz.alexcrea.cuanvil.gui.util.GuiGlobalActions;
|
|||
import xyz.alexcrea.cuanvil.gui.util.GuiGlobalItems;
|
||||
import xyz.alexcrea.cuanvil.gui.util.GuiSharedConstant;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
|
|
@ -74,36 +75,52 @@ public class BasicConfigGui extends ValueUpdatableGui {
|
|||
protected void prepareValues() {
|
||||
// limit repair item
|
||||
this.limitRepairFactory = BoolSettingsGui.boolFactory("\u00A78Limit Repair Cost ?", this,
|
||||
ConfigOptions.LIMIT_REPAIR_COST, ConfigHolder.DEFAULT_CONFIG, ConfigOptions.DEFAULT_LIMIT_REPAIR);
|
||||
ConfigOptions.LIMIT_REPAIR_COST, ConfigHolder.DEFAULT_CONFIG, ConfigOptions.DEFAULT_LIMIT_REPAIR,
|
||||
"",
|
||||
"\u00A77Whether all anvil actions cost should be capped.",
|
||||
"\u00A77If true, all anvil repairs will max out at the value of \u00A7aLimit Repair Value\u00A77.");
|
||||
|
||||
// rename cost item
|
||||
// repair cost item
|
||||
IntRange range = ConfigOptions.REPAIR_LIMIT_RANGE;
|
||||
this.repairCostFactory = IntSettingsGui.intFactory("\u00A78Repair Cost Limit", this,
|
||||
ConfigOptions.LIMIT_REPAIR_VALUE, ConfigHolder.DEFAULT_CONFIG,
|
||||
null,
|
||||
Arrays.asList(
|
||||
"",
|
||||
"\u00A77Value to limit repair costs to when \u00A7aLimit Repair Value\u00A77 is true.",
|
||||
"\u00A77Valid values include \u00A7e1 \u00A77to \u00A7e39\u00A77: " +
|
||||
"vanilla would display \u00A7e40+\u00A77 as \u00A7ctoo expensive\u00A77."
|
||||
),
|
||||
range.getFirst(), range.getLast(),
|
||||
ConfigOptions.DEFAULT_LIMIT_REPAIR_VALUE,
|
||||
1, 5, 10);
|
||||
|
||||
// rename cost not needed
|
||||
// repair cost not needed
|
||||
ItemStack item = new ItemStack(Material.BARRIER);
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
assert meta != null;
|
||||
|
||||
meta.setDisplayName("\u00A7cRepair Cost Value");
|
||||
meta.setLore(Collections.singletonList("\u00A77Please, enable repair cost limit for this variable to be editable."));
|
||||
meta.setDisplayName("\u00A7cLimit Repair Value");
|
||||
meta.setLore(Collections.singletonList("\u00A77This config need \u00A7cLimit Repair Cost\u00A77 enabled."));
|
||||
item.setItemMeta(meta);
|
||||
this.notNeededLimitValueItem = new GuiItem(item, GuiGlobalActions.stayInPlace, CustomAnvil.instance);
|
||||
|
||||
// remove repair limit item
|
||||
this.removeRepairLimit = BoolSettingsGui.boolFactory("\u00A78Remove Repair Limit ?", this,
|
||||
ConfigOptions.REMOVE_REPAIR_LIMIT, ConfigHolder.DEFAULT_CONFIG, ConfigOptions.DEFAULT_REMOVE_LIMIT);
|
||||
ConfigOptions.REMOVE_REPAIR_LIMIT, ConfigHolder.DEFAULT_CONFIG, ConfigOptions.DEFAULT_REMOVE_LIMIT,
|
||||
"",
|
||||
"\u00A77Whether the anvil's repair limit should be removed entirely.",
|
||||
"\u00A77The anvil will still visually display \u00A7ctoo expensive\u00A77.",
|
||||
"\u00A77However the action will be completable.");
|
||||
|
||||
// item repair cost
|
||||
range = ConfigOptions.REPAIR_COST_RANGE;
|
||||
this.itemRepairCost = IntSettingsGui.intFactory("\u00A78Item Repair Cost", this,
|
||||
ConfigOptions.ITEM_REPAIR_COST, ConfigHolder.DEFAULT_CONFIG,
|
||||
null,
|
||||
Arrays.asList(
|
||||
"",
|
||||
"\u00A77XP Level amount added to the anvil when the item",
|
||||
"\u00A77is repaired by another item of the same type."
|
||||
),
|
||||
range.getFirst(), range.getLast(),
|
||||
ConfigOptions.DEFAULT_ITEM_REPAIR_COST,
|
||||
1, 5, 10, 50, 100);
|
||||
|
|
@ -111,7 +128,12 @@ public class BasicConfigGui extends ValueUpdatableGui {
|
|||
// unit repair cost
|
||||
this.unitRepairCost = IntSettingsGui.intFactory("\u00A78Unit Repair Cost", this,
|
||||
ConfigOptions.UNIT_REPAIR_COST, ConfigHolder.DEFAULT_CONFIG,
|
||||
null,
|
||||
Arrays.asList(
|
||||
"",
|
||||
"\u00A77XP Level amount added to the anvil when the item is repaired by an \u00A7eunit\u00A77.",
|
||||
"\u00A77For example: a Diamond on a Diamond Sword.",
|
||||
"\u00A77What's considered unit for what can be edited on the unit repair configuration."
|
||||
),
|
||||
range.getFirst(), range.getLast(),
|
||||
ConfigOptions.DEFAULT_UNIT_REPAIR_COST,
|
||||
1, 5, 10, 50, 100);
|
||||
|
|
@ -120,7 +142,10 @@ public class BasicConfigGui extends ValueUpdatableGui {
|
|||
range = ConfigOptions.ITEM_RENAME_COST_RANGE;
|
||||
this.itemRenameCost = IntSettingsGui.intFactory("\u00A78Rename Cost", this,
|
||||
ConfigOptions.ITEM_RENAME_COST, ConfigHolder.DEFAULT_CONFIG,
|
||||
null,
|
||||
Arrays.asList(
|
||||
"",
|
||||
"\u00A77XP Level amount added to the anvil when the item is renamed."
|
||||
),
|
||||
range.getFirst(), range.getLast(),
|
||||
ConfigOptions.DEFAULT_ITEM_RENAME_COST,
|
||||
1, 5, 10, 50, 100);
|
||||
|
|
@ -129,7 +154,11 @@ public class BasicConfigGui extends ValueUpdatableGui {
|
|||
range = ConfigOptions.SACRIFICE_ILLEGAL_COST_RANGE;
|
||||
this.sacrificeIllegalEnchantCost = IntSettingsGui.intFactory("\u00A78Sacrifice Illegal Enchant Cost", this,
|
||||
ConfigOptions.SACRIFICE_ILLEGAL_COST, ConfigHolder.DEFAULT_CONFIG,
|
||||
null,
|
||||
Arrays.asList(
|
||||
"",
|
||||
"\u00A77XP Level amount added to the anvil when a sacrifice enchantment",
|
||||
"\u00A77conflict With one of the left item enchantment"
|
||||
),
|
||||
range.getFirst(), range.getLast(),
|
||||
ConfigOptions.DEFAULT_SACRIFICE_ILLEGAL_COST,
|
||||
1, 5, 10, 50, 100);
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
# Whether all anvil actions should be capped
|
||||
# Whether all anvil actions cost should be capped
|
||||
#
|
||||
# If true, all anvil repairs will max out at the value of limit_repair_value
|
||||
limit_repair_cost: false
|
||||
|
||||
# Value to limit repair costs to when limit_repair_cost is true
|
||||
#
|
||||
# Valid range of 1 - 39 (vanilla will consider 40+ as "too expensive")
|
||||
# Valid values include 1 to 39 (vanilla will consider 40+ as "too expensive")
|
||||
limit_repair_value: 39
|
||||
|
||||
# Whether the anvil's repair limit should be removed entirely
|
||||
|
|
@ -13,31 +13,32 @@ limit_repair_value: 39
|
|||
# The anvil will still visually display "too expensive" however the action will be completable
|
||||
remove_repair_limit: false
|
||||
|
||||
# Value added to the anvil when the item is repaired by another item of the same type
|
||||
# XP Level amount added to the anvil when the item is repaired by another item of the same type
|
||||
#
|
||||
# Valid range of 0 - 255
|
||||
# Valid values include 0 to 255
|
||||
item_repair_cost: 2
|
||||
|
||||
# Value added to the anvil when the item is repaired by an "unit"
|
||||
# For example, a diamond on a diamond sword
|
||||
# XP Level amount added to the anvil when the item is repaired by an "unit"
|
||||
# For example: a Diamond on a Diamond Sword
|
||||
# What's considered unit for what can be edited on the unit repair configuration.
|
||||
#
|
||||
# Valid range of 0 - 255
|
||||
# Valid values include 0 to 255
|
||||
unit_repair_cost: 1
|
||||
|
||||
# Value added to the anvil when the item is renamed
|
||||
# XP Level amount added to the anvil when the item is renamed
|
||||
#
|
||||
# Valid range of 0 - 255
|
||||
# Valid values include 0 to 255
|
||||
item_rename_cost: 1
|
||||
|
||||
# Value added to the anvil when a sacrifice enchantment conflict
|
||||
# with one of the left item enchantment
|
||||
# XP Level amount added to the anvil when a sacrifice enchantment
|
||||
# conflict with one of the left item enchantment
|
||||
#
|
||||
# Valid range of 0 - 255
|
||||
# Valid values include 0 to 255
|
||||
sacrifice_illegal_enchant_cost: 1
|
||||
|
||||
# Default limit to apply to any enchants missing from override_limits
|
||||
#
|
||||
# Valid range of 1 - 255
|
||||
# Valid values include 1 to 255
|
||||
default_limit: 5
|
||||
|
||||
# Override limits for specific enchants
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue