{"id":18736354,"url":"https://github.com/matcool/node-anvil","last_synced_at":"2025-04-12T19:24:36.194Z","repository":{"id":98991201,"uuid":"203455888","full_name":"matcool/node-anvil","owner":"matcool","description":"Simple package for making your own minecraft regions","archived":false,"fork":false,"pushed_at":"2019-08-23T23:00:19.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-26T09:03:56.095Z","etag":null,"topics":["minecraft","minecraft-saves","npm"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matcool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-08-20T21:18:35.000Z","updated_at":"2022-10-03T07:39:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"c0a1728f-36d3-460d-96dd-cf72081db0b0","html_url":"https://github.com/matcool/node-anvil","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"3013442cad10518f45d28b0e7ca626782250c88e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matcool%2Fnode-anvil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matcool%2Fnode-anvil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matcool%2Fnode-anvil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matcool%2Fnode-anvil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matcool","download_url":"https://codeload.github.com/matcool/node-anvil/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248619768,"owners_count":21134534,"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","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":["minecraft","minecraft-saves","npm"],"created_at":"2024-11-07T15:20:27.214Z","updated_at":"2025-04-12T19:24:36.189Z","avatar_url":"https://github.com/matcool.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-anvil\nSimple package that can write region files in the [Minecraft anvil file format](https://minecraft.gamepedia.com/Anvil_file_format)\n\nOnly supports 1.14 and reading support is planned\n# Installation\n```\nnpm install node-anvil\n```\n# Usage\n```js\nconst anvil = require('node-anvil');\n\nlet region = new anvil.Region(0, 0);\n\n// 10x10 grass block platform\nregion.fill(new anvil.Block('minecraft', 'grass_block'), 0, 0, 0, 9, 0, 9);\n\n// Fill mapping\nlet blocks = [\n    new anvil.Block('minecraft', 'stone'),\n    new anvil.Block('minecraft', 'dirt')\n];\nregion.fill((x, y, z) =\u003e {\n    return blocks[Math.floor(Math.random() * blocks.length)];\n}, 0, 0, 10, 5, 5, 15);\n\n// Oak log facing up\nregion.setBlock(new anvil.Block('minecraft', 'oak_log', { axis: 'y' }), 0, 1, 0);\n\n// Persistent oak leaves on top of it\nregion.setBlock(new anvil.Block('minecraft', 'oak_leaves', { persistent: true }), 0, 2, 0);\n\n// Tall grass consists of two tall_grass blocks, one with half: 'lower', and the other with half: 'upper'\nregion.setBlock(new anvil.Block('minecraft', 'tall_grass', { half: 'lower' }), 1, 1, 1);\nregion.setBlock(new anvil.Block('minecraft', 'tall_grass', { half: 'upper' }), 1, 2, 1);\n\n// save() returns a Buffer with the data, but you can provide a file and it'll save there\nregion.save('r.0.0.mca');\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatcool%2Fnode-anvil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatcool%2Fnode-anvil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatcool%2Fnode-anvil/lists"}