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.GuiGlobalItems;
|
||||||
import xyz.alexcrea.cuanvil.gui.util.GuiSharedConstant;
|
import xyz.alexcrea.cuanvil.gui.util.GuiSharedConstant;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -74,36 +75,52 @@ public class BasicConfigGui extends ValueUpdatableGui {
|
||||||
protected void prepareValues() {
|
protected void prepareValues() {
|
||||||
// limit repair item
|
// limit repair item
|
||||||
this.limitRepairFactory = BoolSettingsGui.boolFactory("\u00A78Limit Repair Cost ?", this,
|
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;
|
IntRange range = ConfigOptions.REPAIR_LIMIT_RANGE;
|
||||||
this.repairCostFactory = IntSettingsGui.intFactory("\u00A78Repair Cost Limit", this,
|
this.repairCostFactory = IntSettingsGui.intFactory("\u00A78Repair Cost Limit", this,
|
||||||
ConfigOptions.LIMIT_REPAIR_VALUE, ConfigHolder.DEFAULT_CONFIG,
|
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(),
|
range.getFirst(), range.getLast(),
|
||||||
ConfigOptions.DEFAULT_LIMIT_REPAIR_VALUE,
|
ConfigOptions.DEFAULT_LIMIT_REPAIR_VALUE,
|
||||||
1, 5, 10);
|
1, 5, 10);
|
||||||
|
|
||||||
// rename cost not needed
|
// repair cost not needed
|
||||||
ItemStack item = new ItemStack(Material.BARRIER);
|
ItemStack item = new ItemStack(Material.BARRIER);
|
||||||
ItemMeta meta = item.getItemMeta();
|
ItemMeta meta = item.getItemMeta();
|
||||||
assert meta != null;
|
assert meta != null;
|
||||||
|
|
||||||
meta.setDisplayName("\u00A7cRepair Cost Value");
|
meta.setDisplayName("\u00A7cLimit Repair Value");
|
||||||
meta.setLore(Collections.singletonList("\u00A77Please, enable repair cost limit for this variable to be editable."));
|
meta.setLore(Collections.singletonList("\u00A77This config need \u00A7cLimit Repair Cost\u00A77 enabled."));
|
||||||
item.setItemMeta(meta);
|
item.setItemMeta(meta);
|
||||||
this.notNeededLimitValueItem = new GuiItem(item, GuiGlobalActions.stayInPlace, CustomAnvil.instance);
|
this.notNeededLimitValueItem = new GuiItem(item, GuiGlobalActions.stayInPlace, CustomAnvil.instance);
|
||||||
|
|
||||||
// remove repair limit item
|
// remove repair limit item
|
||||||
this.removeRepairLimit = BoolSettingsGui.boolFactory("\u00A78Remove Repair Limit ?", this,
|
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
|
// item repair cost
|
||||||
range = ConfigOptions.REPAIR_COST_RANGE;
|
range = ConfigOptions.REPAIR_COST_RANGE;
|
||||||
this.itemRepairCost = IntSettingsGui.intFactory("\u00A78Item Repair Cost", this,
|
this.itemRepairCost = IntSettingsGui.intFactory("\u00A78Item Repair Cost", this,
|
||||||
ConfigOptions.ITEM_REPAIR_COST, ConfigHolder.DEFAULT_CONFIG,
|
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(),
|
range.getFirst(), range.getLast(),
|
||||||
ConfigOptions.DEFAULT_ITEM_REPAIR_COST,
|
ConfigOptions.DEFAULT_ITEM_REPAIR_COST,
|
||||||
1, 5, 10, 50, 100);
|
1, 5, 10, 50, 100);
|
||||||
|
|
@ -111,7 +128,12 @@ public class BasicConfigGui extends ValueUpdatableGui {
|
||||||
// unit repair cost
|
// unit repair cost
|
||||||
this.unitRepairCost = IntSettingsGui.intFactory("\u00A78Unit Repair Cost", this,
|
this.unitRepairCost = IntSettingsGui.intFactory("\u00A78Unit Repair Cost", this,
|
||||||
ConfigOptions.UNIT_REPAIR_COST, ConfigHolder.DEFAULT_CONFIG,
|
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(),
|
range.getFirst(), range.getLast(),
|
||||||
ConfigOptions.DEFAULT_UNIT_REPAIR_COST,
|
ConfigOptions.DEFAULT_UNIT_REPAIR_COST,
|
||||||
1, 5, 10, 50, 100);
|
1, 5, 10, 50, 100);
|
||||||
|
|
@ -120,7 +142,10 @@ public class BasicConfigGui extends ValueUpdatableGui {
|
||||||
range = ConfigOptions.ITEM_RENAME_COST_RANGE;
|
range = ConfigOptions.ITEM_RENAME_COST_RANGE;
|
||||||
this.itemRenameCost = IntSettingsGui.intFactory("\u00A78Rename Cost", this,
|
this.itemRenameCost = IntSettingsGui.intFactory("\u00A78Rename Cost", this,
|
||||||
ConfigOptions.ITEM_RENAME_COST, ConfigHolder.DEFAULT_CONFIG,
|
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(),
|
range.getFirst(), range.getLast(),
|
||||||
ConfigOptions.DEFAULT_ITEM_RENAME_COST,
|
ConfigOptions.DEFAULT_ITEM_RENAME_COST,
|
||||||
1, 5, 10, 50, 100);
|
1, 5, 10, 50, 100);
|
||||||
|
|
@ -129,7 +154,11 @@ public class BasicConfigGui extends ValueUpdatableGui {
|
||||||
range = ConfigOptions.SACRIFICE_ILLEGAL_COST_RANGE;
|
range = ConfigOptions.SACRIFICE_ILLEGAL_COST_RANGE;
|
||||||
this.sacrificeIllegalEnchantCost = IntSettingsGui.intFactory("\u00A78Sacrifice Illegal Enchant Cost", this,
|
this.sacrificeIllegalEnchantCost = IntSettingsGui.intFactory("\u00A78Sacrifice Illegal Enchant Cost", this,
|
||||||
ConfigOptions.SACRIFICE_ILLEGAL_COST, ConfigHolder.DEFAULT_CONFIG,
|
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(),
|
range.getFirst(), range.getLast(),
|
||||||
ConfigOptions.DEFAULT_SACRIFICE_ILLEGAL_COST,
|
ConfigOptions.DEFAULT_SACRIFICE_ILLEGAL_COST,
|
||||||
1, 5, 10, 50, 100);
|
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
|
# If true, all anvil repairs will max out at the value of limit_repair_value
|
||||||
limit_repair_cost: false
|
limit_repair_cost: false
|
||||||
|
|
||||||
# Value to limit repair costs to when limit_repair_cost is true
|
# 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
|
limit_repair_value: 39
|
||||||
|
|
||||||
# Whether the anvil's repair limit should be removed entirely
|
# 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
|
# The anvil will still visually display "too expensive" however the action will be completable
|
||||||
remove_repair_limit: false
|
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
|
item_repair_cost: 2
|
||||||
|
|
||||||
# Value added to the anvil when the item is repaired by an "unit"
|
# XP Level amount added to the anvil when the item is repaired by an "unit"
|
||||||
# For example, a diamond on a diamond sword
|
# 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
|
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
|
item_rename_cost: 1
|
||||||
|
|
||||||
# Value added to the anvil when a sacrifice enchantment conflict
|
# XP Level amount added to the anvil when a sacrifice enchantment
|
||||||
# with one of the left item 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
|
sacrifice_illegal_enchant_cost: 1
|
||||||
|
|
||||||
# Default limit to apply to any enchants missing from override_limits
|
# 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
|
default_limit: 5
|
||||||
|
|
||||||
# Override limits for specific enchants
|
# Override limits for specific enchants
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue