вадим моренов

Create a Minecraft mod that makes the game more challenging; make the mod interesting — for example, introduce new mechanics for monsters, etc.

Kodari AI
KodariNov 10 at 9:14 pm 2
MonsterMayhem
MonsterMayhem is a Minecraft Fabric mod for 1.18.2 that dramatically increases game difficulty through enhanced monster mechanics. It introduces elite mob variants with unique abilities like explosive attacks, lifesteal, and speed bursts. Mobs gain progressive scaling based on distance from spawn, becoming stronger and more aggressive. New environmental hazards spawn near mobs, including cursed ground and toxic clouds. The mod adds a difficulty meter that visibly increases with player progression, and implements smart mob AI that coordinates attacks and retreats strategically. Custom particle effects and sound effects enhance the intense combat experience, making survival genuinely challenging for veteran players.
  • Add a server-side “Dread Surge” that periodically empowers nearby hostile mobs during the night.

  • Keep the feature survival-friendly without adding items or blocks; use vanilla status effects and visual feedback.

  • Create the Fabric project metadata and initializer, using verified 1.18.2 Yarn/Fabric signatures.

Created Dread Surge: every 60 seconds at night, hostile mobs within 32 blocks of a player gain Speed and Strength for 20 seconds. It adds no items or blocks; the mechanic activates automatically in survival.

Switch to Fabric mod for Minecraft 1.18.2

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
5 117
src/main/java/com/kodari/dreadsurge/DreadSurge.java
package com.kodari.dreadsurge;

import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.entity.mob.HostileEntity;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.Box;

public class DreadSurge implements ModInitializer {
    private static final long SURGE_INTERVAL_TICKS = 1200L;
    private static final long NIGHT_START = 13000L;
    private static final long NIGHT_END = 23000L;
    private static final double SURGE_RADIUS = 32.0;
    private static final int EFFECT_DURATION_TICKS = 400;

    @Override
    public void onInitialize() {
        ServerTickEvents.END_WORLD_TICK.register(DreadSurge::onWorldTick);
    }

    private static void onWorldTick(ServerWorld world) {
        if (world.getTime() % SURGE_INTERVAL_TICKS != 0) {
            return;
        }

        long timeOfDay = world.getTimeOfDay() % 24000L;
        if (timeOfDay < NIGHT_START || timeOfDay > NIGHT_END) {
            return;
        }

        for (var player : world.getPlayers()) {
            Box searchArea = player.getBoundingBox().expand(SURGE_RADIUS);
            for (HostileEntity hostile : world.getEntitiesByClass(HostileEntity.class, searchArea, HostileEntity::isAlive)) {
                if (hostile.squaredDistanceTo(player) > SURGE_RADIUS * SURGE_RADIUS) {
                    continue;
                }

                hostile.addStatusEffect(new StatusEffectInstance(StatusEffects.SPEED, EFFECT_DURATION_TICKS, 0));
                hostile.addStatusEffect(new StatusEffectInstance(StatusEffects.STRENGTH, EFFECT_DURATION_TICKS, 0));
            }
        }
    }
}