Skip to content

Commit

Permalink
fix some of the mistakes in registries.md
Browse files Browse the repository at this point in the history
  • Loading branch information
IchHabeHunger54 committed Jan 31, 2024
1 parent 242abf0 commit a4971bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/blocks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ If you want to make a block that has different variants (think a slab that has a

### `DeferredRegister.Blocks` helpers

We already discussed how to create a `DeferredRegister.Blocks`, and that it returns `DeferredBlock`s. Now, let's have a look at what other utilities the specialized `DeferredRegister` has to offer. Let's start with `#registerBlock`:
We already discussed how to create a `DeferredRegister.Blocks` [above], as well as that it returns `DeferredBlock`s. Now, let's have a look at what other utilities the specialized `DeferredRegister` has to offer. Let's start with `#registerBlock`:

```java
public static final DeferredRegister.Blocks BLOCKS = DeferredRegister.createBlocks("yourmodid");
Expand Down
3 changes: 2 additions & 1 deletion docs/concepts/registries.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Finally, since the entire system is a wrapper around registry events, we need to
```java
//This is our mod constructor
public ExampleMod(IModEventBus bus) {
//highlight-next-line
ExampleBlocksClass.BLOCKS.register(bus);
//Other stuff here
}
Expand Down Expand Up @@ -109,7 +110,7 @@ public static final ResourceKey<Registry<Spell>> SPELL_REGISTRY_KEY = ResourceKe
public static final Registry<YourRegistryContents> SPELL_REGISTRY = new RegistryBuilder<>(SPELL_REGISTRY_KEY)
// If you want the registry to sync its values.
.sync(true)
// The default key. Similar to minecraft:air for blocks.
// The default key. Similar to minecraft:air for blocks. This is optional.
.defaultKey(new ResourceLocation("yourmodid", "empty"))
// Effectively limits the max count. Generally discouraged, but may make sense in settings such as networking.
.maxId(256)
Expand Down

1 comment on commit a4971bd

@neoforged-pages-deployments
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploying with Cloudflare Pages

Name Result
Last commit: a4971bd17bf8429cf1638746a3a01ca2c3dbed10
Status: ✅ Deploy successful!
Preview URL: https://19f103c2.neoforged-docs-previews.pages.dev
PR Preview URL: https://pr-48.neoforged-docs-previews.pages.dev

Please sign in to comment.