mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-17 11:05:07 +00:00
Unified build script (#175)
* Update build script * Update build script to import fix for shadow in dev and sources artifacts * Update fixed build script to shadow csv dependency in dev jar as well * Moved jitpack * Move new files
This commit is contained in:
1 parent
43b71b1de6
commit
a7ca6c8527
188 files changed
+646
-968
No files matched your search
@@ -0,0 +1,42 @@
|
||||
package codechicken.nei.config;
|
||||
|
||||
import codechicken.lib.config.ConfigTagParent;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class ConfigSet
|
||||
{
|
||||
private final File nbtFile;
|
||||
public NBTTagCompound nbt;
|
||||
public final ConfigTagParent config;
|
||||
|
||||
public ConfigSet(File nbtFile, ConfigTagParent config) {
|
||||
this.nbtFile = nbtFile;
|
||||
this.config = config;
|
||||
loadNBT();
|
||||
}
|
||||
|
||||
public void loadNBT() {
|
||||
nbt = new NBTTagCompound();
|
||||
try {
|
||||
if (!nbtFile.getParentFile().exists())
|
||||
nbtFile.getParentFile().mkdirs();
|
||||
if (!nbtFile.exists())
|
||||
nbtFile.createNewFile();
|
||||
if (nbtFile.length() > 0)
|
||||
nbt = NEIServerUtils.readNBT(nbtFile);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void saveNBT() {
|
||||
try {
|
||||
NEIServerUtils.writeNBT(nbt, nbtFile);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user