From 430c168de57f6f0448dffab252c0911b30bc5b36 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Tue, 18 Oct 2022 10:59:39 +0200 Subject: [PATCH] Adds HELMET, BOOTS, LEGGINGS and CHESTPLATE filters --- README.md | 4 ++++ .../blacksmith/config/SmithPreset.java | 3 ++- .../blacksmith/config/SmithPresetFilter.java | 22 ++++++++++++++++++- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5acb1d3..6da3747 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,10 @@ All currently supported presets, and available filters for each preset: - GOLD - DIAMOND - NETHERITE + - HELMET + - BOOTS + - LEGGINGS + - CHESTPLATE - TOOL_SMITH - WOOD - STONE diff --git a/src/main/java/net/knarcraft/blacksmith/config/SmithPreset.java b/src/main/java/net/knarcraft/blacksmith/config/SmithPreset.java index 87c02fb..efbc311 100644 --- a/src/main/java/net/knarcraft/blacksmith/config/SmithPreset.java +++ b/src/main/java/net/knarcraft/blacksmith/config/SmithPreset.java @@ -21,7 +21,8 @@ public enum SmithPreset { * A blacksmith capable of re-forging all armor */ ARMOR_SMITH(new SmithPresetFilter[]{SmithPresetFilter.LEATHER, SmithPresetFilter.IRON, SmithPresetFilter.CHAINMAIL, - SmithPresetFilter.GOLD, SmithPresetFilter.DIAMOND, SmithPresetFilter.NETHERITE}), + SmithPresetFilter.GOLD, SmithPresetFilter.DIAMOND, SmithPresetFilter.NETHERITE, SmithPresetFilter.HELMET, + SmithPresetFilter.BOOTS, SmithPresetFilter.LEGGINGS, SmithPresetFilter.CHESTPLATE}), /** * A blacksmith capable of re-forging all tools (hoe, axe, shovel, pickaxe, flint and steel, shears, fishing rod) diff --git a/src/main/java/net/knarcraft/blacksmith/config/SmithPresetFilter.java b/src/main/java/net/knarcraft/blacksmith/config/SmithPresetFilter.java index b270a6b..926437f 100644 --- a/src/main/java/net/knarcraft/blacksmith/config/SmithPresetFilter.java +++ b/src/main/java/net/knarcraft/blacksmith/config/SmithPresetFilter.java @@ -85,7 +85,27 @@ public enum SmithPresetFilter { /** * Filters to only include miscellaneous tools (fishing rod, flint and steel, shears) */ - MISC(false, null); + MISC(false, null), + + /** + * Filters to only include helmets + */ + HELMET(false, "_HELMET"), + + /** + * Filters to only include chestplates + */ + CHESTPLATE(false, "_CHESTPLATE"), + + /** + * Filters to only include leggings + */ + LEGGINGS(false, "_LEGGINGS"), + + /** + * Filters to only include boots + */ + BOOTS(false, "_BOOTS"); private final boolean searchStart; private final String identifier;