AnOpenSauceDev / DataHandlerMod

an incredibly basic and fast data saving and writing library for my mods

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dataHandlingLib

an incredibly basic and fast data saving and writing library. I threw this together so i use it in my projects.

---THIS MOD HAS BEEN RETIRED---

i used this in a few projects, but those never really made it to the light of day. Please use literally any other better data API.

πŸ€” how to use this

πŸ”§ setup

in your build.grade file,

repositories {
    flatDir {
        dirs 'YOUR_LIBRARY_FOLDER_NAME'
    }
}

dependencies {
    modImplementation 'me.wolfie.dataentry:1.0' // this will look for a file called "1.0", so you might want to change that.
}

πŸ’» writing code for this

there are two things you really need to know when using this cursed abomination mod:

  1. ThreadedDataReader
  2. ThreadedDataWriter

✏ Writing Data

public void WriteData(){
Object data = "an object can be anything!";
new ThreadedDataWriter().Write("ModID","VariableID",data);
}

πŸ“– Reading Data

public void ReadData(){
Object data;
ThreadedDataReader reader = new ThreadedDataReader();
 reader.Read("ModID","VariableID");
 data = reader.output;
}

is this for you?

possibly, as long as you don't need advanced and complicated file structures. as of the time this is being written, client and server data will not be synced. This is due to the fact that there is no real way to handle the syncing of large files in a reasonable matter. that im lazy.

side notes

expect to see this in my current (possibly) and future mods. standard MIT license stuff applies here too and so on.

About

an incredibly basic and fast data saving and writing library for my mods

License:MIT License


Languages

Language:Java 100.0%