Skip to content

Commit

Permalink
Update docs/blocks/index.md
Browse files Browse the repository at this point in the history
Co-authored-by: ChampionAsh5357 <[email protected]>
  • Loading branch information
IchHabeHunger54 and ChampionAsh5357 authored Oct 22, 2023
1 parent eeb617a commit d2b5bd0
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 @@ -14,7 +14,7 @@ Due to this, a block should only ever be instantiated once, and that is during r
public static final RegistryObject<Block> MY_BLOCK = BLOCKS.register("my_block", () -> new Block(...));
```

After registering the block, all references to the new `my_block` should use this constant. For example, if you want to check if the block at a given position is a `my_block`, the code for that would look something like this:
After registering the block, all references to the new `my_block` should use this constant. For example, if you want to check if the block at a given position is `my_block`, the code for that would look something like this:

```java
level.getBlockState(position).is(MyBlockRegistrationClass.MY_BLOCK.get());
Expand Down

1 comment on commit d2b5bd0

@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: d2b5bd0f9332e18e3322324265fb657204db07c7
Status: ✅ Deploy successful!
Preview URL: https://99d1bc4f.neoforged-docs-previews.pages.dev
PR Preview URL: https://pr-21.neoforged-docs-previews.pages.dev

Please sign in to comment.