Will It Host? / Blender

Can you run a Minecraft server in Blender?

It hosted#5 of 8 by difficulty

Yes. The process listening on port 25565 is Blender, and a vanilla Minecraft client connects to it and plays on it. This was the first one that renders the world instead of reporting on it: the terrain is real geometry, you are an object that moves, and the scene camera takes its yaw and pitch from your movement packets.

verdict
It hosted
A vanilla Minecraft client connected and played on it.
difficulty
#5 of 8
Ranked against everything else in the series, hardest first.
built withPython
protocolMinecraft 1.8.9
read the source on github β†’

How it works

Blender embeds CPython with the full standard library, so a real TCP server runs in Blender's own process. bpy is not thread-safe, so there is no background thread; the server ticks on bpy.app.timers every 20ms, the same model as the OBS build. It reads the look, dig and place packets the earlier builds threw away, so the camera follows your head, placed blocks appear as cubes in the viewport and break when you break them.

The part that nearly stopped it

Script re-runs wipe your state. Running the text block again re-executes the whole file, including the variable holding the server, so the cleanup saw a blank variable, reported it had stopped, and left the old socket bound and the old timer ticking against a server you could no longer reach. That cost the first evening.

What got it over the line

Parking the server and the timer handle in bpy.app.driver_namespace, which survives re-execution. Two smaller ones: a Blender timer that raises is silently unregistered, so the tick catches and prints instead; and 25,600 blocks as separate objects would flatten the viewport, so the terrain is one mesh with a quad per visible face and only placed blocks are real objects.

What it cannot do

Minecraft 1.8.9, the same target as the rest of the series. Breaking the original terrain is not reflected because the ground is a single mesh, and only blocks can be placed.

Why this is possible at all

A Minecraft Java server is a smaller thing than its reputation suggests. It is a socket, a packet codec and a game loop. The client opens one TCP connection, sends a handshake naming its protocol version, moves through login into the play state, and from then on both sides exchange length-prefixed packets describing chunks, entities and movement. None of that needs a game engine. It needs something that can hold a socket open and put the right bytes on it in the right order, which is why Blender can be made to do it and why the interesting part of each episode is the host rather than the protocol.

Every build in this series targets Minecraft 1.8.9 for one specific reason. In 1.8 a chunk is a flat byte array you can send uncompressed. From 1.9 onward chunk data is palette-encoded into bit-packed longs and the connection expects zlib, which is not something you can hand-write in VBA. 1.8.9 is the last release where the whole protocol is within reach of a scripting runtime that was never meant for it.

We have written both halves of that up properly: how the Minecraft server protocol works covers the wire format, and what a Minecraft server actually needs to run covers the four things a real one cannot do without.

Questions

Can Blender run a Minecraft server?

Yes. Blender ships a full CPython, so a script pasted into the text editor can import socket and listen on port 25565 inside the Blender process. It ticks on Blender's timer API rather than a thread because bpy is not thread-safe. The full source is on GitHub.

Does Blender actually show the world?

It does, which is what sets it apart from the readouts in Excel, Outlook and Obsidian. The terrain is a mesh, your player is an object, the camera is driven by your yaw and pitch at eye height, and blocks you place appear as cubes coloured by block ID. Press Numpad 0 and Blender is looking where you are looking.

The rest of the series

See the full Will It Host? board β†’

Or just host it properly

Blender is not where your survival world should live. AMD Ryzen 9700X, hard-reserved RAM, NVMe, online in under a minute with a free address, DDoS protection and a 7-day money-back guarantee.