Skplayz444 Skplayz444

Act as an expert Minecraft Java Edition Developer and Resource Pack Artist (PaperMC 1.21+ API). I want you to create a complete package for a custom "God Netherite Sword" with special abilities, including both the Java Plugin and a Custom Resource Pack structure.

Here are the requirements:

---

PART 1: THE MINECRAFT PLUGIN (Java Code)

  1. Item Identification: A Netherite Sword with a custom Display Name ("God Warden Sword"), lore, and a specific PersistentDataContainer (PDC) or Custom Model Data tag so it can be uniquely recognized.
  2. Ability 1 (Sonic Boom - Right-Click):

- Triggered by right-clicking. - Fires a Warden-style sonic boom in the player's line of sight, dealing massive damage (approx. 30 damage / 15 hearts) just like a real Warden. Include a short cooldown.

  1. Ability 2 (Armor Break & Totem Pop - Shift + Left-Click):

- Triggered when the player is sneaking (holding Shift) and hits an enemy with a left-click. - Instantly breaks/destroys all equipped armor pieces of the target and forces their Totem of Undying to pop.

  1. Ability 3 (Jump/Mace Attack & Wind Burst with Cooldown):

- From Above: Striking while falling applies scaling Mace/fall-equivalent damage on every hit. - From Ground: A normal ground left-click applies a Wind Burst-2 style upward launch (sending the enemy flying) and Mace-style damage, but this ground ability has a strict 1-minute (60 seconds) cooldown per player (subsequent hits deal normal sword damage until the cooldown resets).

Please provide:

  • The Main Java Class (Main.java)
  • The Event Listener Class handling all mechanics (SwordAbilityListener.java)
  • The plugin.yml file.

---

PART 2: CUSTOM RESOURCE PACK

  1. Provide the exact folder structure needed for the resource pack.
  2. Provide the JSON code for the custom item model (assets/minecraft/models/item/netherite_sword.json or custom model data override) so the sword looks unique (e.g., glowing Warden/sculk theme).
  3. Give instructions on how to link the custom texture to the plugin's `CustomModelData
Kodari AI
KodariOct 27 at 5:39 pm 1
GodWardenSword
A PaperMC 1.21+ plugin and resource pack creating a unique "God Warden Sword" netherite sword. Features a warden-themed custom model, Sonic Boom right-click ability dealing 30 damage with cooldown, Shift-left-click armor destruction and totem popping, and a mace-style attack system with fall damage scaling and a 60-second ground wind burst cooldown. Includes complete Java plugin structure with Main class, event listener, plugin.yml, and full resource pack JSON configuration.
  1. Create the plugin, give command, and sword ability listener.

  2. Add a 1.21.4+ resource-pack structure with custom-model-data mappings and texture placement instructions.

  1. Plugin: Added /godsword (OP by default), which gives the uniquely identified God Warden Sword. It has a 5-second Sonic Boom cooldown, a sneaking-hit armor break and lethal blow that pops a held Totem of Undying, scaling damage while falling, and a ground launch with a 60-second per-player cooldown.

  2. Resource pack: Added the model and custom-model-data selectors for Minecraft 1.21.4+. The sword uses CustomModelData 10001, matching the plugin.

Resource-pack files are under resource-pack/: pack.mcmeta, the 1.21.4+ item definition, and the sword models. The custom texture itself is not included; the model expects assets/minecraft/textures/item/god_warden_sword.png. Texture generation is available when enabled under Settings → Generation, or for all projects at https://kodari.ai/settings?tab=features.

Kodari can make mistakes. Review important code before using.
Files
resource-pack
src
Code
7 289
src/main/java/com/kodari/godwardensword/Main.java
package com.kodari.godwardensword;

import com.cryptomorin.xseries.XMaterial;
import org.bukkit.NamespacedKey;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Arrays;
import java.util.Objects;

public final class Main extends JavaPlugin implements CommandExecutor {
    private NamespacedKey swordKey;

    @Override
    public void onEnable() {
        swordKey = new NamespacedKey(this, "god_warden_sword");
        getServer().getPluginManager().registerEvents(new SwordAbilityListener(this), this);
        PluginCommand command = Objects.requireNonNull(getCommand("godsword"));
        command.setExecutor(this);
    }

    public NamespacedKey getSwordKey() {
        return swordKey;
    }

    public ItemStack createGodWardenSword() {
        ItemStack sword = XMaterial.matchXMaterial("NETHERITE_SWORD")
                .map(XMaterial::parseItem)
                .orElseThrow(() -> new IllegalStateException("NETHERITE_SWORD is unavailable"));
        ItemMeta meta = Objects.requireNonNull(sword.getItemMeta());
        meta.setDisplayName("§5§lGod Warden Sword");
        meta.setLore(Arrays.asList(
                "§8A blade infused with the Deep Dark.",
                "§7Right-click: §bSonic Boom §8(5s cooldown)",
                "§7Sneak + hit: §cShatter armor and deal a lethal blow",
                "§7Falling hit: §dScaling smash damage",
                "§7Ground hit: §fWind Burst launch §8(60s cooldown)"
        ));
        meta.setCustomModelData(10001);
        meta.getPersistentDataContainer().set(swordKey, PersistentDataType.BYTE, (byte) 1);
        sword.setItemMeta(meta);
        return sword;
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player player)) {
            sender.sendMessage("This command can only be used by a player.");
            return true;
        }
        if (!player.hasPermission("godwardensword.give")) {
            player.sendMessage("§cYou do not have permission to use this command.");
            return true;
        }
        player.getInventory().addItem(createGodWardenSword()).values()
                .forEach(item -> player.getWorld().dropItemNaturally(player.getLocation(), item));
        player.sendMessage("§5You received the §lGod Warden Sword§5.");
        return true;
    }
}