SteonMod
Minecraft X Half-Life screenshot
PassthroughSource only

Minecraft X Half-Life

Play Half-Life as Steve, with Minecraft running your movement: a port of SkyCraft to Half-Life.

Source Follow

Play Half-Life as Steve, with Minecraft running your movement: a port of SkyCraft (Minecraft-in-Skyrim) to Half-Life See the README below for details.

Minecraft X Half-Life

Play Half-Life as Steve, with real Minecraft running your player. It's a port of SkyCraft (Minecraft-in-Skyrim) to Half-Life.

Half-Life and Minecraft run side by side. Minecraft is hidden: its physics move you through Half-Life's maps, its blocks, items, mobs and arrows are drawn inside Half-Life, and its hotbar, inventory and menus show over Half-Life's screen. Half-Life's monsters and breakables can be hit with Minecraft weapons, and they hurt you back in Minecraft.

Requirements

  • Windows 10 or 11
  • Half-Life on Steam (the 25th anniversary update), in Steam's default library folder. Set half_life in config.yaml if it's somewhere else.
  • Git for Windows, which includes Git Bash
  • Python 3.10+ with pip install pillow pyyaml
  • Visual Studio 2019 Build Tools with the Desktop development with C++ workload (MSVC v142)
  • Minecraft: Java Edition installed and run once. Steve's skin is read from its game files; or set skin in config.yaml to any 64x64 skin PNG.

Setup (once)

In Git Bash:

git clone https://github.com/SawyerTheNerd/Minecraft-X-HalfLife.git
cd Minecraft-X-HalfLife
bash tools/build_tools.sh      # sources, model tools and Java (a few minutes)
python build.py --install      # builds the mod and installs it into Half-Life

tools/build_tools.sh does three things:

  • fetches Valve's Half-Life SDK into hlsdk/ and SkyCraft into skycraft/, at pinned commits, and applies the changes in patches/
  • builds the model tools mdldec and studiomdl
  • downloads a portable Java 25 for Minecraft

Play

python play.py                 # Hazard Course
python play.py c1a0            # or any map
  • The first start downloads Minecraft 26.3, which takes a few minutes. Minecraft's window hides itself once it has linked with Half-Life, and it closes when Half-Life closes.
  • Click into the Half-Life window and play.
  • After changing any code, run python build.py --install again.
  • To remove everything that --install added to Half-Life, run python build.py --uninstall.

Controls

Minecraft's keys, played from the Half-Life window:

KeyAction
WASD, SpaceMove, jump
ShiftSneak. Hold it walking into a gap too low to crouch through (vents, pipes) to crawl.
CtrlSprint
Mouse buttonsAttack and mine; use and place
1–9, mouse wheelHotbar
EInventory
GHalf-Life's use (buttons, doors)
OMinecraft's pause menu
F5Third person
Esc, F6, F9, ~Half-Life's menu, quicksave, quickload, console

Settings

Settings are in config.yaml:

  • minecraft:
    • dev (default): Minecraft runs from the source in skycraft/, offline as minecraft_name, with no login.
    • account: uses SkyCraft's release with your Microsoft account. This release doesn't include this project's Minecraft-side changes (crawling, mob pathfinding).
  • half_life, skin: see Requirements.

How it works

Half-Life plays the part SkyCraft's Skyrim plugin normally plays, speaking SkyCraft's shared-memory protocol (Local\SkyCraft_v1, defined in skycraft/protocol/skycraft_protocol.h). One Minecraft block is 40 Half-Life units, so Gordon's 72-unit height is Steve's 1.8 blocks.

PieceWhereJob
Map collisionlink/bsp_collision.cpp, link/collision_stream.cppSends the map's faces to Minecraft as exact triangles, plus the invisible clip brushes (fences, railings) taken from the player hull. Doors, lifts and other brush entities are updated as they move.
Client linklink/mclink_client.cppLook direction, teleports, keys and the cursor, water, the third-person camera, level changes
Server linklink/mclink_server.cppHalf-Life's monsters and breakables become hittable in Minecraft; damage and death are shared between the games
Drawinglink/world_render_gl.cpp, link/overlay_gl.cppMinecraft's blocks, entities and player model drawn in Half-Life's world (lit by Half-Life's light), and Minecraft's screen over Half-Life's
Movementlink/mclink_shared.cpp, plus a hook in pm_shared.cWhile linked, Gordon's position is Minecraft's, interpolated between its physics ticks
Steve modelssteve/*.pyBoxes in the Minecraft skin layout, rigged to Half-Life's skeletons: arms on every weapon, a body, a multiplayer model
Engine hookspatches/hlsdk.patchThe calls from Half-Life's client and server code into link/
Minecraft sidepatches/skycraft.patchCrouching and crawling under Half-Life geometry, mob pathfinding on it, a body that faces where you look, no digging into the map

To check the map conversion offline, run link/test/bsp_test.cpp: it converts a map and verifies the collision stream and the clip-brush surfaces.

Known issues

These are tracked in TASKMANAGER.md.

  • Some newer pieces haven't been play-tested across the whole game yet: mob pathfinding on Half-Life maps, shared death, and smoothness on every map.
  • account mode lacks the Minecraft-side changes (see Settings).
  • Steam's overlay shortcut, Shift+Tab, collides with sneak plus the player list. Change Steam's overlay key if it gets in the way.

Credits and licences

  • SkyCraft by chasmlol (MIT): the Minecraft mod and protocol this is built on. Its source isn't included here: tools/fetch_sources.sh downloads it, then applies patches/skycraft.patch.
  • Half-Life SDK by Valve, under the Half-Life 1 SDK licence. It's also downloaded rather than included, then patched with patches/hlsdk.patch.
  • Model tools: mdldec from xash3d-fwgs, and Valve's studiomdl.
  • Half-Life and Minecraft themselves aren't included. You need your own copies.

From the project's repository, fetched . Images load from GitHub.

Releases

Feed

No releases yet. Follow the project to hear when the first one comes out.

Works for me

Did it work on your PC? A quick report tells other players which versions are safe to try.

Sign in to add a report

Forks & ports

Built on SkyCraft.

Also built on SkyCraft

Discussion

No posts yet. Ask a question, share your setup or post a clip.

Sign in to post