This commit is contained in:
biglyderv 2024-11-18 18:30:54 -05:00
parent 9176cf836e
commit ce0e065dfe

View file

@ -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);
}