.s_la.

lets create a minecraft horror mod for macOS and windows minecraft version 1.20.1 and forge. I want a monster which spawns sometimes and it hunts you down. it MAINLY spawns in caves. any caves. and it gives per attack 2 hearts away. so it doesnt make much damage. its fast as the player. you can fight it. if you beat it. it respawns after a day. when it spawns outside caves. it only spawns at night. so if your in daylight and not in a cave. your safe. if you're in night outside. it sometimes comes but it watches. make sure jumpscares included

I wanna use FORGE not fabric

Kodari AI
KodariJul 6 at 6:57 pm 32

I’ll build a Forge 1.20.1 horror mod with a custom hunter mob, cave-focused spawning, night-only outdoor “watcher” behavior, jumpscares, and a defeat/respawn cooldown.

DreadDweller
A Forge 1.20.1 horror mod adding the Dread Dweller — a fast hostile monster that mainly spawns in any cave, hunting players down and dealing light damage (2 hearts per hit) so it can be fought and beaten. Outside caves it only appears at night, often just watching from a distance instead of attacking. Includes jumpscare screen effects and sounds when it gets close, plus a one-day respawn cooldown after it's defeated. Compatible with macOS and Windows.

Project created: DreadDweller — a Forge 1.20.1 horror mod.

  • DreadDwellerEntity — hostile mob, 20 HP, movement speed matched to fast player pace, 4.0 attack damage (2 hearts/hit).

  • Spawning: checkDreadSpawnRules gives a strong chance in any cave (no sky visible) at any time, and only a small chance outdoors at night — never in daylight.

  • StalkAndWatchGoal — outdoor night spawns mostly just watch/stare and rarely commit to an attack, matching “it sometimes comes but watches.”

  • Jumpscare: entity syncs a flag when a player gets within 4 blocks; JumpscareHandler + JumpscareOverlay flash the screen and play a scream/growl client-side.

  • DreadWorldData (SavedData) + DreadEventHandler track its death time; spawn rules block respawning for 24000 ticks (one in-game day) after it’s defeated.

  • Uses vanilla zombie model/texture and sounds so no extra assets are needed — fully cross-platform (macOS/Windows) via standard ForgeGradle.

.s_la.

Compilation Error Missing required files

why

Kodari AI
KodariJul 6 at 7:02 pm 8

This explains it: this build environment (Kodari’s sandbox) can’t compile projects that depend on Minecraft/Forge/Mojang classes — it flags net.minecraft.*, net.minecraftforge.*, and com.mojang.* as “unsupported dependencies” and generates that IMPORTANT.txt instead of actually compiling. That’s not a real bug in your code — Forge mods are a special case that this in-browser compiler/preview can’t verify or build for you directly.

To actually get a working .jar:

  1. Install JDK 17 (Forge 1.20.1 requires it) on your Mac or Windows machine.

  2. Download this project’s files to a local folder that has the standard Forge MDK layout (which it does — build.gradle, settings.gradle, gradle.properties, src/main/java/...).

  3. Open a terminal in that folder and run:

    • gradle wrapper --gradle-version 8.1.1 (generates the wrapper jar, which isn’t included here)

    • ./gradlew build (macOS/Linux) or gradlew.bat build (Windows)

  4. Gradle will download Forge 47.2.20 + Minecraft 1.20.1 sources and compile everything locally — this can take several minutes the first time.

  5. Your compiled mod will appear at build/libs/dreaddweller-1.0.0.jar.

I can’t run Gradle/Forge builds inside this tool — I can only write and edit the source. If you hit an actual compile error once you build it locally (a real stack trace with file/line info), paste it here and I’ll fix the code directly.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
17 627
src/main/java/com/dreaddweller/DreadDwellerMod.java
package com.dreaddweller;

import com.dreaddweller.entity.DreadDwellerEntity;
import com.dreaddweller.event.DreadEventHandler;
import com.dreaddweller.init.ModEntityTypes;
import net.minecraft.core.registries.Registries;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.level.levelgen.Heightmap;
import net.minecraft.world.level.levelgen.WorldgenRandom;
import net.minecraftforge.event.entity.EntityAttributeCreationEvent;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraft.world.entity.SpawnPlacements;
import net.minecraft.world.entity.monster.Monster;

@Mod(DreadDwellerMod.MODID)
public class DreadDwellerMod {

    public static final String MODID = "dreaddweller";

    public DreadDwellerMod() {
        IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();

        ModEntityTypes.ENTITY_TYPES.register(modEventBus);

        modEventBus.addListener(this::commonSetup);
        modEventBus.addListener(this::registerAttributes);

        net.minecraftforge.common.MinecraftForge.EVENT_BUS.register(DreadEventHandler.class);
    }

    private void commonSetup(FMLCommonSetupEvent event) {
        event.enqueueWork(() -> {
            SpawnPlacements.register(
                    ModEntityTypes.DREAD_DWELLER.get(),
                    SpawnPlacements.Type.ON_GROUND,
                    Heightmap.Types.MOTION_BLOCKING_NO_LEAVES,
                    DreadDwellerEntity::checkDreadSpawnRules
            );
        });
    }

    private void registerAttributes(EntityAttributeCreationEvent event) {
        event.put(ModEntityTypes.DREAD_DWELLER.get(), DreadDwellerEntity.createAttributes().build());
    }
}