{"id":19542360,"url":"https://github.com/mightypirates/markdownmanual","last_synced_at":"2025-04-26T17:31:14.506Z","repository":{"id":45597100,"uuid":"384761328","full_name":"MightyPirates/MarkdownManual","owner":"MightyPirates","description":"Library Minecraft mod for adding in-game documentation.","archived":false,"fork":false,"pushed_at":"2024-04-15T22:36:10.000Z","size":561,"stargazers_count":13,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"1.20.4","last_synced_at":"2025-04-04T16:41:50.543Z","etag":null,"topics":["fabric","forge","library","minecraft","mod","neoforge"],"latest_commit_sha":null,"homepage":"https://www.curseforge.com/minecraft/mc-mods/markdownmanual","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/MightyPirates.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}},"created_at":"2021-07-10T18:06:37.000Z","updated_at":"2025-03-05T18:37:23.000Z","dependencies_parsed_at":"2023-11-16T00:25:37.880Z","dependency_job_id":"e64f8319-2127-4462-af5f-ce350cd0343e","html_url":"https://github.com/MightyPirates/MarkdownManual","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MightyPirates%2FMarkdownManual","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MightyPirates%2FMarkdownManual/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MightyPirates%2FMarkdownManual/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MightyPirates%2FMarkdownManual/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MightyPirates","download_url":"https://codeload.github.com/MightyPirates/MarkdownManual/tar.gz/refs/heads/1.20.4","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251025724,"owners_count":21524849,"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":["fabric","forge","library","minecraft","mod","neoforge"],"created_at":"2024-11-11T03:14:29.720Z","updated_at":"2025-04-26T17:31:14.166Z","avatar_url":"https://github.com/MightyPirates.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MarkdownManual\n\nMarkdownManual is a library mod for Minecraft that allows painless definition of in-game manuals backed by Markdown\ndocuments.\n\n## License / Use in Modpacks\n\nThis mod is [licensed under the **MIT license**](LICENSE). All **assets are public domain**, unless otherwise stated;\nall are free to be distributed as long as the license / source credits are kept. This means you can use this mod in any\nmod pack **as you please**. I'd be happy to hear about you using it, though, just out of curiosity.\n\n## Usage\n\nIn general, please refer to [the API](common/src/main/java/li/cil/manual/api), everything you need to know should be explained\nin the Javadoc of the API classes and interfaces.\n\n### Defining a new manual\n\nTo define a new manual, create an instance of [`Manual`](common/src/main/java/li/cil/manual/api/prefab/Manual.java) and\nregister it with the `manual` registry. For convenience, the location of this registry is available in\nthe [`Constants`](common/src/main/java/li/cil/manual/api/util/Constants.java) class.\n\n```java\nfinal DeferredRegister\u003cManualModel\u003e MANUALS = DeferredRegister.create(\"your_mod_id\", Constants.MANUAL_REGISTRY);\nfinal RegistrySupplier\u003cManualModel\u003e MANUAL = MANUALS.register(\"your_manual\", Manual::new);\n```\n\nTo get content into the newly created manual, you'll want to add\na [`DocumentProvider`](common/src/main/java/li/cil/manual/api/provider/DocumentProvider.java). A simple setup just needs to add\nsingle [`NamespaceDocumentProvider`](common/src/main/java/li/cil/manual/api/prefab/provider/NamespaceDocumentProvider.java) for\nthe current mod, e.g.:\n\n```java\nfinal DeferredRegister\u003cDocumentProvider\u003e DOCUMENT_PROVIDERS = DeferredRegister.create(\"your_mod_id\", Constants.DOCUMENT_PROVIDER_REGISTRY);\nfinal RegistrySupplier\u003cDocumentProvider\u003e DOCUMENT_PROVIDER = MANUALS.register(\"your_document_provider\", () -\u003e\n    new NamespaceDocumentProvider(\"your_mod_id\", \"doc\"));\n```\n\nWhere `doc` is a path in your mod's assets, in this case your directory structure would be like this:\n\n```text\nyour_mod_dev_dir\n|-+ src\n  |-+ main\n    | ...\n  |-+ resources\n    |-+ assets\n      |-+ your_mod_id\n        |-+ doc\n          |-+ en_us\n            |-  index.md\n            | ...\n```\n\nUsually you'll then also want to add an item representing this manual in the game. For a simple setup, subclass\nthe [`AbstractManualItem`](common/src/main/java/li/cil/manual/api/prefab/item/AbstractManualItem.java) and return the\n`ManualModel` created above in `getManualModel`. This will provide you with a default UI, as well. To customize the UI, see below.\n\n### Defining content\nThe contents of manuals are regular Markdown pages. Manual rendering only supports a basic subset of markdown, including header scaling, italic, bold, monospace and lists.\n\nIt also supports links to other manual pages and has basic support for image rendering. They must explicitly use the `texture` protocol. Rendering blocks and items is also possible using the `block` and `item` protocols.\n\nExamples:\n```markdown\n![Image tooltip](texture:example.png)\n![Tooltip for furnace block](block:minecraft:furnace)\n![Tooltip for TIS-3D casing item](item:tis3d:casing)\n```\n\nMods may also add additional custom content rendering. For example, you could add a content renderer that renders recipes, if you were so inclined.\n\n### Extending an existing manual\n\nTo extend an existing manual, register providers that match the manual to extend. For example, implement\na [`DocumentProvider`](common/src/main/java/li/cil/manual/api/provider/DocumentProvider.java) and override\nthe `matches(ManualModel)` method to return true for the manual to add content for. By default, providers will only\nmatch manuals defined in the same namespace as themselves, i.e., defined by the same mod, as this is usually the desired\nbehavior.\n\n### Adding tabs\n\nTo add additional entry points next to the manual (tabs), follow the same basic procedure as when extending a manual\nwith any other provider. Simply register a new [`Tab`](common/src/main/java/li/cil/manual/api/Tab.java) implementation with the\ntab registry.\n\n### Changing the manual UI\n\nWhen using the `AbstractManualItem` or using the `ShowManualScreenEvent` the built-in manual screen implementation is\nused. This implementation can be styled using implementations of\nthe [`ManualStyle`](common/src/main/java/li/cil/manual/api/ManualStyle.java)\nand [`ManualScreenStyle`](common/src/main/java/li/cil/manual/api/ManualScreenStyle.java) interfaces. These allow changing\ntextures used in the screen (background, tab, scroll bar) as well as changing content rendering parameters such as\nfonts, text color and so on.\n\nTo use a completely customized manual screen, you'll want to override `AbstractManualItem.showManualScreen()` or use a\ncustom item. In this case you'll need to query content from the `ManualModel` and use the [`Document`](common/src/main/java/li/cil/manual/api/content/Document.java)\nclass directly. See the implementation of the default `ManualScreen` for details on its usage.\n\n### Gradle\n\nTo add a dependency to this mod for use in your mod, add the following to your `build.gradle`:\n\n```groovy\nrepositories {\n    exclusiveContent {\n        forRepository { maven(\"https://cursemaven.com\") }\n        filter { includeGroup(\"curse.maven\") }\n    }\n}\ndependencies {\n    // Forge via ForgeGradle\n    implementation(fg.deobf(\"curse.maven:markdownmanual-502485:4713960\"))\n    // Fabric via Loom\n    modImplementation(\"curse.maven:markdownmanual-502485:4713962\")\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmightypirates%2Fmarkdownmanual","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmightypirates%2Fmarkdownmanual","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmightypirates%2Fmarkdownmanual/lists"}