User Tools

Site Tools


zh_cn:tutorial:blocks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
zh_cn:tutorial:blocks [2024/04/15 01:44] – 更新 solidblockzh_cn:tutorial:blocks [2024/04/15 01:45] – [为方块注册物品] solidblock
Line 76: Line 76:
         Registry.register(Registries.BLOCK, new Identifier("tutorial", "example_block"), EXAMPLE_BLOCK);         Registry.register(Registries.BLOCK, new Identifier("tutorial", "example_block"), EXAMPLE_BLOCK);
         // 对于 1.20.5 以下版本:         // 对于 1.20.5 以下版本:
-        Registry.register(Registries.ITEM, new Identifier("tutorial", "example_block"), new BlockItem(EXAMPLE_BLOCK, new FabricItemSettings()));+        // Registry.register(Registries.ITEM, new Identifier("tutorial", "example_block"), new BlockItem(EXAMPLE_BLOCK, new FabricItemSettings()));
         // 对于自 1.20.5 之后的版本:         // 对于自 1.20.5 之后的版本:
         Registry.register(Registries.ITEM, new Identifier("tutorial", "example_block"), new BlockItem(EXAMPLE_BLOCK, new Item.Settings()));         Registry.register(Registries.ITEM, new Identifier("tutorial", "example_block"), new BlockItem(EXAMPLE_BLOCK, new Item.Settings()));
zh_cn/tutorial/blocks.txt · Last modified: 2024/04/15 01:52 by solidblock