Cave pumpkin
This commit is contained in:
parent
72113034ea
commit
3dcafa522c
40 changed files with 474 additions and 49 deletions
|
@ -30,6 +30,22 @@ public class WorldDataUtil {
|
|||
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.write(root, saveFile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue