
camera
create a camera block that when i place to the world it gets a virtual cam on my pc that i can use in other apps.
10—fabricBoth1.21.1mod
What was built
- Added a Camera Block (creative tab: Functional) that works on both client and server sides.
- When a Camera Block is present and the client world is loaded, the mod captures the current view once each second and stores it as
camera-output/camera.pngin the game directory. - A lightweight local HTTP server starts on the client at
http://127.0.0.1:8765, exposing the live image at/camera.pngand a text status at/status, so other applications can pull the feed.
How to use
- Place a Camera Block in the world; keep the chunk loaded with a running client to keep the feed updating.
- Point external tools (e.g., OBS browser/image source or apps that can read from a local PNG) at
http://127.0.0.1:8765/camera.pngor directly at thecamera-output/camera.pngfile. - The camera output follows the player's current view while the block exists in the loaded area.
Notes and limitations
- This is a software feed; it does not install a system-level virtual webcam driver. Use the HTTP endpoint or PNG file in apps that can consume those sources.
- Frames only update while the client is running and the camera block’s area is loaded; if you leave or pause the world, the feed stops refreshing.
- Orientation uses the player’s perspective rather than a fixed block-facing view to avoid camera jumps.
Server Validation
✅ Server validation passed - The mod was tested on a real Minecraft server and loaded successfully.