Lexicon Entry (Botania)
Description
Entry creates a new entry in a given category.
Identifier
Refer to this via any of the following:
mods.botania.entry/* Used as page default */
mods.botania.EntryEditing Values
Sets the Knowledge type of the given entry in the format
entry,type:groovymods.botania.entry.setKnowledgeType(String, KnowledgeType)Sets the Knowledge type of the given entry in the format
entry,type:groovymods.botania.entry.setKnowledgeType(String, String)
Adding Entries
Adds a new Lexica Botania entry to the given Category in the format
name,category:groovymods.botania.entry.add(String, LexiconCategory)Adds a new Lexica Botania entry to the given Category in the format
name,category:groovymods.botania.entry.add(String, String)
Recipe Builder
Just like other recipe types, the Lexicon Entry also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
Entry Builder
Create a builder for custom entries in Lexica Botania Pages.
groovymods.botania.entry.entryBuilder()
ItemStack. Sets the default icon of the Entry. (DefaultItemStack.EMPTY).groovyicon(IIngredient)String. Sets the unlocalized name of the Entry. Requires not null.groovyname(String)KnowledgeType. Sets the Knowledge Type required to view the Entry. Also determines the color. (DefaultBotaniaAPI.basicKnowledge).groovyknowledgeType(KnowledgeType)List<LexiconPage>. Sets the Pages attached to the Entry. Requires greater than or equal to 1.groovypage(LexiconPage) page(LexiconPage...) page(Collection<LexiconPage>)LexiconCategory. Sets the Category the Entry is attached to. Requires not null.groovycategory(String) category(LexiconCategory)boolean. Sets if the Entry always appears at the top of the list in a Category. (Defaultfalse).groovyisPriority()List<ItemStack>. Sets additional items displayed as if they were crafted by a page within the Entry.groovyextraRecipe(IIngredient)
First validates the builder, returning
nulland outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnullorvazkii.botania.api.lexicon.LexiconEntry).groovyregister()
Example
mods.botania.entry.entryBuilder()
.name('test_entry')
.icon(ore('blockIron'))
.category('test')
.knowledgeType(newType)
.page(mods.botania.lexicon.page.createTextPage('groovy.exampleTextPage'))
.register()Removing Entries
Removes the given Entry from the Lexica Botania:
groovymods.botania.entry.remove(String)Removes all entries in the given Lexica Botania Category:
groovymods.botania.entry.removeByCategory(LexiconCategory)Removes all entries in the given Lexica Botania Category:
groovymods.botania.entry.removeByCategory(String)Removes the given Entry from the Lexica Botania:
groovymods.botania.entry.removeEntry(String)Removes all registered recipes:
groovymods.botania.entry.removeAll()
Example
mods.botania.entry.remove('botania.entry.flowers')
mods.botania.entry.removeEntry('botania.entry.apothecary')
mods.botania.entry.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.entry.streamEntries()
