tutorial:itemgroup
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorial:itemgroup [2023/09/28 21:15] – Use entries method for custom item group haykam | tutorial:itemgroup [2023/10/01 03:21] (current) – Remove semicolon to nowhere 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(class_2561.method_43469(" |
.entries((context, | .entries((context, | ||
- | | + | entries.add(CUSTOM_ITEM); |
- | }) | + | }) |
.build(); | .build(); | ||
</ | </ | ||
- | You can add entries to your item group within the '' | + | You can add entries to your item group within the '' |
It is important to set the display name, otherwise it will cause a crash. | It is important to set the display name, otherwise it will cause a crash. | ||
Line 52: | Line 52: | ||
< | < | ||
- | Registry.register(Registries.ITEM_GROUP, new Identifier(" | + | class_2378.method_10230(class_7923.field_44687, new class_2960(" |
</ | </ | ||
{{: | {{: |
tutorial/itemgroup.1695935728.txt.gz · Last modified: 2023/09/28 21:15 by haykam