I have question regarding how to run a function on every server tick.
Currently, I have a Kotlin class that has functions that need to be run.
In the Kotlin class, there is a function called onServerTick, that is supposed to iterate through all loaded chunks in a level, search for blockEntities, and then output a few NBT values that can be later used for vectors in VS.
There is a separate file called RunNBTScannerBackground which is essentially a singleton object that will always be running as soon as the server starts, and it ends as the server ends.
The problem is with the ReadingForNBTTag class called NBTtoVS. In the onServerTick function, in the for loop, “visibleChunkMap” is private in it library.
The second problem is that I have little to no idea how else to further proceed as I do not understand what I need specifically to ensure that the onServerTick function runs.
I would like a basic rundown of what I need in order to run a process in the background of the game when the mod is initialized.
I have attached the GitHub repository below:
https://github.com/Kyle04123/NBTtoVS/tree/1.20.1/main/src/main/kotlin/io/github/techtastic/vs_addon_template
Any suggestions would be greatly appreciated