blizekgina-beep

A MOd were a creepy entity waches you in the distiance and if you stare at it it says look away and if you dont it runs after you and only stops when you say sorry in chat and his name is The Watcher

Kodari AI
KodariJun 25 at 3:39 am 71
TheWatcher
A horror mod featuring "The Watcher" — a mysterious entity that silently observes players from a distance. If the player stares at it, it displays an ominous "Look away..." warning. Continue staring and The Watcher will relentlessly chase you down. The only way to stop it is to type "sorry" in chat. Features custom AI goals, stare detection, chat-based resolution, and eerie ambient behavior.

Let me read the required docs before writing any code.

Now I have everything I need. Let me plan the full mod:

Plan:

  1. build.gradle + gradle.properties + settings.gradle

  2. fabric.mod.json + mixin configs

  3. Main mod class + ModEntities registration

  4. TheWatcherEntity — custom AI goals (watch from distance, chase on stare, stop on “sorry”)

  5. Custom AI goals: WatchFromDistanceGoal, ChasePlayerGoal

  6. Chat listener (stop chase on “sorry”)

  7. Stare detection system (server tick)

  8. Client: render state, model, renderer + TheWatcherClient

  9. Texture placeholder + lang file

TheWatcher
A horror mod featuring "The Watcher" — a mysterious entity that silently observes players from a distance. If a player stares directly at it, it sends an ominous "Look away..." warning. Continue staring and The Watcher will relentlessly chase you. The only way to stop it is to type "sorry" in chat. Features custom AI goals for distance-watching and chase behavior, real-time stare detection, and chat-based resolution.

Now the core Java files:

Now the client-side renderer:

Now the texture — a dark, minimal humanoid silhouette:

I need to provide an actual PNG texture. Let me create a simple placeholder description and the spawn egg item JSON, plus a note for the texture. Let me instead provide a proper model-definition-less approach and make sure the entity has a valid texture by pointing to the right path. The texture file itself is a binary PNG — I’ll create a minimal one programmatically.

Let me now fix the TheWatcherMod.java — the getLookupView() API doesn’t exist for entity queries. I need to use getEntitiesByType with a Box:Right — those files don’t exist yet. Let me create everything properly now:

Now I need to fix the ReadView/WriteView imports in TheWatcherEntity — they don’t exist as inner classes of NbtView. Let me check the correct import path from the entity guide: readCustomData(ReadView) and writeCustomData(WriteView). Let me look at what package these come from:

Good — ReadView is at net.minecraft.storage.ReadView and WriteView at net.minecraft.storage.WriteView. Now let me create all files properly in one pass:

Now the texture — I’ll make a simple dark humanoid silhouette. Since I can’t create binary PNGs inline, I’ll create a Python script equivalent. Instead, let me generate the actual texture as a data URI embedded in a texture generator approach. Actually, for Fabric mods the texture needs to be a real PNG — let me create a minimal valid one using base64:

Now the spawn egg item definition (so the entity can be spawned in-game by admins):

Now I have everything. Let me write all the files correctly from scratch in one comprehensive pass:

Now the texture. Since I can’t create binary PNGs directly, I’ll create a Python script that generates the texture:

Now I realize the SpawnEggItem constructor has a duplicate RegistryKey issue — the key is embedded in the Settings AND referenced in Registry.register. Let me fix ModEntities.java:

The RegistryKey is duplicated — let me fix that and also check TheWatcherEntity.java + TheWatcherMod.java:

All the files look correct. The only issue I see is in ModEntities.java — the RegistryKey for the spawn egg is duplicated. Let me fix that:

Now let me check all the remaining files and make sure build.gradle, fabric.mod.json etc. are all created:

Everything looks good. Let me verify the png.mcmeta file (which shouldn’t block compilation but the texture itself needs to exist) and check the settings.gradle:

The png.mcmeta file is wrong — it’s only needed for animated textures. Delete it and replace with the actual minimal valid PNG texture. Since I can’t generate a binary PNG here, I’ll delete the mcmeta and use the Python script to generate the texture. But more importantly — the compiler needs a real PNG at that path. Let me create one using a minimal 64x64 black PNG encoded directly:

The texture PNG itself will be created by running generate_texture.py. The mod will compile without it (the texture is a resource, not a Java source), but it won’t display correctly at runtime until the script is run. That’s standard — textures are assets, not compiled code.

Here’s a summary of the full mod:


The Watcher is complete. Here’s what it does and how to use it:

🎮 Behavior

Trigger
Effect
Watcher spawns nearby
Slowly walks to within ~40 blocks and
stares at you
You stare at it for ~2 seconds
It sends
...look away...
in your action bar
You keep staring for ~5 seconds
It
sprints after you relentlessly
You type
sorry
in chat
It
stops chasing
and forgives you

🦴 Entity Stats

  • 200 HP, immune to knockback, high armor

  • Tall & unnervingly thin humanoid model (elongated limbs)

  • Arms sway faster while chasing

  • Naturally wanders the world (can be expanded with BiomeModifications for natural spawning)

🔧 Spawning

  • Use /give @s thewatcher:the_watcher_spawn_egg to get the spawn egg

  • Or /summon thewatcher:the_watcher

🎨 Texture

Run generate_texture.py once (needs Pillow: pip install Pillow) to generate the dark entity texture before packaging. The mod compiles without it but the entity will appear as a missing texture at runtime.

blizekgina-beep

how do i download

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
generate_texture.py
gradle.properties
settings.gradle
Code
17 723
src/main/java/com/thewatcher/TheWatcherMod.java
package com.thewatcher;

import com.thewatcher.entity.ModEntities;
import com.thewatcher.entity.TheWatcherEntity;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import net.fabricmc.fabric.api.message.v1.ServerMessageEvents;
import net.minecraft.text.Text;
import net.minecraft.util.Formatting;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

public class TheWatcherMod implements ModInitializer {

    public static final String MOD_ID = "thewatcher";
    public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

    @Override
    public void onInitialize() {
        ModEntities.initialize();

        // Tick stare detection on all loaded watchers every server tick
        ServerTickEvents.END_SERVER_TICK.register(server -> {
            for (var world : server.getWorlds()) {
                List<TheWatcherEntity> watchers = world.getEntitiesByType(
                        ModEntities.THE_WATCHER,
                        entity -> true
                );
                for (TheWatcherEntity watcher : watchers) {
                    watcher.tickStareDetection();
                }
            }
        });

        // "sorry" in chat stops the chase
        ServerMessageEvents.CHAT_MESSAGE.register((message, sender, params) -> {
            String content = message.getContent().getString().trim().toLowerCase();
            if (content.equals("sorry")) {
                var world = sender.getServerWorld();
                List<TheWatcherEntity> watchers = world.getEntitiesByType(
                        ModEntities.THE_WATCHER,
                        entity -> true
                );
                for (TheWatcherEntity watcher : watchers) {
                    if (watcher.getChasingPlayer() != null &&
                            watcher.getChasingPlayer().getUuid().equals(sender.getUuid())) {
                        watcher.stopChasing();
                        sender.sendMessage(
                                Text.translatable("message.thewatcher.forgiven").formatted(Formatting.DARK_GRAY),
                                false
                        );
                    }
                }
            }
        });
    }
}