Skip to content

Commit

Permalink
Update docs/blocks/index.md
Browse files Browse the repository at this point in the history
Co-authored-by: Dennis C <xfacthd@gmx.de>
  • Loading branch information
IchHabeHunger54 and XFactHD committed Feb 22, 2024
1 parent 2e65131 commit 1ed292c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/blocks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Before we get started, it is important to understand that there is only ever one

Due to this, a block should only ever be instantiated once, and that is during [registration]. Once the block is registered, you can then use the registered reference as needed.

Unlike most other registries, blocks use a specialized version of `DeferredRegister`, called `DeferredRegister.Blocks`. `DeferredRegister.Blocks` acts basically like a `DeferredRegister<Block>`, but with some minor differences:
Unlike most other registries, blocks can use a specialized version of `DeferredRegister`, called `DeferredRegister.Blocks`. `DeferredRegister.Blocks` acts basically like a `DeferredRegister<Block>`, but with some minor differences:

- They are created via `DeferredRegister.createBlocks("yourmodid")` instead of the regular `DeferredRegister.create(...)` method.
- `#register` returns a `DeferredBlock<T extends Block>`, which extends `DeferredHolder<Block, T>`. `T` is the type of the class of the block we are registering.
Expand Down

1 comment on commit 1ed292c

@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: 1ed292c0f7cc49e8594c54ed8cfc6940c719424b
Status: ✅ Deploy successful!
Preview URL: https://e410def6.neoforged-docs-previews.pages.dev
PR Preview URL: https://pr-48.neoforged-docs-previews.pages.dev

Please sign in to comment.