Oreo YT
📎 1 file 4,412 chars
📄
pasted-code-1791820114732.txt
txt 9 lines
▶
Minecraft mod that lets players combine two different animals using a Golden Apple. Use the apple on the first animal and then the second to create a hybrid. Animals will spawn the hybrid safely, and prevent invalid combinations. Every supported hybrid must combine the actual 3D appearance, textures, body parts, animations, abilities, statistics, and behaviors of both parents. Do not simply reuse one parent's model or create an ordinary mob with different stats. For example, Cow + Sheep must have a cow-like body with visible sheep wool, Pig + Sheep must combine a pig's snout with wool, Dog + Polar Bear must combine both animals' features and inherit appropriate strength, and Parrot + Bee must have mixed features and functional flight. Apply these principles to ALL supported combinations, not just examples. Implement a universal inheritance system that combines compatible health, attack damage, strength, speed, jumping, swimming, flying, diet, taming, AI, and special abilities. Flying hybrids must actually fly, navigate, take off, and land. Hybrids with sheep ancestry must display wool and support wool regrowth and shearing when compatible. Combine compatible food preferences, taming, loyalty, owner defense, milking, dyeing, riding, and other interactions. Ensure all body parts, textures, and animations render correctly and match the hybrid's abilities. Build reusable systems for model generation, attribute inheritance, AI, movement, feeding, interactions, animations, and saving/loading hybrids. Preserve existing working features and fix current bugs instead of removing functionality. Test many different combinations in actual gameplay, especially flying hybrids, wool-bearing hybrids, and hybrids with different combat strengths. Prevent crashes, missing textures, broken AI, and incompatible behaviors. Do not claim a feature works unless it has been implemented and tested. If necessary, develop the mod in stages and report what is complete, incomplete, and tested. The goal is a polished, playable mod where every supported hybrid genuinely inherits the appearance, abilities, and behaviors of both parents.

Include a fully functional Hybrid Animals Encyclopedia Book as a permanent item built directly into the mod. The book must be available in the mod's dedicated Creative Mode inventory tab and have a crafting recipe for Survival Mode. It must not require additional mods, external downloads, or separate installations.

The encyclopedia must contain a dedicated entry for EVERY hybrid implemented in the mod, including Sheeow (Cow + Sheep), Polar Wolear (Wolf + Polar Bear), Beerot (Bee + Parrot), Snifflphin (Sniffer + Dolphin), Cowarrot (Cow + Parrot), and all other supported combinations. Each entry must include the hybrid's name, appearance, parent animals, fusion method, abilities, behavior, diet, taming method, habitat, strength, and special characteristics where applicable. Generate entries from the actual hybrid data implemented in the mod so the information matches each creature's real appearance, abilities, recipes, and behavior.

Initially, all hybrid names must be visible in the encyclopedia, but each undiscovered hybrid's image must be hidden behind a question mark, and its fusion recipe and detailed information must remain locked. When a player successfully creates a specific hybrid for the first time, automatically unlock that hybrid's entry, reveal its image, and display its fusion recipe and full information. Previously discovered entries must remain unlocked after saving, quitting, and reloading the world. Track discovery progress separately for each player.

Give the encyclopedia a custom graphical interface with page navigation, categories, and a table of contents so players can browse every hybrid easily. Include a discovery counter showing how many hybrids the player has discovered out of the total number available. Ensure the book supports a large number of entries without performance problems. The encyclopedia must be a functional in-game item with working interactions and persistent data, not merely a written description, a decorative book, or a list of entries in a text file. Implement and test the complete book system, including its interface, images, unlocking logic, recipes, and saved discovery progress. Do not claim the encyclopedia works unless these features have actually been implemented and tested.
Kodari AI
KodariOct 12 at 3:52 pm 1
HybridMenagerie
A Minecraft plugin enabling players to fuse two animals using a Golden Apple, creating visually and behaviorally accurate hybrids. Implements a universal inheritance system combining parent models, textures, animations, stats, AI, and abilities. Includes a fully functional Hybrid Encyclopedia Book with a custom GUI, per-player discovery tracking, locked entries with question marks, and persistent unlock progress. Features a dedicated Creative inventory tab and Survival crafting recipe. Supports flying hybrids, wool-bearing hybrids, combat hybrids, and all other combinations with reusable systems for model generation, attribute inheritance, feeding, taming, and saving/loading.

[Generation stopped]

Oreo YT

Yes do it

Kodari AI
KodariOct 12 at 3:58 pm 12

I’m building this as a Paper 1.21 plugin, since Kodari builds plugins rather than Forge or Fabric mods. Hybrids use vanilla models, so the “cow body with wool” and “pig snout” looks aren’t possible without a resource pack. The files below cover the core systems.

The plugin is written: six hybrids, the fusion system, and the encyclopedia. It hasn’t been compiled or tested in a Minecraft server, so treat it as unverified until you build and play it.

