первая проба
This commit is contained in:
24
anvil-loader/src/main/java/mc/world/anvil/Main.java
Normal file
24
anvil-loader/src/main/java/mc/world/anvil/Main.java
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
package mc.world.anvil;
|
||||||
|
|
||||||
|
import com.flowpowered.nbt.Tag;
|
||||||
|
import com.flowpowered.nbt.stream.NBTInputStream;
|
||||||
|
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
public static void main(String[] args) throws IOException {
|
||||||
|
final Path levelDatPath = Paths.get(args[0]);
|
||||||
|
|
||||||
|
FileInputStream fis = new FileInputStream(levelDatPath.toFile());
|
||||||
|
NBTInputStream nbtInputStream = new NBTInputStream(fis);
|
||||||
|
|
||||||
|
Tag rootTag = nbtInputStream.readTag();
|
||||||
|
System.out.println(rootTag.toString());
|
||||||
|
|
||||||
|
nbtInputStream.close();
|
||||||
|
fis.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user