Library for helping mods that use graph networks, like Wired Redstone.
This library is based on HCTM-Base by 2xsaiko and is essentially a rewrite of his block-graph-network code in Java with some optimizations. Credit goes to 2xsaiko for designing this system in the first place.
All commands can be accessed via the /graphlib
command.
These commands are used for starting and stopping the block graph debug renderer. The debug renderer can help you debug your code that uses GraphLib or figure out why your wires aren't connecting after a server crash.
This command updates all block-nodes in a given area. If block-nodes were not saved due to a server crash then it may cause some machines or wires to act strange, not transmitting signals correctly. This command will re-connect those machines.
Sometimes a server crash can cause a block-graph to get saved without any block-nodes in it. These empty graphs can clutter up your save file. This command removes these empty graphs.
Sometimes a server crash can cause only graphs or only chunk-indexes to be saved but not the other, meaning that the index used to look up which graphs are in which positions could be out of date. This command rebuilds that index for the given chunks.
Note: the command arguments <from>
and <to>
are block-positions, not chunk positions. Running this command for one
block in a 16x16x16 chunk section should fix the entire chunk section.
GraphLib can be added to a gradle project's dependencies like such:
repositories {
maven {
url 'https://kneelawk.com/maven/'
name 'Kneelawk Maven'
}
maven {
// For LibNetworkStack, if using 'syncing' module
url 'https://maven.alexiil.uk/'
name 'AlexIIL Maven'
}
}
dependencies {
modImplementation("com.kneelawk.graphlib:core:$graphlibVersion")
include("com.kneelawk.graphlib:core:$graphlibVersion")
}
where $graphlibVersion
is replaced by GraphLib's latest release version.