User Tools

Site Tools


tutorial:itemgroup

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
tutorial:itemgroup [2023/09/28 21:15] – Use entries method for custom item group haykamtutorial:itemgroup [2023/09/28 21:20] – Tabs and Yarn text haykam
Line 38: Line 38:
 private static final class_1761 ITEM_GROUP = FabricItemGroup.builder() private static final class_1761 ITEM_GROUP = FabricItemGroup.builder()
  .icon(() -> new class_1799(CUSTOM_ITEM))  .icon(() -> new class_1799(CUSTOM_ITEM))
-        .displayName(Text.translatable("itemGroup.tutorial.test_group"))+ .displayName(class_2561.method_43469("itemGroup.tutorial.test_group"))
         .entries((context, entries) -> {         .entries((context, entries) -> {
-            entries.add(CUSTOM_ITEM); + entries.add(CUSTOM_ITEM); 
-        })+ })
  .build();  .build();
 </yarncode> </yarncode>
Line 52: Line 52:
  
 <yarncode java [enable_line_numbers="true"]> <yarncode java [enable_line_numbers="true"]>
- Registry.register(Registries.ITEM_GROUP, new Identifier("tutorial", "test_group"), ITEM_GROUP);+class_2378.method_10230(class_7923.field_44687, new class_2960("tutorial", "test_group"), ITEM_GROUP);
 </yarncode> </yarncode>
  
 {{:tutorial:item_group_append_items.png?nolink&400|}} {{:tutorial:item_group_append_items.png?nolink&400|}}
tutorial/itemgroup.txt · Last modified: 2023/10/01 03:21 by haykam