put it in the right place
This commit is contained in:
parent
b3189721a6
commit
559bc46702
@ -53,6 +53,7 @@ public enum WorldProvider implements Helper {
|
|||||||
public final void initWorld(WorldClient world) {
|
public final void initWorld(WorldClient world) {
|
||||||
int dimensionID = world.provider.getDimensionType().getId();
|
int dimensionID = world.provider.getDimensionType().getId();
|
||||||
File directory;
|
File directory;
|
||||||
|
File readme;
|
||||||
IntegratedServer integratedServer = mc.getIntegratedServer();
|
IntegratedServer integratedServer = mc.getIntegratedServer();
|
||||||
if (integratedServer != null) {
|
if (integratedServer != null) {
|
||||||
WorldServer localServerWorld = integratedServer.getWorld(dimensionID);
|
WorldServer localServerWorld = integratedServer.getWorld(dimensionID);
|
||||||
@ -66,16 +67,19 @@ public enum WorldProvider implements Helper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
directory = new File(directory, "baritone");
|
directory = new File(directory, "baritone");
|
||||||
|
readme = directory;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//remote
|
//remote
|
||||||
directory = new File(Baritone.INSTANCE.getDir(), mc.getCurrentServerData().serverIP);
|
directory = new File(Baritone.INSTANCE.getDir(), mc.getCurrentServerData().serverIP);
|
||||||
|
readme = Baritone.INSTANCE.getDir();
|
||||||
}
|
}
|
||||||
// lol wtf is this baritone folder in my minecraft?
|
// lol wtf is this baritone folder in my minecraft save?
|
||||||
try (FileOutputStream out = new FileOutputStream(new File(directory, "readme.txt"))) {
|
try (FileOutputStream out = new FileOutputStream(new File(readme, "readme.txt"))) {
|
||||||
// good thing we have a readme
|
// good thing we have a readme
|
||||||
out.write("https://github.com/cabaletta/baritone\n".getBytes());
|
out.write("https://github.com/cabaletta/baritone\n".getBytes());
|
||||||
} catch (IOException ex) {}
|
} catch (IOException ex) {}
|
||||||
|
|
||||||
directory = new File(directory, "DIM" + dimensionID);
|
directory = new File(directory, "DIM" + dimensionID);
|
||||||
Path dir = directory.toPath();
|
Path dir = directory.toPath();
|
||||||
if (!Files.exists(dir)) {
|
if (!Files.exists(dir)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user