{"id":27881665,"url":"https://github.com/toydotgame/chestloaders","last_synced_at":"2026-01-22T05:32:49.796Z","repository":{"id":286428362,"uuid":"961225961","full_name":"toydotgame/chestloaders","owner":"toydotgame","description":"Load chunks around chest minecarts without needing portals or nearby players.","archived":false,"fork":false,"pushed_at":"2025-10-15T00:34:22.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-15T05:23:30.541Z","etag":null,"topics":["chunk-loader","datapack","minecraft","minecraft-datapack"],"latest_commit_sha":null,"homepage":"","language":"mcfunction","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/toydotgame.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-06T03:19:31.000Z","updated_at":"2025-10-15T00:34:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"ace8c37e-9fb6-4e33-8143-a5ffa622048d","html_url":"https://github.com/toydotgame/chestloaders","commit_stats":null,"previous_names":["toydotgame/chestloaders"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/toydotgame/chestloaders","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toydotgame%2Fchestloaders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toydotgame%2Fchestloaders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toydotgame%2Fchestloaders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toydotgame%2Fchestloaders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toydotgame","download_url":"https://codeload.github.com/toydotgame/chestloaders/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toydotgame%2Fchestloaders/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28656267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["chunk-loader","datapack","minecraft","minecraft-datapack"],"created_at":"2025-05-05T05:03:46.698Z","updated_at":"2026-01-22T05:32:49.791Z","avatar_url":"https://github.com/toydotgame.png","language":"mcfunction","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chestloaders\n\nchestloaders is a Minecraft 1.21.8+ datapack that adds a simple and lag-friendly chunk loading system  for chest minecarts. It utilises `/forceload` to load a 3x3 of entity-processing chunks around the cart, much akin to Nether Portal loading—but on rails!\n\n## Algorithm\n* **Every second** carts moving @ ≥ 1 m/s get a 3x3 chunk area loaded\n\t* Carts **marked for unloading** don't get re-force loaded\n* **Every 15 seconds**, all chunks _without_ a cart nearby that was just force loaded above are unloaded\n* **Every 60 seconds**, all carts that have moved ≤ 15 m in the last minute are **scheduled** to be checked again\n\t* **After 60 seconds** from being **scheduled**:\n\t\t* **If the cart moved ≥ 16 m** in the last minute, its **schedule** is cancelled\n\t\t* **If not**, then the cart is promoted to be fully **marked for unloading**. The chunks around it will be unloaded in the range of 1–15 seconds from now\n\n\u003e [!note]\n\u003e **The distance a cart moved in a minute** is an important check for the logic of determining which carts shouldn't be loaded, in order to prevent lag. It is calculated as:\u003cbr\u003e\n\u003e $$\\mathrm{delta_pos}(x, y, z) \\coloneqq \\left|x_\\mathrm{new} - x_\\mathrm{old}\\right| + \\left|y_\\mathrm{new} - y_\\mathrm{old}\\right| + \\left|z_\\mathrm{new} - z_\\mathrm{old}\\right|$$\n\u003e \n\u003e **Note that** this is using the X/Y/Z coordinates, and _not_ velocity maths. Therefore, a cart can travel 300 m around a circular track (for example), but this track **must** cross over ~16 blocks in at least one axis. This prevents carts travelling in a small circle or in machines from being used as chunkloaders, thus only permitting long-distance-travelling carts.\n\n## Installing\n1. Download [the code as a ZIP](https://github.com/toydotgame/chestloaders/archive/refs/heads/main.zip) using that link or by hitting _Code_ → _Download ZIP_ above\n2. Extract the ZIP to your world or server's `\u003cworld name\u003e/datapacks/` folder. The ZIP will contain a folder called `chestloaders-main/`, and inside _that_ will be `pack.mcmeta`, `data/`, etc: you want `chestloaders-main/` to be **directly** under the `datapacks/` folder, i.e. the `pack.mcmeta` will be inside `\u003cworld name\u003e/datapacks/chestloaders-main/`\n3. In game, run `/datapack enable \"file/chestloaders-main\"`. That's it!\n\t* chestloaders will run automatically upon every world load/server boot. There's nothing you need to do in-game to get it to start chunk loading carts\n\n## Removing\n1. Run `/function chestloaders:unload` as opposed to `/datapack disable ...` to remove all scoreboards created, etc. The `unload` function will disable the datapack itself automatically, and will also tidy up tags and scoreboards created\n2. Delete the `chestloaders-main/` folder inside `\u003cworld name\u003e/datapacks/`\n\n\u003e [!note]\n\u003e The `unload` function removes the following tags from all entities:\n\u003e * `chestloaders.scheduled_unload`\n\u003e * `chestloaders.unload`\n\u003e * `chestloaders.just_unloaded`\n\u003e \n\u003e It uses `@e` to do this. Generally, if a cart has these tags, it's because it's loaded. The **only** time a cart will have these tags and be unloaded is if the server restarted or crashed whilst a cart was chunk loading.\n\u003e **Tags do not inherently cause any performance issues,** however they do take up space in entity NBT and if you want to be 100% rid of chestloaders for whatever reason, do note that these tags cannot be automatically removed by the `unload` function if the carts with the tags in question aren't loaded in.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoydotgame%2Fchestloaders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoydotgame%2Fchestloaders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoydotgame%2Fchestloaders/lists"}