xqvuis

Can u change the windcharge velocity like minemen windcharge velocity when u pearl catch and shoot a windcharge below u it hits it and slows u down but boost u abit paper 1.21.11

Kodari AI
KodariJun 28 at 9:03 am 6
WindVelocity
A Paper 1.21.1 plugin replicating the Minemen Club wind charge mechanic. When a wind charge hits a player directly, it cancels default knockback and applies controlled velocity — dampening horizontal momentum while providing a small upward boost. Fully configurable: horizontal multiplier, vertical boost, and a toggle to restrict the mechanic to self-shot wind charges only. Ideal for competitive UHC/PvP servers.

Here’s the plan:

  • WindVelocityPlugin.java — main class, loads config

  • WindChargeListener.java — intercepts wind charge hits on players, applies custom velocity

  • plugin.yml, config.yml


How it works:

  • ProjectileHitEvent fires when the wind charge collides with the player

  • event.setCancelled(true) suppresses the default wind burst knockback

  • Custom velocity: horizontal momentum multiplied by 0.3 (big slowdown), vertical gets max(currentY, 0) + 0.4 (small upward pop)

  • With self-shot-only: true it only triggers when you hit yourself — exactly the pearl-catch → wind charge below combo

Tuning tips:

Feel
horizontal-multiplier
vertical-boost
Minemen default
0.3
0.4
More aggressive boost
0.2
0.6
Barely any effect
0.8
0.2
Kodari can make mistakes. Review important code before using.
Files
src
Code
4 90
src/main/java/com/kodari/windvelocity/WindVelocityPlugin.java
package com.kodari.windvelocity;

import org.bukkit.plugin.java.JavaPlugin;

public class WindVelocityPlugin extends JavaPlugin {

    private double horizontalMultiplier;
    private double verticalBoost;
    private boolean selfShotOnly;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        loadValues();
        getServer().getPluginManager().registerEvents(new WindChargeListener(this), this);
        getLogger().info("WindVelocity enabled.");
    }

    private void loadValues() {
        horizontalMultiplier = getConfig().getDouble("horizontal-multiplier", 0.3);
        verticalBoost = getConfig().getDouble("vertical-boost", 0.4);
        selfShotOnly = getConfig().getBoolean("self-shot-only", true);
    }

    public double getHorizontalMultiplier() { return horizontalMultiplier; }
    public double getVerticalBoost() { return verticalBoost; }
    public boolean isSelfShotOnly() { return selfShotOnly; }
}