{"id":13730358,"url":"https://github.com/dougbinks/enkiMI","last_synced_at":"2025-05-08T02:32:21.386Z","repository":{"id":45853228,"uuid":"88884809","full_name":"dougbinks/enkiMI","owner":"dougbinks","description":"C and C++ Minecraft Importer library","archived":false,"fork":false,"pushed_at":"2024-08-23T14:11:25.000Z","size":235,"stargazers_count":103,"open_issues_count":1,"forks_count":12,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-11-09T17:46:41.524Z","etag":null,"topics":["minecraft","minecraft-constructions","minecraft-java-edition","nbt-library","voxel","voxel-data","voxel-terrain","voxels"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dougbinks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"License.txt","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},"funding":{"github":"dougbinks","patreon":"enkisoftware","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://www.enkisoftware.com/avoyd"}},"created_at":"2017-04-20T16:01:47.000Z","updated_at":"2024-10-27T20:34:45.000Z","dependencies_parsed_at":"2024-08-23T15:54:54.453Z","dependency_job_id":null,"html_url":"https://github.com/dougbinks/enkiMI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dougbinks%2FenkiMI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dougbinks%2FenkiMI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dougbinks%2FenkiMI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dougbinks%2FenkiMI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dougbinks","download_url":"https://codeload.github.com/dougbinks/enkiMI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224695435,"owners_count":17354405,"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-constructions","minecraft-java-edition","nbt-library","voxel","voxel-data","voxel-terrain","voxels"],"created_at":"2024-08-03T02:01:13.722Z","updated_at":"2024-11-14T21:30:44.054Z","avatar_url":"https://github.com/dougbinks.png","language":"C","readme":"Support development of enkiMI through [Github Sponsors](https://github.com/sponsors/dougbinks) or [Patreon](https://www.patreon.com/enkisoftware)\n\n[\u003cimg src=\"https://img.shields.io/static/v1?logo=github\u0026label=Github\u0026message=Sponsor\u0026color=#ea4aaa\" width=\"200\"/\u003e](https://github.com/sponsors/dougbinks)    [\u003cimg src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" alt=\"Become a Patron\" width=\"150\"/\u003e](https://www.patreon.com/enkisoftware)\n\n![enkiMI Logo](https://github.com/dougbinks/images/blob/master/enkiMI_logo_no_padding.png?raw=true)\n# enkiMI\n\n## enki Minecraft Importer\n\nA permissively licensed lightweight C and C++ Minecraft Importer library.\n\n## Building\n\nA cmake file is included for the example code, but to use in your project simply add the 2 .c the files in [/src](https://github.com/dougbinks/enkiMI/tree/master/src) into your project and add the director to your include paths.\n\n## Using\n\nenkiMI currently includes NBT file reading (compressed or uncompressed), and region/anvil file chunk extraction.\n\n```\nFILE *fp = fopen( \"../example/r.1.0.mca\", \"rb\" );\nenkiRegionFile regionFile = enkiRegionFileLoad( fp );\nfor( int i = 0; i \u003c ENKI_MI_REGION_CHUNKS_NUMBER; i++ )\n{\n    enkiNBTDataStream stream;\n    enkiInitNBTDataStreamForChunk( regionFile,  i, \u0026stream );\n    if( stream.dataLength )\n    {\n        enkiChunkBlockData aChunk = enkiNBTReadChunk( \u0026stream );\n        enkiMICoordinate chunkOriginPos = enkiGetChunkOrigin( \u0026aChunk ); // y always 0\n        printf( \"Chunk at xyz{ %d, %d, %d }  Number of sections: %d \\n\",\n            chunkOriginPos.x, chunkOriginPos.y, chunkOriginPos.z, aChunk.countOfSections );\n    }\n    enkiNBTFreeAllocations( \u0026stream );\n}\nenkiRegionFileFreeAllocations( \u0026regionFile );\nfclose( fp );\n```\n\n## Credits\n\n* [Miniz from richgel999](https://github.com/richgel999/miniz)  \n* Example model [r.1.0.mca Dinner Party](http://www.planetminecraft.com/project/minecraft-custom-modeling-dinner-party/) by Vanillaburp - [Youtube](https://www.youtube.com/user/vanillaburp) - [Twitter @Vanillaburp](https://www.twitter.com/Vanillaburp)  \n* Thanks to Voxtric for their [C# Minecraft Level Ripper](https://github.com/Voxtric/Minecraft-Level-Ripper) which got us started  \n* [ephtracy for the Minecraft palette colours](http://ephtracy.github.io/)  \n* Thanks to [WesterosCraft](http://www.westeroscraft.com/guide), [MrBatou](https://www.planetminecraft.com/project/cuirass-dsd-401-by-mrbatou-download-cinematic/), and [Greenfield City](http://www.greenfieldmc.net) for letting us use their Minecraft constructions to test the importer with our game [Avoyd](https://www.avoyd.com)  \n* Breno Machado for reporting a chunk loading issue and assisting with testing\n* [Nicolas Bissig](https://github.com/NicolasBissig) for reporting an extended height (Minecraft v1.17+) chunk loading issue and assisting with testing\n\n[![Two Minecraft constructions imported into Avoyd: Greenfield City and MrBatou Cuirassé DSD-401 with link to Youtube showcase video](https://raw.githubusercontent.com/dougbinks/images/master/Avoyd_2021-01-18_YoutubeThumbnailForGithub.jpg)](https://www.youtube.com/watch?v=n8oiVRhzwxE)\n\n\n## License (zlib)\n\nCopyright (c) 2017 Juliette Foucaut and Doug Binks\n\nThis software is provided 'as-is', without any express or implied\nwarranty. In no event will the authors be held liable for any damages\narising from the use of this software.\n\nPermission is granted to anyone to use this software for any purpose,\nincluding commercial applications, and to alter it and redistribute it\nfreely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must not\n   claim that you wrote the original software. If you use this software\n   in a product, an acknowledgement in the product documentation would be\n   appreciated but is not required.\n2. Altered source versions must be plainly marked as such, and must not be\n   misrepresented as being the original software.\n3. This notice may not be removed or altered from any source distribution.\n\n\n\n\n","funding_links":["https://github.com/sponsors/dougbinks","https://patreon.com/enkisoftware","https://www.enkisoftware.com/avoyd","https://www.patreon.com/enkisoftware"],"categories":["File I/O","C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdougbinks%2FenkiMI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdougbinks%2FenkiMI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdougbinks%2FenkiMI/lists"}