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 <championash5357@gmail.com>
  • Loading branch information
IchHabeHunger54 and ChampionAsh5357 committed Feb 23, 2024
1 parent cdf58f2 commit 380db40
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 @@ -106,7 +106,7 @@ public static final DeferredBlock<Block> EXAMPLE_BLOCK = BLOCKS.registerBlock(
);
```

Internally, this will simply call `BLOCKS.register("example_block", () -> new Block(new BlockBehaviour.Properties()))` by applying the properties parameter to the provided block factory (which is commonly the constructor).
Internally, this will simply call `BLOCKS.register("example_block", () -> new Block(BlockBehaviour.Properties.of()))` by applying the properties parameter to the provided block factory (which is commonly the constructor).

If you want to use `Block::new`, you can leave out the factory entirely:

Expand Down

1 comment on commit 380db40

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

Please sign in to comment.