Andres Olarte

Detailed medium-sized charging bull

Kodari AI
KodariOct 1 at 7:34 pm 1
ChargingBull
A Minecraft plugin that adds a charging bull entity to the game. Players can spawn a bull that charges at nearby targets, dealing knockback and damage. The bull has configurable charge speed, damage values, and aggro range. Includes commands to spawn, despawn, and configure the bull's behavior. Features particle effects during charge, sound effects on impact, and visual indicators for the charge direction. The bull targets the nearest player or mob within range and continues charging until hitting an obstacle or target. Plugin offers full configuration through a config file and admin commands for adjusting charge mechanics.

Created a Paper 1.21.4 plugin with a medium-sized horned bull that charges nearby players. Use /bull spawn [player] to spawn one and /bull clear to remove all bulls; detection range, charge timing, speed, damage, and knockback are configurable.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
7 483
src/main/java/com/kodari/chargingbull/ChargingBullPlugin.java
package com.kodari.chargingbull;

import org.bukkit.NamespacedKey;
import org.bukkit.plugin.java.JavaPlugin;

public final class ChargingBullPlugin extends JavaPlugin {
    private BullManager bullManager;

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

        NamespacedKey bullKey = new NamespacedKey(this, "charging_bull");
        NamespacedKey hornOwnerKey = new NamespacedKey(this, "bull_horn_owner");
        NamespacedKey hornSideKey = new NamespacedKey(this, "bull_horn_side");
        bullManager = new BullManager(this, bullKey, hornOwnerKey, hornSideKey);
        getServer().getPluginManager().registerEvents(bullManager, this);
        bullManager.start();

        BullCommand command = new BullCommand(this);
        getCommand("bull").setExecutor(command);
        getCommand("bull").setTabCompleter(command);
    }

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

    public BullManager getBullManager() {
        return bullManager;
    }
}