From c6f87c2b2896bb34c60fe8ed2accb9300122f538 Mon Sep 17 00:00:00 2001 From: Technici4n <13494793+Technici4n@users.noreply.github.com> Date: Sat, 25 Nov 2023 14:58:36 +0100 Subject: [PATCH] Account for simple changes to registration in NeoForge 20.2.64-beta --- content/news/20.2registry-rework.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/content/news/20.2registry-rework.md b/content/news/20.2registry-rework.md index cfc1ca6..10af465 100644 --- a/content/news/20.2registry-rework.md +++ b/content/news/20.2registry-rework.md @@ -91,16 +91,16 @@ private static final DeferredRegister.Items ITEMS = DeferredRegister.createItems public static final DeferredBlock MY_BLOCK = BLOCKS.register("my_block", () -> new MyBlock(/* create block */)); public static final DeferredItem MY_ITEM = ITEMS.register("my_item", () -> new MyItem(/* create item */)); -// There are also a few extra helper functions. -// `registerBlock` to directly register a `new Block` from some block properties: +// There are also a few extra helper functions, for example to register "simple" blocks. +// `registerSimpleBlock` to directly register a `new Block` from some block properties: public static final DeferredBlock MY_SIMPLE_BLOCK = - BLOCKS.registerBlock("simple_block", BlockBehaviour.Properties.of().mapColor(MapColor.STONE)); -// `registerItem` to directly register a `new Item` from some item properties: + BLOCKS.registerSimpleBlock("simple_block", BlockBehaviour.Properties.of().mapColor(MapColor.STONE)); +// `registerSimpleItem` to directly register a `new Item` from some item properties: public static final DeferredItem MY_SIMPLE_ITEM = - ITEMS.registerItem("simple_item", new Item.Properties().stacksTo(1)); -// `registerBlockItem` to directly register a `new BlockItem` for a block: + ITEMS.registerSimpleItem("simple_item", new Item.Properties().stacksTo(1)); +// `registerSimpleBlockItem` to directly register a `new BlockItem` for a block: public static final DeferredItem MY_BLOCK_ITEM = - ITEMS.registerBlockItem(MY_BLOCK); + ITEMS.registerSimpleBlockItem(MY_BLOCK); ``` As usual, don't forget to pass your mod bus to your `DeferredRegister`s: