Cleanup
This commit is contained in:
parent
42f8754912
commit
a51470210e
19 changed files with 0 additions and 880 deletions
|
@ -1,50 +0,0 @@
|
|||
package ru.betterend.util;
|
||||
|
||||
public class WorldDataUtil {
|
||||
/*private static CompoundTag root;
|
||||
private static File saveFile;
|
||||
|
||||
public static void load(File file) {
|
||||
saveFile = file;
|
||||
if (file.exists()) {
|
||||
try {
|
||||
root = NbtIo.readCompressed(file);
|
||||
}
|
||||
catch (IOException e) {
|
||||
BetterEnd.LOGGER.error("World data loading failed", e);
|
||||
root = new CompoundTag();
|
||||
}
|
||||
return;
|
||||
}
|
||||
root = new CompoundTag();
|
||||
}
|
||||
|
||||
public static CompoundTag getRootTag() {
|
||||
return root;
|
||||
}
|
||||
|
||||
public static CompoundTag getCompoundTag(String path) {
|
||||
String[] parts = path.split("\\.");
|
||||
CompoundTag tag = root;
|
||||
for (String part: parts) {
|
||||
if (tag.contains(part)) {
|
||||
tag = tag.getCompound(part);
|
||||
}
|
||||
else {
|
||||
CompoundTag t = new CompoundTag();
|
||||
tag.put(part, t);
|
||||
tag = t;
|
||||
}
|
||||
}
|
||||
return tag;
|
||||
}
|
||||
|
||||
public static void saveFile() {
|
||||
try {
|
||||
NbtIo.writeCompressed(root, saveFile);
|
||||
}
|
||||
catch (IOException e) {
|
||||
BetterEnd.LOGGER.error("World data saving failed", e);
|
||||
}
|
||||
}*/
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue