跳到正文

MinePython

作者:liliastdout

Write real Python 3.12 on a programmable ESP32 block. A full in-game editor with LSP and autocomplete, redstone I/O, data I/0, persistent and volatile memory (RAM), and wireless networking between chips

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

MinePython – write real Python inside Minecraft

Place a block. Right-click it. Write Python. Watch it run.

MinePython puts a programmable ESP32 micro-controller into your world and runs a real, from-scratch Python interpreter on it: not command blocks, not a config language, not Lua wearing a costume. You open a full in-game code editor, write an actual program, flash it to the chip, and it runs every tick while powered.      *also offers an embedded C++ oppertiunity (used GCC and clang)

Your very first program can be three lines and blink a redstone lamp. Your hundredth can be a self-coordinating network of controllers spread across the world. Same block, same language, you decide how deep to go.


Your first two minutes

  1. Place an ESP32 and right-click it. A starter program is already loaded.
  2. Drop a lever on the back face and a redstone lamp on the front.
  3. Code your software:
  4. Hit Run, flip the lever.
 

Why it’s different

Every other “computer” mod hands you an API that hides the hard parts. MinePython hands you the primitives and lets you build the hard parts yourself, which is exactly where the fun (and the learning) lives. There’s no built-in sendMessage() that magically networks two chips. There’s a radio that moves bits, and you decide what those bits mean. The moment you hit a wall, the solution is something you invent, not something you look up.

It’s a genuine on-ramp for learning Python (write a line, watch a lamp react, in a world you already know) and a deep enough sandbox that experienced programmers build routers, protocols, and distributed systems out of raw bits.

<- ESP32

    <- Pocket ESP (PESP)


What you can build

Redstone, in code. Up to four GPIO sides read and drive redstone: OUT.high(), if DATA.HIGH:, analog strengths, timed pulses, live direction switching. No more repeater spaghetti; one chip drives exactly the line you wired.

Memory that remembers. Ram() storage survives stop/start and chunk reloads: counters, buffers, network inboxes, the save-state for your contraption.

Memory that flees. Ram.JITC() storage only lives until the esp ends. Design cachesystems and more using the Just-In-time-cache

Wireless networks. Ports, sockets, framed packets, and a tunable clock between chips. Build sensor meshes, remote controls, health-checked node networks; the protocol is yours to design.

The world itself. Sounds, particles, chat / title / action-bar output, and a full server-command API when cheats are on.

Sensors & portable storage (S3). Read items, sounds, and the block above as data words; save JSON to EMC chips you can physically pull and carry to another controller. Your data and your code as tradeable items.

Real concurrency (AWC chip). Cooperative worker threads with locks and joins, so one chip can poll, listen, and react at once.


MinePython Hardware and Software Chips

MinePython doesnt want to bee a mod that introduces a god block like a command block, it adds a programmable block you can extends with a lot of Software and Hardware Chips.

for not to spoiler i only list some:

FileSystem: save files persistent and carry them from esp to esp

EchoScanner: track learned items to find ores and co. with it

VitalChip: track your hearts, hunger bar and use them to code with that

AsyncWorkerChip: work with async code!

Chatwork Chip: read and write into the global chat!

+5 more

    *I am working on more chips, but i want you to give me feedback on your ideas


It’s a real language

Big-integer math, floats, strings and f-strings, lists / tuples / dicts / sets, comprehensions, generators, classes with inheritance and dunder methods, exceptions, closures, decorators, and a multi-file import system, written exactly as you’d write Python 3. A built-in API catalog (with a What / Why / Example for every feature) and a guided tutorial mean you can learn it without ever leaving the game.

The editor is a real editor, too: syntax highlighting, autocomplete, hover docs, live error-checking with line/column diagnostics, and a multi-file project explorer.

C++ compability

Do you want to program cool gadgets but are more used to C++? then MinePython is also somthing for you. With 2.0 MinePython also introduces C++ by using the C++ toolchain Software upgrade chip you need to craft. C++ is running inside WASM (webassembly) and cant harm your computer, it just introduces real C++ (C++20) into your codeing possibiltys including clang autocomplete. The GCC is embedded inside this jar bundle.


Upgrade as you go

Right-click the chip with a firmware card to upgrade it. The card isn’t consumed, so one card flashes any number of chips:

  • ESP32 (Standard): externally powered baseline. (GPIO0)
  • ESP32 Dev: faster; adds serial I/O and developer tooling.
  • ESP32-S3: self-powered (all four pins free), bigger RAM, multi-file projects, sensors, EMC storage.
  • ESP32-S4: self-powered (all four pins free), bigger RAM, bigger Flash, multi-file projects, integraded FS, integraded EMC
  • ESP32-S3 Dev: everything, fastest, biggest flash budget.
  • ESP32-Pocket: a transportable ESP for your way to go

Then slot hardware chips (EMC storage, AWC threads, WR range, DRM memory) and software chips into the equipment bays to extend a controller live, while it’s running. Pull a chip mid-program and the code reacts honestly: nothing is hidden, nothing silently breaks.

Showcase


Status

Beta, in active development. The core is stable and runs smoothly, but this is an early public release: expect rough edges, and please report bugs. Built for Fabric, Minecraft 1.21.1 (requires Fabric API). Optional Jade support shows each chip’s name, firmware, and run-state on the HUD.


On the roadmap

  • Nether storage: a slow, persistent, network-free data layer built on the Nether’s coordinate ratio

If real Python in Minecraft sounds like your kind of thing, drop a chip and write your first three lines. Feedback and bug reports are very welcome.

Here are some Textures i made in Aseprite for this mod:


常见问题

MinePython 支持哪些 Minecraft 版本?

MinePython 支持 Minecraft Java 版 1.20.1–1.21.1,共 2 个版本,可用的加载器:Fabric / Forge。下载时注意选择和你游戏版本一致的文件。

MinePython 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

liliastdout 的其他作品

查看全部 →