zh_cn:tutorial:crops

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
zh_cn:tutorial:crops [2025/04/01 12:04] solidblockzh_cn:tutorial:crops [2025/04/01 12:05] (current) – fix typo solidblock
Line 70: Line 70:
          
     // 对于 1.21.2 及之后的版本:     // 对于 1.21.2 及之后的版本:
-    public static final Item CUSTOM_SEEDS = register("custom_seeds", new AliasedBlockItem(TutorialBlocks.CUSTOM_CROP, new Item.Settings()));+    public static final Item CUSTOM_SEEDS = register("custom_seeds", settings -> new BlockItem(TutorialBlocks.CUSTOM_CROP, settings), new Item.Settings().useItemPrefixedTranslationKey());
 </code> </code>
  
zh_cn/tutorial/crops.txt · Last modified: 2025/04/01 12:05 by solidblock