Posted September 4, 20178 yr The world in question is currently in a ZIP inside my JAR file. Is it possible to extract it and teleport the player to it? I've been thinking about extracting it to the saves folder, but I have no idea how to get the path to the player's .minecraft folder in-code.
September 5, 20178 yr Maybe you could generate a specific Dimension of the wanted world (or all) into the new World. How this could be done, no Idea. But you could have a look at different world-generator Mod sources. This helps me often when I'm modding If my English is not perfect it is not my fault! It's the fault of my teacher, parents, friends and google translator!
September 5, 20178 yr You can get the world saves folder quite easily: DimensionManager.getCurrentSaveRootDirectory(); That gives you the current world's folder, so one level up is the "saves" directory, and one level above that is the main ".minecraft" directory. As for unzipping it, the standard java.util.zip package contains the classes/methods you need to extract files. Unloading the current world and loading the new one, though... that's beyond my scope of knowledge. Whatever Minecraft needs, it is most likely not yet another tool tier.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.