Lexicon Page (Botania)
Description
Page creates a new page to be used in entries.
Identifier
Refer to this via any of the following:
mods.botania.page/* Used as page default */
mods.botania.Page
Adding Entries
Adds a page to the given LexiconEntry, in the format
entry
,page
,index
:groovymods.botania.page.add(LexiconEntry, LexiconPage, int)
Returns a
PageBrew
for use in adding to a LexiconEntry:groovymods.botania.page.createBrewingPage(String, String, RecipeBrew)
Returns a
PageCraftingRecipe
for use in adding to a LexiconEntry:groovymods.botania.page.createCraftingPage(String, String...)
Returns a
PageElvenRecipe
for use in adding to a LexiconEntry:groovymods.botania.page.createElvenTradePage(String, RecipeElvenTrade...)
Returns a
PageEntity
for use in adding to a LexiconEntry:groovymods.botania.page.createEntityPage(String, int, EntityEntry)
Returns a
PageEntity
for use in adding to a LexiconEntry:groovymods.botania.page.createEntityPage(String, int, String)
Returns a
PageImage
for use in adding to a LexiconEntry:groovymods.botania.page.createImagePage(String, String)
Returns a
PageManaInfusionRecipe
for use in adding to a LexiconEntry:groovymods.botania.page.createInfusionPage(String, RecipeManaInfusion...)
Returns a
PageLoreText
for use in adding to a LexiconEntry:groovymods.botania.page.createLoreTextPage(String)
Returns a
PagePetalRecipe
for use in adding to a LexiconEntry:groovymods.botania.page.createPetalPage(String, RecipePetals...)
Returns a
PageRuneRecipe
for use in adding to a LexiconEntry:groovymods.botania.page.createRunePage(String, RecipeRuneAltar...)
Returns a
PageText
for use in adding to a LexiconEntry:groovymods.botania.page.createTextPage(String)
Example
mods.botania.page.createBrewingPage('groovy.exampleBrewingPage', 'bottomText', 'bottomText', mods.botania.brewrecipe.recipeBuilder().input(item('minecraft:clay'), ore('ingotGold'), ore('gemDiamond')).brew(brew('absorption')).register())
mods.botania.page.createCraftingPage('groovy.exampleCraftingPage', 'minecraft:clay')
mods.botania.page.createElvenTradePage('groovy.exampleElvenTradePage', mods.botania.elventrade.recipeBuilder().input(ore('ingotGold'), ore('ingotIron')).output(item('botania:manaresource:7')).register())
mods.botania.page.createEntityPage('groovy.exampleEntityPage', 5, entity('minecraft:wither_skeleton'))
mods.botania.page.createEntityPage('groovy.exampleEntityPage', 100, 'minecraft:wither_skeleton')
mods.botania.page.createImagePage('groovy.exampleImagePage', 'minecraft:textures/items/apple.png')
mods.botania.page.createInfusionPage('groovy.exampleInfusionPage', mods.botania.manainfusion.recipeBuilder().input(ore('ingotGold')).output(item('botania:manaresource', 1)).mana(500).catalyst(blockstate('minecraft:stone')).register())
mods.botania.page.createLoreTextPage('groovy.exampleLoreTextPage')
mods.botania.page.createPetalPage('groovy.examplePetalPage', mods.botania.apothecary.recipeBuilder().input(ore('blockGold'), ore('ingotIron'), item('minecraft:apple')).output(item('minecraft:golden_apple')).register())
mods.botania.page.createRunePage('groovy.exampleRunePage', mods.botania.runealtar.recipeBuilder().input(ore('gemEmerald'), item('minecraft:apple')).output(item('minecraft:diamond')).mana(500).register())
mods.botania.page.createTextPage('groovy.exampleTextPage')
Removing Entries
Removes a page from the given LexiconEntry, in the format
entry
,index
:groovymods.botania.page.remove(LexiconEntry, int)
Removes all pages from the given LexiconEntry:
groovymods.botania.page.removeByEntry(LexiconEntry)
Removes all pages from the given LexiconEntry:
groovymods.botania.page.removeByEntry(String)
Removes all registered recipes:
groovymods.botania.page.removeAll()
Example
mods.botania.page.removeByEntry('botania.entry.runeAltar')
mods.botania.page.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:
groovymods.botania.page.streamPages(LexiconEntry)