Research Pages (Astral Sorcery)
Description
Add custom Research Pages to the Astral Sorcery Book.
Identifier
Refer to this via any of the following:
mods.astralsorcery.research/* Used as page default */
mods.astralsorcery.Research
mods.astral.research
mods.astral.Research
Adding Entries
Adds a new node to the given category in the format
category
,node
:groovymods.astralsorcery.research.addNode(ResearchProgression, ResearchNode)
Adds a connection between two nodes:
groovymods.astralsorcery.research.connectNodes(String, String)
Moves the node with the given name to the x and y co-ords specified in the format
name
,x
,z
:groovymods.astralsorcery.research.moveNode(String, int, int)
Example
mods.astralsorcery.research.connectNodes('MY_TEST_RESEARCH2', 'ENHANCED_COLLECTOR')
mods.astralsorcery.research.moveNode('SOOTYMARBLE', 5, 6)
Recipe Builder
Just like other recipe types, the Research Pages also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.astralsorcery.research.researchBuilder()
String
. Sets the unlocalized name of the node. Requires not null.groovyname(String)
ItemStack
. Sets the itemstack representing the node in the category. Requires not null.groovyicon(ItemStack)
List<IJournalPage>
. Sets the pages visible within the node.groovypage(IJournalPage)
ResearchProgression
. Sets the page the node is located on. Requires not null.groovyradiance() discovery() attunement() brilliance() exploration() constellation()
Point
. Sets the location of the node. Requires not null.groovypoint(int, int)
List<ResearchNode>
. Sets what other nodes this node is connected to.groovyconnectionFrom(String) connectionFrom(ResearchNode)
First validates the builder, outputting errors to the log file if the validation failed, then registers the builder.
groovyregister()
Example
mods.astralsorcery.research.researchBuilder()
.name('MY_TEST_RESEARCH')
.point(5,5)
.icon(item('minecraft:pumpkin'))
.discovery()
.page(mods.astralsorcery.research.pageBuilder().textPage('GROOVYSCRIPT.RESEARCH.PAGE.TEST'))
.page(mods.astralsorcery.research.pageBuilder().emptyPage())
.connectionFrom('ALTAR1')
.register()
mods.astralsorcery.research.researchBuilder()
.name('MY_TEST_RESEARCH2')
.point(5,5)
.icon(item('minecraft:pumpkin'))
.constellation()
.page(mods.astralsorcery.research.pageBuilder().textPage('GROOVYSCRIPT.RESEARCH.PAGE.TEST2'))
.page(mods.astralsorcery.research.pageBuilder().constellationRecipePage(item('minecraft:pumpkin')))
.register()
Removing Entries
Removes a connection between two nodes:
groovymods.astralsorcery.research.disconnectNodes(String, String)
Removes the node with the given name:
groovymods.astralsorcery.research.removeNode(String)
Example
mods.astralsorcery.research.disconnectNodes('MY_TEST_RESEARCH', 'ALTAR1')
mods.astralsorcery.research.removeNode('CPAPER')
Getting the value of entries
Returns the node with the given name:
groovymods.astralsorcery.research.getNode(String)