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.2.tar.gz (34.3 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.2-py3-none-any.whl (35.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcrender_block-0.1.2.tar.gz
  • Upload date:
  • Size: 34.3 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.2.tar.gz
Algorithm Hash digest
SHA256 833b69e84ae54bd0d6dea8d327225023f27e39d7e97c26af6f92a2d922548d0d
MD5 798307dc6c5805c529976c7cee7727ec
BLAKE2b-256 20e13b0be6b7e736c0e6e949eed5f0432c06b472ebe244f8a4d162461ff34bf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcrender_block-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: mcrender_block-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 35.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ed6ce802745fcd2ae25e8c120366e6a0e1c30a134aad5238fb7c679bb79566b8
MD5 ea2dcf362d4a079daa4940aa8d723bac
BLAKE2b-256 69213c3973afba118007af94af6b5a6210bc172bb8e0441dacd59b2a26152efa

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcrender_block-0.1.2-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