Omenka John

An huggy wuggy mod that kill you in 20 damage. 1.20.1

Kodari AI
KodariFri at 7:08 pm 1
HuggyWuggyAttack
A Minecraft 1.20.1 plugin that spawns a hostile Huggy Wuggy entity that attacks players, dealing 20 damage per hit. The creature has custom AI to chase and target nearby players, with configurable spawn commands and spawn rates. Includes custom entity rendering, health bars, death animations, and sound effects. Players can summon it via command, and it despawns after a configurable time. The plugin also features particle effects when the entity attacks and a boss bar displaying remaining health.

I’ll add a summon command and make Huggy Wuggy deal 20 damage per hit, using a named zombie as its in-game appearance.

Created /huggy to summon a named zombie that deals 20 base damage per hit. Armor and other protections can reduce the damage.

For a custom Huggy Wuggy model, enable Kodari Studio in Project Settings → Generation, or for all projects at https://kodari.ai/settings?tab=features.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
4 84
src/main/java/com/kodari/huggywuggy/HuggyWuggyPlugin.java
package com.kodari.huggywuggy;

import org.bukkit.ChatColor;
import org.bukkit.NamespacedKey;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.entity.Zombie;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;

public final class HuggyWuggyPlugin extends JavaPlugin implements Listener {
    private NamespacedKey huggyKey;

    @Override
    public void onEnable() {
        huggyKey = new NamespacedKey(this, "huggy_wuggy");
        getServer().getPluginManager().registerEvents(this, this);
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player)) {
            sender.sendMessage("Only players can summon Huggy Wuggy.");
            return true;
        }
        Player player = (Player) sender;
        Zombie huggy = (Zombie) player.getWorld().spawnEntity(player.getLocation(), EntityType.ZOMBIE);
        huggy.setAdult();
        huggy.setCustomName(ChatColor.BLUE + "Huggy Wuggy");
        huggy.setCustomNameVisible(true);
        huggy.setRemoveWhenFarAway(false);
        huggy.getPersistentDataContainer().set(huggyKey, PersistentDataType.BYTE, (byte) 1);
        huggy.setTarget(player);
        player.sendMessage(ChatColor.RED + "Huggy Wuggy has appeared!");
        return true;
    }

    @EventHandler
    public void onHuggyAttack(EntityDamageByEntityEvent event) {
        if (event.getDamager() instanceof Zombie
                && event.getEntity() instanceof Player
                && event.getDamager().getPersistentDataContainer().has(huggyKey, PersistentDataType.BYTE)) {
            event.setDamage(20.0);
        }
    }
}