dripng

make a spear that has a smooth velocity that dashes so the spear should dash when you crouch and right click and it should be smooth right where you're looking jsut a dash and smooth velocity so can switch off and stuff make the cooldown 40 seconds and displayed in the action bar when in hand make sure only operators can get this using commands and make sure to add a config to enable and expand dash distance MAKE SURE ITS A MINECRAFT SPEAR THAT IS IN 1.21.11 Make sure its the official minecraft spear nothing else the minecraft spear that was newly laucnhed in the latest update make sure its a netherite spear

dripng

make a spear that has a smooth velocity that dashes so the spear should dash when you crouch and right click and it should be smooth right where you're looking jsut a dash and smooth velocity so can switch off and stuff make the cooldown 40 seconds and displayed in the action bar when in hand make sure only operators can get this using commands and make sure to add a config to enable and expand dash distance MAKE SURE ITS A MINECRAFT SPEAR THAT IS IN 1.21.11 Make sure its the official minecraft spear nothing else the minecraft spear that was newly laucnhed in the latest update make sure its a netherite spear

Kodari AI
KodariJun 17 at 1:54 pm 11

The spear was added in Java Edition 1.21.11 (“Mounts of Mayhem”), and

it comes with wooden, stone, copper, iron, gold, diamond, and netherite variants.

NetheriteSpearDash
Adds a momentum-based dash ability to the Minecraft 1.21.11 netherite spear. Crouching and right-clicking launches the player smoothly in their look direction with configurable distance. Features a 40-second cooldown displayed live in the action bar while holding the spear. Only operators can obtain the spear via /givespear. Includes a config for enabling the ability and tuning dash power.

Plan:

  • SpearDashPlugin — main class, loads config, registers everything

  • CooldownManager — per-player UUID cooldown tracking

  • ActionBarManager — repeating 20-tick task showing cooldown/ready status

  • SpearDashListener — PlayerInteractEvent for crouch+right-click dash, HeldItem change detection

  • SpearCommand — /givespear op-only command

  • config.yml + plugin.yml


Here’s what was built:

/givespear [player] — Op-only; gives a named netherite spear with Mending & Unbreaking III lore.

Dash mechanics:

  • Crouch + right-click while holding the netherite spear

  • Velocity launches you in your exact look direction (works up, down, diagonal)

  • A small 6-tick follow-through runnable adds smooth momentum sustain before Minecraft friction naturally decelerates you — feels fluid, not instant-stop

Action bar — Updates every second while holding the spear:

  • Ready state → shows dash prompt

  • On cooldown → shows Cooldown: Xs counting down live

config.yml knobs:

Key
Default
Effect
enabled
true
Toggle the ability on/off server-wide
dash-distance
1.5
Velocity multiplier — higher = farther dash
cooldown-seconds
40
How long between dashes
dripng

all the netherite spears can now dash please fix that make it only this one spear

Kodari AI
KodariJun 20 at 6:52 pm 6

The fix: tag the spear with a persistent data key on creation, then check for that tag in the listener instead of just checking the material.

The listener now checks for a NamespacedKey PDC tag (dash_spear) that’s stamped onto the spear at creation time. Any other netherite spear — picked up from the ground, crafted, found in loot — will fail the isDashSpear() check and do nothing. Only spears given via /givespear carry the tag.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
8 400
src/main/java/com/kodari/speardash/SpearDashPlugin.java
package com.kodari.speardash;

import org.bukkit.plugin.java.JavaPlugin;

public class SpearDashPlugin extends JavaPlugin {

    private CooldownManager cooldownManager;
    private ActionBarManager actionBarManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        cooldownManager = new CooldownManager();
        actionBarManager = new ActionBarManager(this, cooldownManager);

        getServer().getPluginManager().registerEvents(new SpearDashListener(this, cooldownManager, actionBarManager), this);

        SpearCommand spearCommand = new SpearCommand(this);
        getCommand("givespear").setExecutor(spearCommand);
        getCommand("givespear").setTabCompleter(spearCommand);

        actionBarManager.start();
        getLogger().info("NetheriteSpearDash enabled.");
    }

    @Override
    public void onDisable() {
        if (actionBarManager != null) {
            actionBarManager.stop();
        }
    }

    public CooldownManager getCooldownManager() {
        return cooldownManager;
    }

    public ActionBarManager getActionBarManager() {
        return actionBarManager;
    }
}