{"id":37806523,"url":"https://github.com/anbcodes/cmc","last_synced_at":"2026-01-16T15:30:31.893Z","repository":{"id":247988497,"uuid":"827430659","full_name":"anbcodes/cmc","owner":"anbcodes","description":"cmc is a work-in-progress Minecraft client written in C. It currently supports joining servers with compression, encryption, and authenticated login.","archived":false,"fork":false,"pushed_at":"2025-04-15T22:42:03.000Z","size":845,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-15T23:27:03.670Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","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/anbcodes.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,"zenodo":null}},"created_at":"2024-07-11T16:21:49.000Z","updated_at":"2025-04-15T22:42:06.000Z","dependencies_parsed_at":"2025-04-08T21:24:59.413Z","dependency_job_id":"5d567913-d3d8-44eb-8511-4aad922b16a1","html_url":"https://github.com/anbcodes/cmc","commit_stats":null,"previous_names":["anbcodes/cmc"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anbcodes/cmc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anbcodes%2Fcmc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anbcodes%2Fcmc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anbcodes%2Fcmc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anbcodes%2Fcmc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anbcodes","download_url":"https://codeload.github.com/anbcodes/cmc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anbcodes%2Fcmc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-16T15:30:31.662Z","updated_at":"2026-01-16T15:30:31.799Z","avatar_url":"https://github.com/anbcodes.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cmc\n\n## TODO\n- Optimize `create_chunk_and_light_data_packet`\n- Optimize `chunk_section_update_mesh`\n\n![cmc-1](https://github.com/anbcodes/cmc/assets/31807975/58914050-79d8-4e23-8efa-4880a7b58348)\n\n## Project setup\n\n### Debian Linux\n\nIf you are on debian linux run `./dev-setup.sh` and `./import-data.sh`.\n\nTo build run\n- `mkdir build \u0026\u0026 cd build`\n- `cmake ..`\n- `cd ..`\n- `cmake --build build -j8`\n\nTo run\n- Create a Minecraft profile and set a custom Java executable to the path of `custommc.sh`\n- Run that Minecraft profile which creates a file called `./run-with-token.sh`\n- Edit that file to change the server hostname and port.\n- Run `./run-with-token.sh`\n\nTo run with a local server online mode turned off (the final two args are unused auth placeholders)\n- `./build/cmc \u003cany-username\u003e \u003chost\u003e \u003cport\u003e _ _`\n\n### Generic instructions\n\n- `mkdir lib`\n- Download the prebuilt WGPU libraries from\n  https://github.com/gfx-rs/wgpu-native/releases and put the extracted zip in\n  the `lib/wgpu` directory\n- Download the GLFW sources into `lib/glfw` from the version pointed to from\n  https://github.com/gfx-rs/wgpu-native/tree/trunk/examples/vendor\n- From the main directory, run `git clone https://github.com/recp/cglm.git -o ./lib/cglm` to\n  get cglm. It works as a header-only library.\n- Retrieve `blocks.json` from the server jar with the following and place it in\n  `/data`.\n\n```\njava -DbundlerMainClass=net.minecraft.data.Main -jar paper-1.20.6-145.jar --reports\n```\n\n- To load default client resources, copy your client jar from\n  `~/.minecraft/versions` to `/data` and extract it with `gunzip 1.20.6.jar`. To\n  clean things up you can `rm *.class` as these files are not needed.\n- To compile and run follow the instructions above\n\n## Features\n\n- Offline and online mode support\n- Encryption support\n- Basic rendering\n- Building and breaking blocks\n- Player movement\n\n## Debugging\n\nIf there is a core dump:\n\n```\ncoredumpctl dump -r `pwd`/a.out \u003e core \u0026\u0026 gdb a.out -c core\n```\n\n## Notes on how I got started with a WebGPU example in C\n\n- `framework.h` and `framework.c` are from\n  https://github.com/gfx-rs/wgpu-native/tree/trunk/examples/framework\n- `main.c` and `shader.wsgl` are from\n  https://github.com/gfx-rs/wgpu-native/tree/trunk/examples/triangle\n- In `main.c` I updated the includes to their local locations:\n\n```\n#include \"wgpu/webgpu.h\"\n#include \"wgpu/wgpu.h\"\n// ...\n#include \"GLFW/include/GLFW/glfw3.h\"\n#include \"GLFW/include/GLFW/glfw3native.h\"\n```\n\n- I added\n\n```\n#define GLFW_EXPOSE_NATIVE_WAYLAND\n#define GLFW_EXPOSE_NATIVE_X11\n```\n\nbefore\n\n```\n#include \"GLFW/include/GLFW/glfw3.h\"\n```\n\n- I commented out this line that causes an error (probably a mismatched wgpu\n  version)\n\n```\n//  .depthSlice = WGPU_DEPTH_SLICE_UNDEFINED,\n```\n\n## To figure out which texture keys there are in model files:\n\n```\njq -r '.textures | keys[]' block/*.json | sort | uniq -c | sort -nr\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanbcodes%2Fcmc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanbcodes%2Fcmc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanbcodes%2Fcmc/lists"}