From 4ef4607f749ccbf558e91135e66624ae814d1ee2 Mon Sep 17 00:00:00 2001 From: Illyrius Date: Sun, 25 Jan 2026 11:45:23 +0100 Subject: [PATCH] feat: add craftable chainmail armor recipes using iron bars Signed-off-by: Illyrius --- .../org/xodium/vanillaplus/VanillaPlus.kt | 2 + .../vanillaplus/recipes/ChainmailRecipe.kt | 43 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 src/main/kotlin/org/xodium/vanillaplus/recipes/ChainmailRecipe.kt diff --git a/src/main/kotlin/org/xodium/vanillaplus/VanillaPlus.kt b/src/main/kotlin/org/xodium/vanillaplus/VanillaPlus.kt index f554db910..c18123f3e 100644 --- a/src/main/kotlin/org/xodium/vanillaplus/VanillaPlus.kt +++ b/src/main/kotlin/org/xodium/vanillaplus/VanillaPlus.kt @@ -8,6 +8,7 @@ import org.xodium.vanillaplus.data.ConfigData import org.xodium.vanillaplus.data.ConfigData.Companion.load import org.xodium.vanillaplus.modules.* import org.xodium.vanillaplus.modules.ArmorStandModule.info +import org.xodium.vanillaplus.recipes.ChainmailRecipe import org.xodium.vanillaplus.recipes.PaintingRecipe import org.xodium.vanillaplus.recipes.PaintingRecipe.info import org.xodium.vanillaplus.recipes.RottenFleshRecipe @@ -47,6 +48,7 @@ internal class VanillaPlus : JavaPlugin() { logger.info( listOf( + ChainmailRecipe, PaintingRecipe, RottenFleshRecipe, WoodLogRecipe, diff --git a/src/main/kotlin/org/xodium/vanillaplus/recipes/ChainmailRecipe.kt b/src/main/kotlin/org/xodium/vanillaplus/recipes/ChainmailRecipe.kt new file mode 100644 index 000000000..a83d3da8c --- /dev/null +++ b/src/main/kotlin/org/xodium/vanillaplus/recipes/ChainmailRecipe.kt @@ -0,0 +1,43 @@ +package org.xodium.vanillaplus.recipes + +import org.bukkit.Material +import org.bukkit.NamespacedKey +import org.bukkit.inventory.ItemStack +import org.bukkit.inventory.ShapedRecipe +import org.xodium.vanillaplus.VanillaPlus.Companion.instance +import org.xodium.vanillaplus.interfaces.RecipeInterface + +/** Represents an object handling chainmail recipe implementation within the system. */ +internal object ChainmailRecipe : RecipeInterface { + override val recipes = + setOf( + ShapedRecipe( + NamespacedKey(instance, "chainmail_helmet"), + ItemStack.of(Material.CHAINMAIL_HELMET), + ).apply { + shape("AAA", "A A") + setIngredient('A', Material.IRON_BARS) + }, + ShapedRecipe( + NamespacedKey(instance, "chainmail_chestplate"), + ItemStack.of(Material.CHAINMAIL_CHESTPLATE), + ).apply { + shape("A A", "AAA", "AAA") + setIngredient('A', Material.IRON_BARS) + }, + ShapedRecipe( + NamespacedKey(instance, "chainmail_leggings"), + ItemStack.of(Material.CHAINMAIL_LEGGINGS), + ).apply { + shape("AAA", "A A", "A A") + setIngredient('A', Material.IRON_BARS) + }, + ShapedRecipe( + NamespacedKey(instance, "chainmail_boots"), + ItemStack.of(Material.CHAINMAIL_BOOTS), + ).apply { + shape("A A", "A A") + setIngredient('A', Material.IRON_BARS) + }, + ) +}