{"id":20807564,"url":"https://github.com/clo4/datapacks","last_synced_at":"2025-05-07T05:41:28.126Z","repository":{"id":180270763,"uuid":"664716600","full_name":"clo4/datapacks","owner":"clo4","description":"SMP admin \u0026 quality-of-life data packs, and a reusable Nix datapack build system","archived":false,"fork":false,"pushed_at":"2025-05-06T18:06:15.000Z","size":20584,"stargazers_count":2,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T19:29:50.319Z","etag":null,"topics":["datapack","minecraft","minecraft-server","nix"],"latest_commit_sha":null,"homepage":"https://modrinth.com/user/clo4/datapacks","language":"mcfunction","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clo4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-07-10T15:30:29.000Z","updated_at":"2025-05-06T18:06:19.000Z","dependencies_parsed_at":"2024-05-13T03:20:56.961Z","dependency_job_id":"fc927979-a3c6-42a4-a5aa-c60e61b95700","html_url":"https://github.com/clo4/datapacks","commit_stats":null,"previous_names":["clo4/afk-datapack","clo4/detect-afk","clo4/datapacks"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clo4%2Fdatapacks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clo4%2Fdatapacks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clo4%2Fdatapacks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clo4%2Fdatapacks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clo4","download_url":"https://codeload.github.com/clo4/datapacks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252823656,"owners_count":21809707,"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":["datapack","minecraft","minecraft-server","nix"],"created_at":"2024-11-17T19:38:41.271Z","updated_at":"2025-05-07T05:41:28.115Z","avatar_url":"https://github.com/clo4.png","language":"mcfunction","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clo4's Minecraft datapacks\n\nCollection of all of my datapacks. These are typically focused on SMP server\nadministration because that's what I find myself needing more tooling for.\n\nKeeping everything in the same repository makes it easier to build stuff fast!\n\n## Table of Contents\n\n- [clo4's Minecraft datapacks](#clo4s-minecraft-datapacks)\n  - [Table of Contents](#table-of-contents)\n  - [Datapacks](#datapacks)\n    - [Detect AFK Players](#detect-afk-players)\n    - [AFK Sleep](#afk-sleep)\n    - [AFK Message](#afk-message)\n    - [AFK Dim Names](#afk-dim-names)\n    - [AFK Sit](#afk-sit)\n    - [Pause Day Cycle](#pause-day-cycle)\n    - [No Free Deaths](#no-free-deaths)\n    - [No Sprinting](#no-sprinting)\n    - [No Sprint-Swimming](#no-sprint-swimming)\n    - [Expensive Boats](#expensive-boats)\n    - [Chickenfix](#chickenfix)\n    - [No Sleep (unreleased)](#no-sleep-unreleased)\n    - [AFK Immunity (unreleased)](#afk-immunity-unreleased)\n    - [AFK Kick (unreleased)](#afk-kick-unreleased)\n  - [Nix Build System](#nix-build-system)\n  - [Contributing](#contributing)\n    - [Philosophy](#philosophy)\n\n## Datapacks\n\n\u003cimg align=\"left\" src=\"afk/pack.png\" width=\"80px\"\u003e\n\n### Detect AFK Players\n\n[View and download on Modrinth](https://modrinth.com/datapack/detect-afk)\n\n\u003cbr\u003e\n\nA simple way to detect AFK players for vanilla or modded servers, which allows\nyou to build additional social signalling mechanics and improve the experience\nfor all players.\n\nPlayers are marked as AFK (`afk`) after 3 minutes of without moving the mouse.\n\nThe base **afk** data pack implements the AFK detection behavior, acting as a\nlibrary for other data packs. Players are treated as AFK after not sending a\ndirectional input for more than 3 minutes (180 seconds, 3600 game ticks).\n\nThis datapack also gives players the `afk` tag when they become AFK, and removes\nit when they return. This allows you to detect AFK players without having to\ninstall any other datapacks, making it very easy to integrate with.\n\nThere is a README included in the pack and viewable in the [afk](afk) directory\nwith further instructions for configuration, buildng add-on packs, and\nimplementation details.\n\n---\n\n\u003cimg align=\"left\" src=\"afk-sleep/pack.png\" width=\"80px\"\u003e\n\n### AFK Sleep\n\n[View and download on Modrinth](https://modrinth.com/datapack/afk-sleep)\n\n\u003cbr\u003e\n\nChanges the `playersSleepingPercentage` to allow sleeping while there are AFK\nplayers on the server.\n\nWhen the datapack is initially installed, the `playersSleepingPercentage` is\nstored and used as _the percentage of players that aren't AFK_ that need to\nsleep for a night to pass.\n\n| Players online | Players not AFK | Initial playersSleepingPercentage | Players required to pass a night |\n| -------------- | --------------- | --------------------------------- | -------------------------------- |\n| 3              | 3               | 100%                              | 3                                |\n| 3              | 2               | 100%                              | 2                                |\n| 3              | 2               | 50%                               | 1                                |\n\n---\n\n\u003cimg align=\"left\" src=\"afk-message/pack.png\" width=\"80px\"\u003e\n\n### AFK Message\n\n[View and download on Modrinth](https://modrinth.com/datapack/afk-message)\n\n\u003cbr\u003e\n\nUsing this datapack will announce to all players on the server when someone\nbecomes AFK or returns to the game.\n\n---\n\n\u003cimg align=\"left\" src=\"afk-dim-names/pack.png\" width=\"80px\"\u003e\n\n### AFK Dim Names\n\n[View and download on Modrinth](https://modrinth.com/datapack/afk-dim-names)\n\n\u003cbr\u003e\n\nUsing this datapack colors the names of AFK players gray and moves them to the\nbottom of the player list.\n\n---\n\n\u003cimg align=\"left\" src=\"afk-sit/pack.png\" width=\"80px\"\u003e\n\n### AFK Sit\n\n[View and download on Modrinth](https://modrinth.com/datapack/afk-sit)\n\n\u003cbr\u003e\n\nPlayers that go AFK will automatically sit if on the ground when they go afk,\nand will stand up if attacked or the block below them is removed.\n\n---\n\n\u003cimg align=\"left\" src=\"pause-day-cycle/pack.png\" width=\"80px\"\u003e\n\n### Pause Day Cycle\n\n[View and download on Modrinth](https://modrinth.com/datapack/pause-day-cycle)\n\n\u003cbr\u003e\n\nA very lightweight datapack that disables `doDaylightCycle` when nobody is\nonline or everyone online is tagged as `afk` (see #detect-afk-players). It's\nbest suited for small to medium sized servers where there are large stretches of\ntime that nobody will be online, or long periods where players may be AFK (eg.\nat a mob grinder overnight). This is to prevent the local difficulty and day\ncount from becoming excessive and not representative of the amount of time that\nplayers have actually played on the server.\n\nThe following gamerules are affected:\n\n- `doDaylightCycle`\n- `doWeatherCycle`\n\nThe gamerule `mobSpawning` is unaffected to allow mob grinders and automatic\nfarms to function with nobody present or an AFK player loading the chunk.\n\nYou can hook into the pause and resume events using the `pause_day_cycle:pause`\nand `pause_day_cycle:resume` function tags, which will be called whenever the\nday cycle pauses or resumes.\n\n---\n\n\u003cimg align=\"left\" src=\"no-free-deaths/pack.png\" width=\"80px\"\u003e\n\n### No Free Deaths\n\n[View and download on Modrinth](https://modrinth.com/datapack/afk-dim-names)\n\n\u003cbr\u003e\n\nAdds consequences to death when playing with `keepInventory`. By adding\ncarefully thought out penalties, players don't abuse death as a free\nteleportation tool and hunger reset.\n\n**Core features**\n\n- Can be disabled per player\n- Curse of Vanishing works as expected (requires Minecraft 1.20.5+)\n- Players respawn with a hunger penalty\n- Lose levels on death like in vanilla\n- Difficulty based XP-loss\n  - Easy: 50%, Normal: 75%, Hard: 100%\n\nPlayers can be opted out of the consequences if they prefer a more relaxed\ngaming experience. Per-player opt-out means _everyone_ can play how they want\nto.\n\n```mcfunction\n/execute as USERNAME run function no_free_deaths:cmd/opt_out\n```\n\nEvery penalty can be toggled individually:\n\n```mcfunction\nfunction no_free_deaths:cmd/toggle_drop_xp\nfunction no_free_deaths:cmd/toggle_curse_of_vanishing\nfunction no_free_deaths:cmd/toggle_respawn_hunger_penalty\n\n# NOT ENABLED BY DEFAULT\nfunction no_free_deaths:cmd/toggle_respawn_health_penalty\n```\n\nThe percentage of levels lost on death is set automatically when the data pack\nis loaded and will not be changed unless it is manually updated. It's a bit\nverbose, but can be changed to a custom amount e.g. `90` to lose 90% of levels.\n\n```mcfunction\n/scoreboard players set .drop_percentage no_free_deaths.drop_xp.settings [percent]\n```\n\n---\n\n\u003cimg align=\"left\" src=\"no-sprint/pack.png\" width=\"80px\"\u003e\n\n### No Sprinting\n\n[View and download on Modrinth](https://modrinth.com/datapack/no-sprinting)\n\n\u003cbr\u003e\n\nWhen you move 30% faster with very little penalty, or for a slightly larger\npenalty can effectively double your movement speed by sprint-jumping, you shrink\nthe scale of the world from a huge environment to a small sandbox where you can\ndecide where you are at any given time.\n\n---\n\n\u003cimg align=\"left\" src=\"no-sprint-swimming/pack.png\" width=\"80px\"\u003e\n\n### No Sprint-Swimming\n\n[View and download on Modrinth](https://modrinth.com/datapack/no-sprint-swimming)\n\n\u003cbr\u003e\n\nSprint-swimming makes water easily traversable. You have a high degree of\nvertical and horizontal movement. I think the game is more fun when water is an\nobstacle rather than an annoyance.\n\n---\n\n\u003cimg align=\"left\" src=\"expensive-boats/pack.png\" width=\"80px\"\u003e\n\n### Expensive Boats\n\n[View and download on Modrinth](https://modrinth.com/datapack/expensive-boats)\n\n\u003cBr\u003e\n\nBoats shrink the effective size of continents from hours of traversal,\nexploration, distraction, and fun to a few minutes of holding \u003ckbd\u003ew\u003c/kbd\u003e and\nscrolling your favorite time-wasting app.\n\n---\n\n\u003cimg align=\"left\" src=\"chickenfix/pack.png\" width=\"80px\"\u003e\n\n### Chickenfix\n\n[View and download on Modrinth](https://modrinth.com/datapack/chickenfix)\n\n\u003cbr\u003e\n\nA simple but effective brute force fix to chickens suffocating in walls when\nthey grow up in a cramped, inhumane chicken farm.\n\nIt works by teleporting chickens to the center of the block they're in, on the\ntick where they grow into an adult. This prevents them from being shoved into a\nwall and suffocating. This is only done if the chicken is within five blocks of\nany entity named exactly `chickenfix`, to prevent normal (humane) chicken farms\nfrom being broken by the same logic that fixes the inhumane ones.\n\n**If you need this, you know you need it. If you don't know, you definitely\ndon't need it.**\n\n**I also make no guarantees that this will actually fix your problem. It works\nfor me.**\n\nThis is extremely cursed. It's a bad fix for a niche problem, and as such, I\ngave it a horrible icon to deter people that do not absolutely need this fix\nfrom using it. I'm also not releasing it as a mod, because that would also imply\nthat I want other people using it.\n\n---\n\n\u003cimg align=\"right\" src=\"no-sleep/pack.png\" width=\"80px\"\u003e\n\n### No Sleep (unreleased)\n\nDisables sleeping. Placeholder icon.\n\nWhen you disable sleeping, you also need to disable phantoms. When you disable\nphantoms, you need to come up with a way to get phantom membrane. I haven't\nsolved the membrane in a way that's fun.\n\nThe best idea I've come up with is to spawn phantoms if a player drinks a potion\nof weakness and tries to use a bed.\n\n---\n\n\u003cimg align=\"right\" src=\"afk-immunity/pack.png\" width=\"80px\"\u003e\n\n### AFK Immunity (unreleased)\n\nAFK players cannot take any damage and their armor will not lose durability.\n\nThis is designed so players don't have to consider whether they're in a good\nposition to do something that is more critical or productive than playing Block\nGame.\n\nIt's recommended that players do not have the `afk` trigger enabled, as it\nbecomes an exploit if players can toggle invulnerability whenever they want.\n\nThis data pack is relatively close to being released, but there is still more\nplaytesting required, and probably some more edge cases to consider.\n\n---\n\n\u003cimg align=\"right\" src=\"afk-kick/pack.png\" width=\"80px\"\u003e\n\n### AFK Kick (unreleased)\n\nKicks players after they have been AFK for a configurable period of time.\n\nThis requires the function level to be set higher than I'm generally comfortable\nrecommending, but I will likely release this eventually.\n\n---\n\n## Nix Build System\n\nThe build system is a reusable component built with Nix. You can use this\nrepository as an input to your own if you would like to use the same logic to\nbuild. It would be relatively easy to extend to build a project using the Beet\ntoolchain, too.\n\nRun this command to generate a flake with a single data pack in the repository\nroot.\n\n```bash\nnix flake init -t github:clo4/datapacks\n```\n\nRun this command to generate a flake with multiple data packs in subdirectories.\n\n```bash\nnix flake init -t github:clo4/datapacks#monorepo\n```\n\nIf you're running into issues with the pack formats causing your build to fail,\nmake sure you have the latest version of this flake. It may be, at most, 6h15m\nhours out of date.\n\n```bash\nnix flake update\n```\n\n## Contributing\n\nThe datapacks are built using Nix. You must have Nix installed if you want to\nbuild locally. If you've never used it before, it's really not as scary as it\nsounds - just [install Nix](https://install.determinate.systems/), and run\n`nix build` to build all the datapacks, or to build an individual datapack, run\n`nix build .#\u003cname\u003e` where `\u003cname\u003e` is something like `afk` or\n`pause-day-cycle`. However, if you're on Windows, to use Nix you'll have to use\nWSL, which can be a bit of a pain for doing stuff on your local Windows file\nsystem too - I don't really have a good solution for you, but this project does\nuse GitHub Actions to build the project in CI and publishes an artifact from\nthat.\n\nThere's a shortcut for copying to a testing world too. Create a `.env` file in\nthe root of the repository, and export a variable named `DATAPACK_DIR` (a path\nto a world's 'datapacks' directory). Then, you can either run the script using\n`nix run .#`, or as `build-and-copy` in the dev shell. If you're using direnv\nand have approved the .envrc, this script will already be available to you in\nyour environment. This script optionally takes the names of the data packs to\nbuild. See the `--help` output for more information.\n\n### Philosophy\n\nI value composability over functionality, preferring to have less built in to\ndatapacks and allowing you to build the features you need on top of it. Each\npiece of functionality can be small and performant, and they can be combined\ntogether to create something more complicated without sacrificing on\nmaintainability or performance.\n\nI only work on what I feel motivated to work on, because this isn't my job. I\njust do it for fun and to make my own life easier. But if there's a feature that\nyou want added, you're welcome to create an issue for it and I'll take a look,\nI'll build it if I think it's worth the time. Or you can contribute it yourself,\nand we'll get it merged and released!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclo4%2Fdatapacks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclo4%2Fdatapacks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclo4%2Fdatapacks/lists"}