1313import net .minecraft .text .Text ;
1414import net .minecraft .util .Identifier ;
1515import xyz .lisbammisakait .skill .LiuBeiASkill ;
16+ import xyz .lisbammisakait .skill .LiuBeiBSkill ;
1617import xyz .lisbammisakait .skill .TieJiTaChuanSkill ;
1718import xyz .lisbammisakait .RelightTheThreePointStrategy ;
1819import xyz .lisbammisakait .skill .YinFengLaiXiangSkill ;
@@ -32,7 +33,7 @@ public class ModItems {
3233 .displayName (Text .translatable ("rttpsGroup.RelightTheThreePointStrategy" ))
3334 .build ();
3435
35- // public static final Item FEILONGDUOFENG = register("feilongduofeng", Item::new, new Item.Settings());
36+ // public static final Item FEILONGDUOFENG = register("feilongduofeng", Item::new, new Item.Settings());
3637// public static final Item FEILONGDUOFENG = register();
3738// public static Item register(String path, Function<Item.Settings, Item> factory, Item.Settings settings) {
3839// final RegistryKey<Item> registryKey = RegistryKey.of(RegistryKeys.ITEM, Identifier.of(RelightTheThreePointStrategy.MOD_ID, path));
@@ -59,10 +60,15 @@ public class ModItems {
5960 public static final RegistryKey <Item > LIUBEIASKILL_KEY = RegistryKey .of (RegistryKeys .ITEM , Identifier .of (RelightTheThreePointStrategy .MOD_ID , "longnudiwei" ));
6061 //注意下一行代码的component是为了给技能添加冷却时间
6162 public static final Item LIUBEIASKILL = register (new LiuBeiASkill ( new Item .Settings ().registryKey (LIUBEIASKILL_KEY ).component (RtTPSComponents .COOLDOWN_TYPE ,LiuBeiASkill .COOLDOWN )), LIUBEIASKILL_KEY );
63+ //注册刘备B技能
64+ public static final RegistryKey <Item > LIUBEIBSKILL_KEY = RegistryKey .of (RegistryKeys .ITEM , Identifier .of (RelightTheThreePointStrategy .MOD_ID , "xiangxieyvgong" ));
65+ public static final Item LIUBEIBSKILL = register (new LiuBeiBSkill ( new Item .Settings ().registryKey (LIUBEIBSKILL_KEY ).component (RtTPSComponents .COOLDOWN_TYPE ,LiuBeiBSkill .COOLDOWN )), LIUBEIBSKILL_KEY );
66+
67+
6268 public static Item register (Item item , RegistryKey <Item > registryKey ) {
63- // Register the item.
69+ // Register the item.
6470 Item registeredItem = Registry .register (Registries .ITEM , registryKey .getValue (), item );
65- // Return the registered item!
71+ // Return the registered item!
6672 return registeredItem ;
6773 }
6874
@@ -80,6 +86,7 @@ public static void registerToSkillGroups() {
8086 itemGroup .add (ModItems .YINFENGLAIXIANG );
8187 itemGroup .add (ModItems .TIEJITACHUAN );
8288 itemGroup .add (ModItems .LIUBEIASKILL );
89+ itemGroup .add (ModItems .LIUBEIBSKILL );
8390 });
8491 }
8592 //注册武器
@@ -96,4 +103,4 @@ public static void initialize() {
96103 registerToRtTPSGroups ();
97104 //registerToVanillaItemGroups();
98105 }
99- }
106+ }
0 commit comments