User Tools

Site Tools


items:item_groups:item_group_entry_providers:start

Differences

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

Link to this comparison view

Next revision
Previous revision
items:item_groups:item_group_entry_providers:start [2024/04/26 22:13] – created errorcraftitems:item_groups:item_group_entry_providers:start [2024/04/29 22:09] (current) – add duplicate stack warning errorcraft
Line 1: Line 1:
 ====== Item Group Entry Providers ====== ====== Item Group Entry Providers ======
 With item group entry providers you can add your item to a certain item group. With item group entry providers you can add your item to a certain item group.
-It's //almost// as easy as just adding your item to the entry provider. +These entry providers can be found in a data pack under the ''item_group_entry_provider'' folder in a namespace
-The unfortunate thing is that these entry providers don't merge by themselves, and this is intended+For the vanilla item groups, there are plenty of item tags available you can use to add your item to existing subgroups
-Instead, there are plenty of item tags available you can use to add your item to. +These item tags are found under the ''item_group'' folder in the item tags in the ''minecraft'' namespace.
-This might change in the future, as you for example currently can't add an item at the very end of an item group.+
 Additionally, some extra provider types exist to handle a few edge cases. Additionally, some extra provider types exist to handle a few edge cases.
  
 All the entry providers are found in the ''entries'' list, where each entry contains a type to use. All the entry providers are found in the ''entries'' list, where each entry contains a type to use.
 The entry provider type is determined by the ''type'' field, and all types are found in the sidebar. The entry provider type is determined by the ''type'' field, and all types are found in the sidebar.
-If only an item id is specified, it uses the [[items:item_groups:item_group_entry_providers:item]] entry provider with the specified item.+If only an item id is specified, it uses the [[items:item_groups:item_group_entry_providers:stack]] entry provider with the specified item. 
 +Each entry also has optional fields to fine-tune the visibility of the entry. 
 +Note that if two item stacks with the same components are added to the same item group, it won't add that second item stack and will log a warning. 
 + 
 + 
 +===== Fields ===== 
 +^  Name  ^  Description  ^  Type  ^  Default Value  ^ 
 +| ''visibility'' | Where in the creative inventory the entry is visible. | An optional [[#stack_visibility|stack visibility]] | ''parent_and_search_tabs''
 +| ''requires_permissions'' | Whether only operators can see the entry. | An optional boolean | ''false''
  
 ===== Example ===== ===== Example =====
Line 40: Line 48:
 } }
 </code> </code>
 +
 +
 +===== Stack Visibility =====
 +The stack visibility determines where in the creative inventory the entry is visible.
 +
 +
 +==== Values ====
 +^  Name  ^  Is visible in  ^
 +| ''parent_and_search_tabs'' | The specified item group and the search tab. |
 +| ''parent_tab_only'' | The specified item group only. |
 +| ''search_tab_only'' | The search tab only. |
items/item_groups/item_group_entry_providers/start.1714169608.txt.gz · Last modified: 2024/04/26 22:13 by errorcraft