{"id":21316085,"url":"https://github.com/dm-earth/deferredregistries","last_synced_at":"2025-07-18T13:36:46.889Z","repository":{"id":60838052,"uuid":"545307058","full_name":"DM-Earth/DeferredRegistries","owner":"DM-Earth","description":"[Fabric/Quilt Mod] Register things in ease","archived":false,"fork":false,"pushed_at":"2022-10-15T14:53:31.000Z","size":76,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"1.18","last_synced_at":"2025-06-06T09:05:55.160Z","etag":null,"topics":["api","fabric","fabricmc","fabricmc-mod","minecraft","minecraft-mod","quilt","quiltmc","quiltmc-mod"],"latest_commit_sha":null,"homepage":"","language":"Java","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/DM-Earth.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}},"created_at":"2022-10-04T06:14:50.000Z","updated_at":"2025-04-11T00:47:26.000Z","dependencies_parsed_at":"2023-01-20T02:31:01.360Z","dependency_job_id":null,"html_url":"https://github.com/DM-Earth/DeferredRegistries","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":"DM-Earth/Fabric-Mod-Template","purl":"pkg:github/DM-Earth/DeferredRegistries","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DM-Earth%2FDeferredRegistries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DM-Earth%2FDeferredRegistries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DM-Earth%2FDeferredRegistries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DM-Earth%2FDeferredRegistries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DM-Earth","download_url":"https://codeload.github.com/DM-Earth/DeferredRegistries/tar.gz/refs/heads/1.18","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DM-Earth%2FDeferredRegistries/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264923080,"owners_count":23683716,"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":["api","fabric","fabricmc","fabricmc-mod","minecraft","minecraft-mod","quilt","quiltmc","quiltmc-mod"],"created_at":"2024-11-21T18:29:37.064Z","updated_at":"2025-07-12T01:31:35.970Z","avatar_url":"https://github.com/DM-Earth.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/DM-Earth/DeferredRegistries/blob/1.18/icon.png?raw=true\" width = 250 alt=\"Deferred Registries\"\u003e\n  \u003c/img\u003e\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003e Deferred Registries \u003c/h1\u003e\n\nThis Minecraft mod provides a way to register things that are not available at the time of registration, which is similar to how Minecraft Forge's `DeferredRegister` works.\n\n### Setup\n\n```gradle\nrepositories {\n // [...]\n maven {\n  name = \"Modrinth\"\n  url = \"https://api.modrinth.com/maven\"\n  content {\n   includeGroup \"maven.modrinth\"\n  }\n }\n}\n\ndependencies {\n // [...]\n modImplementation include(\"maven.modrinth:deferred-registries:\u003cversion_id\u003e\")\n}\n```\n\n### Usage\n\nFirst, create a `DeferredRegistries` object, here we use `Item` as example:\n\n```java\nprivate static final DeferredRegistries\u003cItem\u003e ITEMS = DeferredRegistries.create(Registry.ITEM, \"example_mod\");\n```\n\nThen, register things to it:\n\n```java\npublic static final DeferredObject\u003cItem\u003e EXAMPLE_ITEM = ITEMS.register(\"example_item\", () -\u003e new Item(new Item.Settings()));\npublic static final DeferredObject\u003cItem\u003e SIMPLE_ITEM = ITEMS.register(\"simple_item\", new Item(new Item.Settings()));\n```\n\nFinally, register the DeferredRegistries object when initializing your mod:\n\n```java\n@Override\npublic void onInitialize() {\n    ITEMS.register();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdm-earth%2Fdeferredregistries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdm-earth%2Fdeferredregistries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdm-earth%2Fdeferredregistries/lists"}