Skip to main content

CLI tool for rendering Minecraft blocks from jar files

Project description

Minecraft Block Renderer

CI PyPI version Python Versions License: MIT

A Python CLI tool for rendering Minecraft blocks from jar files (vanilla or modded) into isometric PNG images.

Features

  • 🎮 Extract and render blocks from Minecraft jar files
  • 🎨 Support for vanilla and modded Minecraft
  • 📦 Isometric 3D-style rendering
  • ⚙️ Configurable output dimensions
  • 🎯 Batch rendering capabilities
  • 🌈 Support for transparency, tinting, and overlays
  • 🔧 GregTech Support: Dynamic material variants, voltage tiers, and machine overlays
  • ⚡ Multi-layer rendering with emissive effects

Installation

From PyPI

pip install mcrender-block

From source

git clone https://github.com/almajd3713/vibecoded_mc_renderer.git
cd vibecoded_mc_renderer
pip install -e .

For development

pip install -e ".[dev]"

Usage

Basic Commands

Render a single block

mcrender render path/to/minecraft.jar minecraft:stone --output stone.png --size 128

List all available blocks

mcrender list-blocks path/to/minecraft.jar

Render multiple blocks

mcrender batch path/to/minecraft.jar --blocks minecraft:stone,minecraft:dirt --output-dir renders/

Get jar file info

mcrender info path/to/minecraft.jar

GregTech Support

Render GregTech blocks with material/tier variants

# Render a machine with specific voltage tier
mcrender render gregtech.jar gregtech:electric_furnace \
  --tier lv \
  --active \
  --output furnace_lv_active.png

# Render with custom material color
mcrender render gregtech.jar gregtech:compressed_block \
  --material copper \
  --output copper_block.png

Render machines directly (GregTech-specific)

mcrender render-machine gregtech.jar electric_furnace \
  --tier hv \
  --active \
  --emissive 0.8 \
  --output furnace_hv.png

List GregTech resources

# List all available materials
mcrender list-gregtech gregtech.jar materials

# List voltage tiers
mcrender list-gregtech gregtech.jar tiers

# List machines with capabilities
mcrender list-gregtech gregtech.jar machines

# List material set styles
mcrender list-gregtech gregtech.jar material-sets

Command-Line Options

render command

  • --material, -m: Material for GregTech blocks (e.g., 'copper', 'steel')
  • --tier, -t: Voltage tier (e.g., 'lv', 'mv', 'hv')
  • --active, -a: Render in active state (for machines)
  • --size, -s: Output image size (default: 128)
  • --output, -o: Output file path

render-machine command

  • --tier, -t: Voltage tier (default: 'lv')
  • --active, -a: Render in active state
  • --material, -m: Material override for casing
  • --emissive, -e: Emissive glow strength (0.0-1.0, default: 1.0)
  • --size, -s: Output image size
  • --output, -o: Output file path

How It Works

  1. Extract Resources: Reads jar files as ZIP archives and indexes block assets
  2. Parse Models: Parses JSON blockstates and models, resolving parent chains
  3. Load Textures: Extracts PNG textures and applies transformations
  4. Render: Creates isometric projection with proper face ordering and alpha compositing

Development

Run tests:

pytest

Note: Tests automatically download Minecraft 1.12.2 jar (~10 MB) on first run and cache it for future use.

Format code:

black src/ tests/
ruff check src/ tests/

License

MIT

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

mcrender_block-0.1.0.tar.gz (34.0 kB view details)

Uploaded Source

Built Distribution

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

mcrender_block-0.1.0-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

Details for the file mcrender_block-0.1.0.tar.gz.

File metadata

  • Download URL: mcrender_block-0.1.0.tar.gz
  • Upload date:
  • Size: 34.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcrender_block-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8652e39c7f87e7abdb01ba7d55a43ca0cdfb0009a1d7c3320d4ac13ac778bf83
MD5 5070e25a4fd90da47a710998026d4587
BLAKE2b-256 791e7030e1ec48184c73fa3e3d6ea7864250122185368c91f426626a69b18a8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcrender_block-0.1.0.tar.gz:

Publisher: publish.yml on almajd3713/vibecoded_mc_renderer

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

File details

Details for the file mcrender_block-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcrender_block-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 35.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcrender_block-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30d80c451a609eafccc15397e3701845841e4986115329bd690101ed5827a42c
MD5 dbcc30742aa2908271949e4aefe69607
BLAKE2b-256 261fdc973b4cf890876266ef9e5d013a520341cbdbf509ba15acc3c1360c6332

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcrender_block-0.1.0-py3-none-any.whl:

Publisher: publish.yml on almajd3713/vibecoded_mc_renderer

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