{ "info": { "author": "Alex O'Neill", "author_email": "alex@molleroneill.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 3.7" ], "description": "# Minecraft Resource Generator\n\nThis is a python module aimed to enable simple generation of the many json files that are required for forge modding.\n\n### Version History\n\nThis tool will be updated to support the latest version of minecraft as soon as possible. For now, the latest version of this tool available for past versions of Minecraft can be found below:\n\n - Minecraft 1.14.x: Current version (v1.0.0)\n - Minecraft 1.13.x: v0.0.2\n\nNote that unless the minecraft data format changes between versions, this tool will still work on older versions of minecraft.\n\n\n---\n### Usage\n\nmcresources can build many common files that are required for forge modding, and provide utilities to manage a larger project. The following is an outline of the various methods and how to use them in the most efficient manner.\n\nAll files generated by mcresources will have a comment (`'__comment__'`) inserted to identify them. This also allows mcresources via the usage of `clean_generated_resources()` to delete all files that have been generated, allowing the user to see which ones are created manually, and/or manage updating older files to a newer configuration\n\nA few elements are common to multiple methods:\n - `name_parts`: This represents the resource location for a specific block or item. It can be specified as a string, i.e. `'block_ruby_ore'`, or as a list or tuple if the block uses directories as separators. This means that `('ore_blocks', 'ruby')` corresponds to the resource location `modid:ore_blocks/ruby`, and the resulting file `ruby.json` would be found in `modid/blockstates/ore_blocks/`\n\n - `conditions`: A single condition can either be specified as a fully specified dictionary (which will be inserted into the json verbatim), or as a string, which will be expanded to `{ 'type': string_condition }`\n\n - `item stacks`: An item stack can be specified as a fully specified dictionary (which will be inserted into the json verbatim), or as a string. As a string, it must represent an item resource location, i.e. `minecraft:golden_boots` will create the json `{ 'item': 'minecraft:golden_boots' }`. Additionally, you can prefix the string with `tag!` to specify that it represents a tag, i.e. `tag!forge:rods/wooden` will create the json `{ 'tag': 'forge:rods/wooden' }`\n\n##### Blockstates\n```python\ndef blockstate(self, name_parts: str or list or tuple, model: str = None, variants: dict = None)\n```\n - `name_parts` specifies the block resource location, as seen above\n - `model` specifies the model. If not present, it will default to `modid:block/name/parts`, meaning `blockstate('pink_grass')` will create the file `modid/blockstates/pink_grass.json`, which has a model of `modid:block/pink_grass`\n - `variants` specifies the variants as found in the json file. It should be a dictionary as per usual minecraft blockstate files. If it isn't present, it will default to an empty / single variant block: `'variants': { '': model }`\n\n##### Block Models\n```python\ndef block_model(self, name_parts: str or list or tuple, textures: str or dict = None,\n parent: str = 'cube_all')\n```\n - `name_parts` specifies the block resource location, as seen above\n - `textures` specifies the textures for this specific model. If it is a string, it will create the json: `'textures': { 'texture': textures }`. If provided as a dictionary, it will insert `'textures': textures`\n - `parent` specifies the parent model file\n\n##### Item Models\n```python\ndef item_model(self, name_parts: str or list or tuple, *textures: str or dict, parent: str = 'item/generated')\n```\n - `name_parts` specifies the item resource location, as seen above\n - `textures` specifies the textures. If textures are supplied as strings, i.e. `'base_layer', 'middle_layer' ...`, it will assign them sequentially to layers, i.e. `{ 'layer0': 'base_layer', 'layer1': 'middle_layer' ... }`. If a dictionary is provided, it will insert those in the same way as the block model\n - `parent` specifies the parent model file\n\n##### Shapeless Crafting Recipes\n```python\ndef crafting_shapeless(self, name_parts: str or list or tuple, ingredients: str or dict or list or tuple, result: str or dict, group: str = None, conditions: str or dict or list = None)\n```\n - `name_parts` specifies the recipe resource location. Note crafting recipes are automatically added to `modid/data/recipes`\n - `inredients` specifies the ingredients. It must be either a list / tuple of item stacks, or a string or dictionary representing an item stack. See above for valid item stack specifications.\n - `result` specifies the recipe result or output. It must be a single item stack\n - `group` specifies the group the recipe belongs to\n - `conditions` specifies any conditions on the recipe being enabled. It must be a list / tuple of valid condition identifiers, or a string or dictionary representing an item stack\n\n##### Shaped Crafting Recipes\n```python\ndef crafting_shaped(self, name_parts: str or list or tuple, pattern: list, ingredients: str or dict, result, group: str = None, conditions: str or dict or list = None)\n```\n - `name_parts` specifies the recipe resource location. Note crafting recipes are automatically added to `modid/data/recipes`\n - `pattern` specifies the pattern. It must be a list of strings, i.e. `['XXX', ' S ', ' S ']` for a pickaxe pattern. The keys must be the same as used in the ingredients field.\n - `inredients` specifies the ingredients. It can be a dictionary of single character keys to item stacks, or it can be a single item stack (which will default to the first key found, and as such should only be used if there is only one unique input)\n - `result` specifies the recipe result or output. It must be a single item stack\n - `group` is as above\n - `conditions` is as above\n\n##### Other Recipes\n```python\ndef recipe(self, name_parts: str or list or tuple, type_in: str, data_in: dict, group: str = None, conditions: str or dict or list = None)\n```\nThis is used to create modded recipes that are loaded via custom deserializers. As such, `name_parts` needs to include a subdirectory for the recipe type\n - `name_parts` specifies the recipe resource location.\n - `type_in` specifies the recipe type\n - `data_in` specifies the json data to be inserted into the recipe\n - `group` is as above\n - `conditions` is as above\n\n##### Tags\n```python\ndef item_tag(self, name_parts: str or list or tuple, *values: str or list or tuple, replace: bool = False)\ndef block_tag(self, name_parts: str or list or tuple, *values: str or list, replace: bool = False)\n```\nThese are used to create item and block tags respectively\n - `name_parts` specifies the tag resource location, as seen above\n - `values` specifies the values. It can be a single string for one value, or a list / tuple of strings for multiple values\n - `replace` specifies the replace field in the json, i.e. if the tag should replace a previous identical entry\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/alcatrazEscapee/mcresources", "keywords": "python,minecraft,resources,modding,forge", "license": "GPL-3.0", "maintainer": "", "maintainer_email": "", "name": "mcresources", "package_url": "https://pypi.org/project/mcresources/", "platform": "", "project_url": "https://pypi.org/project/mcresources/", "project_urls": { "Homepage": "https://github.com/alcatrazEscapee/mcresources" }, "release_url": "https://pypi.org/project/mcresources/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "An automatic resource creation tool for Minecraft 1.14 Forge modding", "version": "1.0.0" }, "last_serial": 5766851, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7f0c2b32c42ba2bc9ff33ee61f291abf", "sha256": "3b5f1a2e6a88192b72e9a551d4895724d46e4d8918eec6a92b065201ea82e9a5" }, "downloads": -1, "filename": "mcresources-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7f0c2b32c42ba2bc9ff33ee61f291abf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16258, "upload_time": "2019-05-01T00:55:03", "url": "https://files.pythonhosted.org/packages/2e/b6/35af8fe398187f34b1fbcaeb663ed4a978abc1bc335ea5d7f50b55d10c67/mcresources-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eae0bc961bb29bb56b0157bbf4412de3", "sha256": "9338e414a333cf9bd5db7b322ee64bbec5a2536a3bf5a2d1013dc18c6a824881" }, "downloads": -1, "filename": "mcresources-0.0.1.tar.gz", "has_sig": false, "md5_digest": "eae0bc961bb29bb56b0157bbf4412de3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4309, "upload_time": "2019-05-01T00:55:08", "url": "https://files.pythonhosted.org/packages/e9/45/ae85f5d337d56a8b67e9737173aaa6bc8545dc4818484eb809e33fc3b2fc/mcresources-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "4035051e4169fb7141ff84f238249924", "sha256": "4321ff4a85d49c3d25930033555bf8ff74017824c528341e345f02f5d3f0a951" }, "downloads": -1, "filename": "mcresources-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "4035051e4169fb7141ff84f238249924", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18064, "upload_time": "2019-05-01T01:51:16", "url": "https://files.pythonhosted.org/packages/2e/3f/8456c43db9684730eb875b4f59313f059ac5fb7d366460b257d12598a50c/mcresources-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2f4bd4b398084075c343d690009131a9", "sha256": "86a677c98c679d16b94f9ca568391388d8493db67725ccd24c0430b9a623f590" }, "downloads": -1, "filename": "mcresources-0.0.2.tar.gz", "has_sig": false, "md5_digest": "2f4bd4b398084075c343d690009131a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6223, "upload_time": "2019-05-01T01:51:19", "url": "https://files.pythonhosted.org/packages/3f/6a/4cffeba6434f0e6143e599f1f32839f8dde5d10f6084870e094d43c44dbd/mcresources-0.0.2.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "414d7a6ef4124e72e89efa04d96fbcf6", "sha256": "ebaf8d34cc4c38f4147428ef9ecd51a2e634463301f8704cd6ec395d44405dd2" }, "downloads": -1, "filename": "mcresources-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "414d7a6ef4124e72e89efa04d96fbcf6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22844, "upload_time": "2019-09-01T12:25:48", "url": "https://files.pythonhosted.org/packages/3f/19/26f6970138a73f726824ecc4ef670c10bfbc4a1b05934515fc4518e26a18/mcresources-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "28282b40ce6eefb5d61339acb1313b7c", "sha256": "b264137af71a6bc741e7d46b25e78857ed84e81fcd169535f5317be523e3cb8c" }, "downloads": -1, "filename": "mcresources-1.0.0.tar.gz", "has_sig": false, "md5_digest": "28282b40ce6eefb5d61339acb1313b7c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9466, "upload_time": "2019-09-01T12:25:52", "url": "https://files.pythonhosted.org/packages/e5/31/d0dfacb0acedb00219a12bb0c8bf14d2275165788f614efb5c5a7738a679/mcresources-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "414d7a6ef4124e72e89efa04d96fbcf6", "sha256": "ebaf8d34cc4c38f4147428ef9ecd51a2e634463301f8704cd6ec395d44405dd2" }, "downloads": -1, "filename": "mcresources-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "414d7a6ef4124e72e89efa04d96fbcf6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22844, "upload_time": "2019-09-01T12:25:48", "url": "https://files.pythonhosted.org/packages/3f/19/26f6970138a73f726824ecc4ef670c10bfbc4a1b05934515fc4518e26a18/mcresources-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "28282b40ce6eefb5d61339acb1313b7c", "sha256": "b264137af71a6bc741e7d46b25e78857ed84e81fcd169535f5317be523e3cb8c" }, "downloads": -1, "filename": "mcresources-1.0.0.tar.gz", "has_sig": false, "md5_digest": "28282b40ce6eefb5d61339acb1313b7c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9466, "upload_time": "2019-09-01T12:25:52", "url": "https://files.pythonhosted.org/packages/e5/31/d0dfacb0acedb00219a12bb0c8bf14d2275165788f614efb5c5a7738a679/mcresources-1.0.0.tar.gz" } ] }