Scope changes from your spec

  • Platform: This is a Paper 1.21 plugin, not a Forge or Fabric mod. Kodari builds plugins.

  • Appearance: Hybrids use vanilla models. Sheeow is a sheep with wool, not a cow with wool. Sheepig has no pig snout, Beerot has no parrot colours, and Cowarrot has no cow body. Real hybrid models would need a resource pack or custom models.

  • Creative tab: Plugins can’t add Creative inventory tabs. The book is obtained through the survival recipe or /hybridbook [player] (op permission).

  • Hybrid count: Six hybrids are implemented: Sheeow, Sheepig, Polar Wolear, Snifflphin, Beerot, and Cowarrot. Other combinations can be added as entries in HybridType.

  • Version: Only Paper 1.21 is targeted, so the code uses Bukkit enums directly and does not use XSeries.

How it works

  • Fusion: Use a Golden Apple on an adult animal, then on a second adult animal within 16 blocks and 60 seconds. Each animal consumes one apple. Both parents are removed and the hybrid spawns at the second animal’s location. Same-species pairs, unsupported pairs, hybrids, and unsafe spawn spots are rejected.

  • Inheritance: Max health and movement speed are averaged from the parents’ current base values. Attack damage is the average of the parents that have it, multiplied by the hybrid’s strength value.

  • Abilities: Beerot poisons targets for 5 seconds on hit. Sheeow and Cowarrot can be milked with an empty bucket, with a 5-minute cooldown per hybrid.

  • Breeding: Hybrids can’t breed.

  • Flight and wool: Beerot and Cowarrot use vanilla bee and parrot flight AI. Sheep-based hybrids use vanilla sheep wool, shearing, and dyeing.

  • Persistence: Hybrid identity is stored on the entity, so it survives chunk unloads and restarts.

  • Encyclopedia: A chest-style GUI with 45 entries per page, category filtering, a discovery counter, and locked entries shown with hidden icons and recipes. Discoveries are saved per player in discoveries.yml.

Not implemented: Custom models or textures, owner defense, riding, and any custom flight or navigation AI beyond the vanilla bee and parrot behaviour. I have not run any combinations in gameplay.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
11 1,143
src/main/java/com/kodari/hybrids/HybridPlugin.java
package com.kodari.hybrids;

import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ShapelessRecipe;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Optional;

public final class HybridPlugin extends JavaPlugin {

    private NamespacedKey hybridTypeKey;
    private NamespacedKey milkReadyKey;
    private NamespacedKey encyclopediaKey;
    private NamespacedKey recipeKey;
    private DiscoveryManager discoveryManager;
    private FusionManager fusionManager;
    private EncyclopediaManager encyclopediaManager;

    @Override
    public void onEnable() {
        hybridTypeKey = new NamespacedKey(this, "hybrid_type");
        milkReadyKey = new NamespacedKey(this, "milk_ready_at");
        encyclopediaKey = new NamespacedKey(this, "encyclopedia");
        recipeKey = new NamespacedKey(this, "encyclopedia_recipe");

        discoveryManager = new DiscoveryManager(this);
        fusionManager = new FusionManager(this);
        encyclopediaManager = new EncyclopediaManager(this);

        getServer().getPluginManager().registerEvents(new HybridListener(this), this);
        getServer().getPluginManager().registerEvents(new EncyclopediaListener(this), this);

        Bukkit.removeRecipe(recipeKey);
        ShapelessRecipe recipe = new ShapelessRecipe(recipeKey, encyclopediaManager.createBook());
        recipe.addIngredient(Material.BOOK);
        recipe.addIngredient(Material.GOLDEN_APPLE);
        Bukkit.addRecipe(recipe);
    }

    @Override
    public void onDisable() {
        if (discoveryManager != null) {
            discoveryManager.save();
        }
        Bukkit.removeRecipe(recipeKey);
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!command.getName().equalsIgnoreCase("hybridbook")) {
            return false;
        }
        Player target = args.length > 0
                ? Bukkit.getPlayerExact(args[0])
                : (sender instanceof Player self ? self : null);
        if (target == null) {
            sender.sendMessage(Text.color("&cPlayer not found. Usage: /hybridbook <player>"));
            return true;
        }
        target.getInventory().addItem(encyclopediaManager.createBook())
                .values()
                .forEach(leftover -> target.getWorld().dropItemNaturally(target.getLocation(), leftover));
        sender.sendMessage(Text.color("&aGave a Hybrid Animals Encyclopedia to " + target.getName() + "."));
        return true;
    }

    public Optional<HybridType> hybridOf(Entity entity) {
        String id = entity.getPersistentDataContainer().get(hybridTypeKey, PersistentDataType.STRING);
        return id == null ? Optional.empty() : HybridType.fromId(id);
    }

    public NamespacedKey getHybridTypeKey() {
        return hybridTypeKey;
    }

    public NamespacedKey getMilkReadyKey() {
        return milkReadyKey;
    }

    public NamespacedKey getEncyclopediaKey() {
        return encyclopediaKey;
    }

    public DiscoveryManager getDiscoveryManager() {
        return discoveryManager;
    }

    public FusionManager getFusionManager() {
        return fusionManager;
    }

    public EncyclopediaManager getEncyclopediaManager() {
        return encyclopediaManager;
    }
}