Skip to main content

MLang - Minecraft scripting language with WebSocket bridge

Project description

MLang — Minecraft Scripting Language

Custom programming language for controlling Minecraft. Write .GLang scripts, run them with a Python interpreter connected via WebSocket to the MLang Fabric mod bridge.

Install

pip install mlang

Or from source:

git clone https://github.com/Gamer542-arch/MLang
cd mlang/mlang
pip install -e .

Quick Start

1. Run a script

python -m mlang script.glang

2. Interactive REPL

python -m mlang

3. Connect to Minecraft

import asyncio
from mlang.bridge import BridgeClient

async def main():
    bridge = BridgeClient()
    await bridge.connect()
    await bridge.player_teleport(0, 64, 0)
    await bridge.chat_send("&aHello from Python!")
    await bridge.disconnect()

asyncio.run(main())

Features

  • GLanguage — C#-like scripting language with full interpreter (lexer, parser, AST, tree-walk)
  • MC Bridge — WebSocket JSON-RPC client for the MLang Fabric mod
  • GUI System — 17 widget types, 7 themes (dark, neon, glass, future...), animations
  • CLI + REPL — Run scripts or interactive development

Requirements

  • Python 3.10+
  • Minecraft 1.21.8 with Fabric Loader and MLang Bridge mod

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlang_py-1.0.1.tar.gz (39.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlang_py-1.0.1-py3-none-any.whl (42.7 kB view details)

Uploaded Python 3

File details

Details for the file mlang_py-1.0.1.tar.gz.

File metadata

  • Download URL: mlang_py-1.0.1.tar.gz
  • Upload date:
  • Size: 39.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mlang_py-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7fe4ea8bcb584f29550ba9537e762b6505cc998ebdd0fd2f168154a7e0b52f89
MD5 143e470cf9d899b31d75b70b134fbf8c
BLAKE2b-256 8b57c0f63e2f1769873c3aa2647b1d74f630e34bfc4bf2f4047e84d16ced8d06

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlang_py-1.0.1.tar.gz:

Publisher: publish.yml on Gamer542-arch/Mlang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mlang_py-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: mlang_py-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 42.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mlang_py-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a132b91a9f5825705b234b6570986d0df9e0e92680f42c2957c1f670386ecfd
MD5 806eda7a65e7f11004460ab2bf5d1c2c
BLAKE2b-256 c64b36139b6d53e41bfdb8b2c127d56bfb4324871f49187abbcca8082fe02c6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mlang_py-1.0.1-py3-none-any.whl:

Publisher: publish.yml on Gamer542-arch/Mlang

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page