Skip to content

SarusM/Screen-Friend

Repository files navigation

Screen Friend

A Desktop Goose-style pest for Minecraft. A tiny 3D mob lives on your screen — not in the world — walking over your HUD and open menus, and causing configurable mischief:

  • HUD element theft — it grabs your hearts, hunger or armor bar and drags it somewhere else on the screen. The bar keeps working; it slides back home after a cooldown, or you can drag it back with the mouse while any screen (e.g. your inventory) is open.
  • Item stealing — while your inventory (or any container screen showing your inventory) is open, it pulls a random stack out of a slot, carries it to the screen edge and really throws it out — an item entity drops in the world, exactly as if you pressed Ctrl+Q. Click the friend (or the carried item) before it reaches the edge to get the item back and send it fleeing.
  • Hotbar dragging — it shoves your whole hotbar (icons, selection highlight, numbers) left or right along the bottom edge. It drifts back to center after a cooldown.

The friend's look is configurable: pick any registered living mob — vanilla or modded — and its real model renders in miniature with walking and idle animations, facing its movement direction. The screen is a scene: up to five mobs can live on it at once, each with its own model, texture and size (add/remove them with the numbered slot bar in the customization panel). A scene can be saved as a named preset and loaded back any time; presets persist in the config file. Pranks stay one-at-a-time scene-wide, so a crowd of friends doesn't gang-rob your inventory. The dummy mob is genuinely ticked (pinned safely in the air, silent, no physics), so keyframed idle and ambient animations play too — axolotls wiggle, breezes swirl, bats flap, squids pulse, the dragon flaps. Walk-cycle speed is normalized to the mob's on-screen size, so sniffers lumber while chickens scurry. Rabbits, slimes, magma cubes and frogs don't walk — they hop across the screen in parabolic arcs (slimes really squash and stretch, rabbits kick their legs), scattering little colored specks on landing; snow golems leave a snow trail (showParticles toggles the specks).

Some mobs have extra idle habits: cats, wolves and parrots randomly sit down using their real sitting poses, bipeds (zombies, skeletons, endermen, piglins — anything with a humanoid model, modded included) fold down into a seat, and bats occasionally fly up and latch upside down to the top edge of your window, dozing there before fluttering off. Cats also come in all their vanilla coat variants — pick the texture with the Cat texture button in the customization panel (or catVariant in the config).

The Cloth Config screen (More Settings…) has an Events category: sliders for how often the random sit/roost happens (sitChancePercent, roostChancePercent), plus Trigger buttons that fire a specific event on demand — sit, bat roost, HUD-bar grab, hotbar drag, or an item steal (that one waits until a container screen with a stealable item is open, and expires after two minutes).

Requirements

Minecraft 1.21.11
Fabric Loader ≥ 0.19.3
Fabric API 0.141.x for 1.21.11
Java 21+
Optional ModMenu (config button) + Cloth Config (full settings screen) — the built-in customization panel (H) needs neither

Client-side only. You can join vanilla servers; the only server-visible action is the item throw, which goes through the vanilla container-click path (ClickType.THROW) — no custom packets, indistinguishable from Ctrl+Q.

Usage

  • The friend appears automatically when you join a world (if enabled).
  • G (rebindable, under Miscellaneous) summons/dismisses it.
  • H opens the customization panel: the scene bar (numbered slots, +/ to add or remove mobs, click a slot to edit that mob), a searchable list of every living mob (vanilla and modded), a live animated preview that follows your mouse, a per-mob size slider, the cat texture picker, preset save/load (name + Save, cycle + Load/✕), the aggressiveness preset and the per-ability toggles. The same panel opens from ModMenu's config button; a More Settings… button leads to the full Cloth Config screen when Cloth Config is installed.
  • It never blocks input: clicks pass through it, except clicks directly on it or on the item it is carrying.
  • To rescue a stolen item: click the friend or the floating item before it reaches the screen edge. Nothing actually leaves your inventory until the moment it throws.
  • To take a displaced bar back early: open any screen (inventory works) and drag the bar home with the mouse; it snaps in place when close.

Configuration

In-game screen via ModMenu (requires Cloth Config), or edit config/screen_friend.json directly (the mod fully works without the optional dependencies):

{
  "enabled": true,                 // master toggle (keybind flips at runtime)
  "mobModel": "minecraft:allay",   // any living entity id, incl. modded
  "scale": 28.0,                   // on-screen height in GUI pixels (8–120)
  "aggressiveness": "ANNOYING",    // PEACEFUL | ANNOYING | MENACE
  "mischiefMinSeconds": 20,        // min delay between pranks
  "mischiefMaxSeconds": 90,        // max delay between pranks
  "canMoveHudBars": true,          // per-ability permissions
  "canStealItems": true,
  "canDragHotbar": true,
  "hudReturnSeconds": 15,          // displaced bar cooldown before sliding home
  "hotbarReturnSeconds": 10,       // hotbar cooldown before drifting to center
  "protectedSlots": [],            // player inventory slot indices it must not touch
  "itemBlacklist": [],             // item ids it must never steal, e.g. "minecraft:elytra"
  "protectNamedItems": true        // never steal anvil-renamed items
}

Aggressiveness presets scale prank frequency: Peaceful never interferes (it just walks around), Annoying is the default, Menace pranks roughly 3× as often. The per-ability booleans always win.

Demo checklist

  1. Join a world → the friend appears and wanders the HUD.
  2. Wait (or set Menace) → watch it walk to your hearts and drag them across the screen; they slide back after hudReturnSeconds.
  3. Open your inventory with a few items → it walks to a slot, pulls the stack out and carries it toward the screen edge:
    • let it reach the edge → the item actually drops into the world;
    • or click it mid-carry → item returns to the slot, friend flees.
  4. Close the inventory → watch it grab the hotbar and haul it sideways.
  5. Set aggressiveness to PEACEFUL → it keeps strolling but never pranks.

Automated version

gradlew runClientGameTest runs the whole checklist unattended in a real client (world creation, input simulation, screenshots into run/clientGameTest/screenshots, assertions incl. "item entity really appeared in the world").

Building

gradlew build          # → build/libs/screen-friend-<version>.jar
gradlew runClient      # dev client

Technical notes

  • Mappings: Mojang official mappings (via Loom's fabric-loom-remap plugin id — 1.21.11 is the last obfuscated Minecraft version and the last one Yarn/intermediary cover, so mojmap is the forward-compatible choice).
  • The friend is rendered through the vanilla deferred GUI pipeline (GuiGraphics.submitEntityRenderState, the same picture-in-picture path as the inventory player preview) from a client-only dummy LivingEntity that is never added to the world.
  • HUD bars are repositioned by wrapping the vanilla HUD elements (HudElementRegistry.replaceElement on HEALTH_BAR/FOOD_BAR/ARMOR_BAR/ HOTBAR) with a pose translation — zero offset takes the untouched vanilla path, and no mixins into Gui are needed.
  • Exactly three small mixins exist: two on AbstractContainerScreen (hide the stolen stack's slot rendering while the theft is purely visual; expose leftPos/topPos for slot→screen coordinates) and one on Gui that hides the same stack on the HUD hotbar peeking out under the container screen (identity check, no-op unless a theft is in progress).

License

Copyright © 2026 SarusM. All rights reserved. The source is published for reference only — see LICENSE. No permission is granted to use, copy, modify or redistribute it without prior written consent.

About

Mobs that live on your screen. They walk over your HUD and interfere with playing: dragging your health bar, stealing items from your inventory, and running off with your hotbar.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages