From ce0e065dfe56196e138130e760ca9ac489b34a2c Mon Sep 17 00:00:00 2001 From: 08draven Date: Mon, 18 Nov 2024 18:30:54 -0500 Subject: [PATCH] add lore --- app/src/main/java/net/xuyezo/main/Main.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/src/main/java/net/xuyezo/main/Main.java b/app/src/main/java/net/xuyezo/main/Main.java index 8031c2b..6a73ea7 100644 --- a/app/src/main/java/net/xuyezo/main/Main.java +++ b/app/src/main/java/net/xuyezo/main/Main.java @@ -12,6 +12,7 @@ import org.bukkit.generator.ChunkGenerator; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.RecipeChoice; import org.bukkit.inventory.ShapedRecipe; +import org.bukkit.inventory.meta.Damageable; import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin { @@ -22,6 +23,10 @@ public class Main extends JavaPlugin { NamespacedKey key = new NamespacedKey(this, "FlintAxe"); ItemStack item = new ItemStack(Material.STONE_AXE); + Damageable meta = (Damageable) item.getItemMeta(); + meta.setMaxDamage(80); + meta.displayName(Component.text("Flint Axe")); + item.setItemMeta(meta); ShapedRecipe recipe = new ShapedRecipe(key, item); recipe.shape("A ", "B ", " "); @@ -31,6 +36,10 @@ public class Main extends JavaPlugin { key = new NamespacedKey(this, "FlintPickaxe"); item = new ItemStack(Material.STONE_PICKAXE); + meta = (Damageable) item.getItemMeta(); + meta.setMaxDamage(100); + meta.displayName(Component.text("Flint Pickaxe")); + item.setItemMeta(meta); recipe = new ShapedRecipe(key, item); recipe.shape("AA ", "B ", " "); @@ -117,6 +126,18 @@ public class Main extends JavaPlugin { recipe.shape("AA ", "AA ", " "); recipe.setIngredient('A', Material.GRAVEL); + getServer().addRecipe(recipe); + + + key = new NamespacedKey(this, "AltUpgrade"); + item = new ItemStack(Material.NETHERITE_UPGRADE_SMITHING_TEMPLATE); + + recipe = new ShapedRecipe(key, item); + recipe.shape("ABA", "ACA", "AAA"); + recipe.setIngredient('A', Material.DIAMOND); + recipe.setIngredient('B', Material.NETHERITE_INGOT); + recipe.setIngredient('C', Material.NETHERRACK); + getServer().addRecipe(recipe); }