{"id":28581236,"url":"https://github.com/ftbteam/ftb-pause-menu-api","last_synced_at":"2025-08-08T14:08:37.219Z","repository":{"id":277058767,"uuid":"930906357","full_name":"FTBTeam/FTB-Pause-Menu-API","owner":"FTBTeam","description":"Unified API for modifying the Pause Menu for Minecraft","archived":false,"fork":false,"pushed_at":"2025-06-21T07:49:55.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-21T08:31:07.465Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FTBTeam.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2025-02-11T12:08:22.000Z","updated_at":"2025-06-21T07:49:52.000Z","dependencies_parsed_at":"2025-02-11T23:23:52.197Z","dependency_job_id":"1a1c15cd-ef39-4ba6-9e2e-7be545f9794d","html_url":"https://github.com/FTBTeam/FTB-Pause-Menu-API","commit_stats":null,"previous_names":["ftbteam/ftb-pause-menu-api"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/FTBTeam/FTB-Pause-Menu-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FTBTeam%2FFTB-Pause-Menu-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FTBTeam%2FFTB-Pause-Menu-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FTBTeam%2FFTB-Pause-Menu-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FTBTeam%2FFTB-Pause-Menu-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FTBTeam","download_url":"https://codeload.github.com/FTBTeam/FTB-Pause-Menu-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FTBTeam%2FFTB-Pause-Menu-API/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269432993,"owners_count":24415971,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"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":[],"created_at":"2025-06-11T04:16:30.271Z","updated_at":"2025-08-08T14:08:37.187Z","avatar_url":"https://github.com/FTBTeam.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FTB Pause menu API\n\nCustom pause menu for unification API for adding new buttons and elements to the pause menu. To achieve this, we fully replace the pause menu with our own implementation to ensure no mod is able to bypass our API. We only recommend using this mod in your modpack when you know what should be on your pause menu\n\n## Features\n\n- Developer friendly API\n- Clean default pause menu\n- Customisable pause menu\n- Built in support for\n  - Discord \u0026 Github links (Top left corner)\n  - Tips (By Darkhax)\n  - Just Zoom (By Keksuccino)\n\n## Developer Notes\n\n- Although this API introduces a unified injection method to the Pause Menu, it's recommended that you do not over populate the pause menu with buttons. This is partially modpack specific, so if you do add buttons, we highly recommend you allow them to be disabled via your mods config.\n- Overlapping is possible, and we've intentionally not prevented it. \n- We've baked in padding for items, ordering and locations to ensure that the pause menu is clean and easy to extend\n\n## Integration\n\nIntegrating your Pause Menu button is simple! Firstly, if you're using a mixin already, keep using it! As we completely replace the pause menu, your mixin will still work but will not show.\n\n### Adding the API to your project\n\n```groovy\nrepositories {\n  maven {\n    name = \"FTB Pause Menu API\"\n    url = \"https://maven.ftb.dev/releases\"\n    content = {\n      includeGroup \"dev.ftb.mods\"\n    }\n  }\n}\n\ndependencies {\n  // Use the correct implementation call for your toolchain\n  implementation \"dev.ftb.mods:ftb-pause-menu-api:${project.pause_menu_api_version}\"\n  \n  // If you only want to depend on the API, you can use the following\n  api \"dev.ftb.mods:ftb-pause-menu-api:${project.pause_menu_api_version}:api\"\n}\n```\n\n### Registering your provider\n\n```java\npublic class MyPauseItem implements PauseItemProvider {\n  ...\n}\n```\n\n**Somewhere in your mods startup**\n```java\nPauseMenuApi.get().registerPauseItem(MenuLocation.TOP_RIGHT, new MyPauseItem());\n```\n\n### Creating your provider\n\nWe've tried to keep the 'contract' here as close to vanilla as possible. You can still use vanilla buttons / widgets and you can manually render your own items by hand.\n\nYou will have to provide a couple of things. Specifically:\n\n- The size of your widget by overriding `width` and `height` (If it's just a normal button, it's your buttons width by the button height (normally 20))\n- If you want to do a custom render, you will need to override `render` and `hasRender` to return `true`\n- If you want to add normal buttons / widgets, you can override `init` and add your buttons there\n\n### The init\n\nInit is very close to the way vanilla works but you are provided an `x`, and `y` which is relative to your location you registered against. Your 'provider' will be aligned correctly based on the `width` and `height` provided so you do not need to adjust your rendering based on the location selected.\n\n```java\n@Override\npublic @Nullable ScreenWidgetCollection init(MenuLocation target, ScreenHolder screen, int x, int y) {\n  // You need to return a collection of widgets  \n  ScreenWidgetCollection screenWidgetCollection = ScreenWidgetCollection.create();\n\n  // Add your widget just like you would in a vanilla screen\n  screenWidgetCollection.addRenderableWidget(Button.builder(Component.literal(\"Original\"), btn -\u003e {\n    PauseMenuScreen.DISABLE_CUSTOM_PAUSE = true;\n    Minecraft.getInstance().setScreen(new PauseScreen(true));\n  }).width(70).pos(x, y).build());\n\n  // Provide back the collection\n  return screenWidgetCollection;\n}\n```\n\n### Examples\n\nYou can see some examples of providers by looking in our `dev.ftb.mods.pmapi.menu.providers` package.\n\n## Support\n\n- For **Modpack** issues, please go here: https://go.ftb.team/support-modpack\n- For **Mod** issues, please go here: https://go.ftb.team/support-mod-issues\n- Just got a question? Check out our Discord: https://go.ftb.team/discord\n\n## Licence\n\nAll Rights Reserved to Feed The Beast Ltd. Source code is `visible source`, please see our [LICENSE.md](/LICENSE.md) for more information. Any Pull Requests made to this mod must have the CLA (Contributor Licence Agreement) signed and agreed to before the request will be considered.\n\n## Keep up to date\n\n[![](https://cdn.feed-the-beast.com/assets/socials/icons/social-discord.webp)](https://go.ftb.team/discord) [![](https://cdn.feed-the-beast.com/assets/socials/icons/social-github.webp)](https://go.ftb.team/github) [![](https://cdn.feed-the-beast.com/assets/socials/icons/social-twitter-x.webp)](https://go.ftb.team/twitter) [![](https://cdn.feed-the-beast.com/assets/socials/icons/social-youtube.webp)](https://go.ftb.team/youtube) [![](https://cdn.feed-the-beast.com/assets/socials/icons/social-twitch.webp)](https://go.ftb.team/twitch) [![](https://cdn.feed-the-beast.com/assets/socials/icons/social-instagram.webp)](https://go.ftb.team/instagram) [![](https://cdn.feed-the-beast.com/assets/socials/icons/social-facebook.webp)](https://go.ftb.team/facebook) [![](https://cdn.feed-the-beast.com/assets/socials/icons/social-tiktok.webp)](https://go.ftb.team/tiktok)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftbteam%2Fftb-pause-menu-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fftbteam%2Fftb-pause-menu-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftbteam%2Fftb-pause-menu-api/lists"}