{"id":19826245,"url":"https://github.com/aternosorg/renderchest","last_synced_at":"2026-01-07T19:13:29.921Z","repository":{"id":142898244,"uuid":"614352990","full_name":"aternosorg/renderchest","owner":"aternosorg","description":"PHP library for rendering icons for Minecraft items directly from Minecraft's assets","archived":false,"fork":false,"pushed_at":"2025-10-09T16:34:46.000Z","size":251,"stargazers_count":26,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T09:23:58.419Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aternosorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-15T12:19:49.000Z","updated_at":"2025-10-09T16:34:08.000Z","dependencies_parsed_at":"2023-10-27T17:27:48.880Z","dependency_job_id":"4a30fa23-fbd5-481c-8ec7-115e253a22d0","html_url":"https://github.com/aternosorg/renderchest","commit_stats":null,"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/aternosorg/renderchest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aternosorg%2Frenderchest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aternosorg%2Frenderchest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aternosorg%2Frenderchest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aternosorg%2Frenderchest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aternosorg","download_url":"https://codeload.github.com/aternosorg/renderchest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aternosorg%2Frenderchest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013115,"owners_count":26085232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T11:09:51.918Z","updated_at":"2025-10-13T07:33:03.964Z","avatar_url":"https://github.com/aternosorg.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# renderchest\nRenderchest is a PHP library for rendering icons for Minecraft items directly from Minecraft's assets.\nA CSS library for using the icons in web pages is also generated.\n\n### Builtin models\nWhile most block/item models in Minecraft are saved in Minecraft's JSON model format nowadays, some models are still hard-coded in Java (e.g. chests, shulker boxes).  \nThese models are inaccessible to the game's resource pack system and cannot be rendered by renderchest.\nRenderchest therefore includes a number of built-in model files to replace these hard-coded models.\n\nRenderchest also includes model files for the heads of most mobs.\nThese models can be used by rendering the `mobheads` namespace.\n\n### Tinting\nSome textures are dynamically tinted by the game (e.g. vegetation and grass blocks).\nThis information can't be extracted from the asset files and therefore is hard-coded in renderchest.\n\n### Requirements\n- PHP 8.1+\n- ext-imagick\n- ext-pcntl (optional, allows more efficient multithreading)\n\n### Windows support\nWhile Renderchest will generally work on Windows, it will be much slower since asynchronous tasks are not supported.\nIt is therefore recommended to use the [Windows Subsystem for Linux](https://learn.microsoft.com/en-us/windows/wsl/install) to run renderchest on Windows.\n\n### Usage\nTo use renderchest, a valid Minecraft assets directory is required.\nIt can be extracted from a Minecraft client jar file.\n### CLI usage\n#### Installation\n```bash\ngit clone https://github.com/aternosorg/renderchest.git\ncd renderchest\ncomposer install\n```\n#### Rendering icons\n```bash\n./renderchest --assets path/to/assets/root --output path/to/output/dir --namespace minecraft\n```\n\n```\nOPTIONS\n  --assets, -a       Assets folder to use. Multiple assets folders are possible,\n                     but a base assets folder extracted from the Minecraft jar\n                     should always be included.\n  --fallback         Create a set of fallback textures as PNGs. Default: false\n  --format, -f       Output image format. Default: webp\n  --help, -?         Display this help.\n  --item-list, -i    Create a JSON file containing the names of all rendered\n                     items.\n  --namespace, -n    Asset namespace that the items should be rendered from.\n                     Default: minecraft\n  --output, -o       Output directory\n  --prefix, -p       Prefix to use for CSS classes. Default: rc-\n  --quality, -q      When generating very small icons, small issues (like\n                     z-fighting of faces close to each other) can occur. This\n                     option allows rendering images in a higher resolution and\n                     scaling them down for the final icon. Default: 2\n  --size, -s         Size of the generated item icons. Default: 64\n```\nRenderchest uses [Taskmaster](https://github.com/aternosorg/taskmaster) for asynchronous tasks, which can be configured [using environment variables](https://github.com/aternosorg/taskmaster#defining-workers-using-environment-variables).\n\n#### Using resource packs\nResource packs can be added by specifying multiple asset paths.\nIt is also important to always include the base assets folder extracted from the Minecraft jar.\n```bash\n./renderchest --assets path/to/resource-pack/assets --assets path/to/assets/root --output path/to/output/dir --namespace minecraft\n```\nMake sure to use the path to the assets folder within your resource pack, not the root of the resource pack.\n\n### Using the generated CSS library\nThe generated CSS library can be used to display the rendered icons in web pages.\nAll generated CSS classes are prefixed with `rc-` by default.\nWhenever a CSS class name contains a namespaced ID, the namespace is separated from the ID by an underscore (e.g. `minecraft:stone` -\u003e `minecraft_stone`).\n```html\n\u003cdiv class=\"rc-item rc-minecraft_magma_block\" style=\"width: 64px; height: 64px\"\u003e\u003c/div\u003e\n```\nThe `rc-item` class is required for all icons.\nAdditionally, a class for the item/block is required.\n\nEnchanted items can be displayed by adding the `rc-enchanted` class.\n```html\n\u003cdiv class=\"rc-item rc-minecraft_diamond_sword rc-enchanted\" style=\"width: 64px; height: 64px\"\u003e\u003c/div\u003e\n```\n\n#### Armor trims\nArmor trims can be displayed by adding a `rc-trim-[material]` class.\n```html\n\u003cdiv class=\"rc-item rc-minecraft_diamond_helmet rc-trim-minecraft_gold\" style=\"width: 64px; height: 64px\"\u003e\u003c/div\u003e\n```\n\n#### Decorated pots\nDecorated pots can be displayed by adding `rc-pot-1-[material-1]` and `rc-pot-2-[material-3]` classes.\n```html\n\u003cdiv class=\"rc-item rc-minecraft_decorated_pot rc-pot-1-minecraft_prize_pottery_sherd rc-pot-2-minecraft_angler_pottery_sherd\" style=\"width: 64px; height: 64px\"\u003e\u003c/div\u003e\n```\nOnly the first and third material are required because the other sides of the pot are not visible.\n\n#### Crossbow projectiles\nCrossbow projectiles can be displayed by adding `rc-projectile-[material]` classes.\n```html\n\u003cdiv class=\"rc-item rc-minecraft_crossbow rc-projectile-minecraft_tipped_arrow\" style=\"width: 64px; height: 64px\"\u003e\u003c/div\u003e\n```\n\n#### Dynamic tinting\nIcons can consist of two layers, which can be separately tinted using CSS.\nThis is necessary whenever colors can change dynamically based on item properties (e.g. dyed leather armor or potions).\n\nDynamic colors can be added by setting the `--rc-layer-1-tint` and `--rc-layer-2-tint` CSS variables.\n```html\n\u003cdiv class=\"rc-item rc-minecraft_leather_helmet\" style=\"--rc-layer-1-tint: #b02e26;width: 64px; height: 64px\"\u003e\u003c/div\u003e\n```\n\n### Using renderchest as a library\n#### Installation\n```bash\ncomposer require aternos/renderchest\n```\n\nWhen using renderchest as a library, the `ItemLibraryGenerator` class can be used to replicate the functionality of the CLI tool.\n```php\n(new ItemLibraryGenerator([\"path/to/assets\"], \"path/to/output\"))\n    -\u003esetNamespaces([\"minecraft\"])\n    -\u003esetSize(64)\n    -\u003esetQuality(2)\n    -\u003esetFormat(\"webp\")\n    -\u003erender();\n```\n\nIt is also possible to load specific models from a resource manager instead of rendering everything.\n```php\n$resourceManager = new \\Aternos\\Renderchest\\Resource\\FolderResourceManager([\"path/to/assets\"]);\n$model = $resourceManager-\u003egetModel(new \\Aternos\\Renderchest\\Resource\\ResourceLocator(\"minecraft\", \"item/stone\"));\n\n$image = $model-\u003erender(64, 64);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faternosorg%2Frenderchest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faternosorg%2Frenderchest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faternosorg%2Frenderchest/lists"}