A Minecraft Model Reader for Unity written in C#.
This project is archived. The resource loader code and block shaders are packed and moved to CraftSharp-Resource as a Unity package, and the resource test scene(shown in the screenshots) is incorporated into the main project here.
CornModel is a Minecraft resource loader which can be easily merged into and used by other Minecraft-related Unity projects. It parses Minecraft: Java Edition's json model format, reads models from json files and builds them into geometry data. For block models, face-culling data is contained in the loaded geometry data, so it is possible to build optimized large chunks of block meshes with all hidden faces culled.
The program is made and tested with Unity 2022.3.50f1, so it is recommended to use this version(or newer) of Unity to build this app.
Resource files will now be automatically downloaded if they're not present, so manual downloading is no longer necessary.
Most code in this repository is open source under CDDL-1.0, and this license applies to all source code except those mention their author and license or with specific license attached.
Some other open-source projects/code examples are used in the project, which don't fall under CDDL-1.0 and use their own licenses. Here's a list of them:
- MolangSharp
- Minecraft-Console-Client (Json Parser code)
The full CDDL-1.0 license can be reviewed here.