Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

World Directory (Builds upon #32). #55

Open
2 tasks done
Rinnray opened this issue Oct 21, 2023 · 2 comments
Open
2 tasks done

World Directory (Builds upon #32). #55

Rinnray opened this issue Oct 21, 2023 · 2 comments
Labels
new feature New feature or request

Comments

@Rinnray
Copy link

Rinnray commented Oct 21, 2023

Feature description

It builds upon #32.

There's the "Get current world's name" procedure, which I'm guessing came from #32. But it doesn't really get the worlds directory and solve the issue they described.
Yes, you can get it by using "Get the game directory" then add "/saves/" then the world name. But it's not really good, specially as that only solves it for when the mod is used in Singleplayer.

I'm trying to place world specific configs, so in the "serverconfig" directory.

It would be very nice if it got the entire path directly (like how "Get the game directory" works, it would solve if the server and client files are in the same directory, as it is in MCreator. If a world is named the same for singleplayer and multiplayer, the IF statement is gonna go for the first one that is true, but it might not even be the one that's in use.
But it would also make it less blocks needed trying to get the directory if it's in singleplayer or multiplayer.

But it would maybe also solve the issue when people create new worlds without naming them, since they get named "New world (N)" in the directory.
Right now it'll always just be named "New world" so no matter how many "New world (N)" it's always going to go for the first one made.

Maybe I'm just missing something, but I've gone through all the blocks and can't find a way to make it work as needed.

Issue tracker rule checks (please read carefully)

@Rinnray Rinnray added the new feature New feature or request label Oct 21, 2023
@Rinnray
Copy link
Author

Rinnray commented Oct 22, 2023

I've done half the work to get this feature, it works client side. When I tested Server the game crashed.
This seems to be the thing for Client at least Minecraft.getInstance().getSingleplayerServer().getWorldPath(LevelResource.ROOT).toString()
I got no idea what I'm doing and just trying things out.

@Rinnray
Copy link
Author

Rinnray commented Oct 22, 2023

Lol, think the only reason it crashed was because I was testing it with the global "Player right click block".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant