-
Notifications
You must be signed in to change notification settings - Fork 8
Creative Tab Modifiers
MehVahdJukaar edited this page Jun 2, 2024
·
25 revisions
This feature allows you to edit the content of a creative tab. This inclues:
- Adding new items (at a certain position)
- Removing existing items
- Changing icon (WIP)
- Adding a new tab (WIP)
- Removing a tab entirely (WIP)
To start you'll need to create a .json file in your resource pack folder in assets/[tab namespace]/polytone/creative_tab_modifiers/[tab name].json
.
For example if you want to modify minecraft:combat
you can do so with a file located in assets/minecraft/polytone/biome_effects/combat.json
Alternatively, if you want to manually specify your targets you can place this json in assets/[your pack namespace]/polytone/creative_tab_modifiers/[some name].json
(Any path will work but this is recommended to avoid overwriting Implicit defined targets).
Then you can add the targets
field to the json containing a list of valid Dimension ids as follows:
{
"targets": ["minecraft:combat", "minecraft:building_blocks"]
}
Json Structure
Here are all the parameters that you can include in your modifier. All fields are optional
| field | explanation|
|---|----|
|`icon`| An ItemStack. Will modify the tab icon (NYI) |
|`removals`| A list of `Item Predicates` (see below) that will determine which items to remove|
|`additions`| A list of `Item Additions` (see below) that will determing which items to add|
|`targets`|A list of IDS to use for explicit targeting|
Here's an example of how a basic modifier could look
```json
{
"removals": [
{
"type": "tag_match",
"tag": "swords"
}
],
"additions": [
{
"items": "minecraft:diamond"
}
]
}