Limao-2026

Create a mod called "Villager vs. Creeper" where villagers fight Creepers. In the menu, you choose who will be the Creeper or the Villager.

Kodari AI
KodariJun 24 at 2:58 am 19

I’ll create a PvP minigame mod where players choose to fight as either villagers or creepers with unique abilities.

VillagerVsCreeper
A competitive minigame mod where players choose to fight as either villagers or creepers. Each team has unique abilities: villagers get strength and resistance, while creepers gain speed and explosion powers. Features an intuitive GUI menu for team selection, server-side team management, and custom keybinding to access the team selector. Perfect for PvP servers and custom game modes.

Now I’ll create the complete mod structure with all necessary files.

Villager vs. Creeper mod created with complete minigame functionality:

Features:

  • Press T to open team selection GUI

  • Choose Villager team: Strength II, Resistance I, emeralds, iron sword, shield

  • Choose Creeper team: Speed II, Jump Boost I, TNT, flint & steel, gunpowder

  • Commands: /joinvillagers, /joincreepers, /teamselect

  • Server-side team management with automatic cleanup on disconnect

  • Effects persist infinitely until team change

How it works:

  1. Players press T (or use /teamselect) to open the team selector

  2. Click a button to join that team

  3. Server applies appropriate effects and items

  4. Teams tracked per-player until disconnect

The mod uses proper 1.21.11 APIs with split source sets, CustomPayload networking, and Identifier-based keybinding categories.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
14 420
src/main/java/com/example/villagervscreeper/VillagerVsCreeper.java
package com.example.villagervscreeper;

import com.example.villagervscreeper.networking.ModNetworking;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class VillagerVsCreeper implements ModInitializer {
    public static final String MOD_ID = "villagervscreeper";
    public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

    @Override
    public void onInitialize() {
        LOGGER.info("Initializing Villager vs. Creeper");

        ModNetworking.initialize();
        ModCommands.initialize();

        ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> {
            TeamManager.removePlayer(handler.getPlayer().getUuid());
        });

        ServerLifecycleEvents.SERVER_STOPPED.register(server -> {
            LOGGER.info("Server stopped - clearing teams");
        });
    }
}