Skip to content

Lexicon Category (Botania)

Description

Category creates a new entry on the front page of the Lexica Botania.

Identifier

Refer to this via any of the following:

groovy
mods.botania.category/* Used as page default */
mods.botania.Category

Adding Entries

  • Adds a Category to the Lexica Botania in the format name, icon and a priority of 5:

    groovy
    mods.botania.category.add(String, ResourceLocation)
  • Adds a Category to the Lexica Botania in the format name, icon, priority:

    groovy
    mods.botania.category.add(String, ResourceLocation, int)
Example
groovy
mods.botania.category.add('test', resource('minecraft:textures/items/apple.png'))
mods.botania.category.add('first', resource('minecraft:textures/items/clay_ball.png'), 100)

Removing Entries

  • Removes a Category matching the given name:

    groovy
    mods.botania.category.remove(String)
  • Removes a Category matching the given name:

    groovy
    mods.botania.category.removeCategory(String)
  • Removes all registered recipes:

    groovy
    mods.botania.category.removeAll()
Example
groovy
mods.botania.category.remove('botania.category.alfhomancy')
mods.botania.category.removeCategory('botania.category.misc')
mods.botania.category.removeAll()

Getting the value of entries

  • Iterates through every entry in the registry, with the ability to call remove on any element to remove it:

    groovy
    mods.botania.category.streamCategories()

© 2024 CleanroomMC. All Rights Reserved.