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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added procedure to get current world directory. #56

Closed
wants to merge 2 commits into from
Closed

Added procedure to get current world directory. #56

wants to merge 2 commits into from

Conversation

Rinnray
Copy link

@Rinnray Rinnray commented Oct 22, 2023

This should possibly fix #55. It just crashes when ran with something like "Player right click block" trigger. Might not be this code but just things in general.

Not a Java programmer so please tripple check 馃槄

@Goldorion
Copy link
Owner

Your code will simply not work.

@Goldorion Goldorion closed this Oct 22, 2023
@Rinnray
Copy link
Author

Rinnray commented Oct 22, 2023

馃え Care to elaborate? Because testing things out it, works. It gets the correct world folder and creates a file in there as wanted.

@Rinnray
Copy link
Author

Rinnray commented Oct 22, 2023

Your code will simply not work.

So I really don't get why this.
Tested both in MCreator and outside in a normal environment and it does simply just work.

@Goldorion
Copy link
Owner

world.isClientSide() ? Minecraft.getInstance().getSingleplayerServer()

If the code is executed on the client side, it gets the single player server, no matter what. What will happens on a multiplayer server? It's not single player... so it's null.

@Rinnray
Copy link
Author

Rinnray commented Oct 22, 2023

Ooooh, I see. Thank you.
Hope there's some way to do it, would be extremely useful.

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

Successfully merging this pull request may close these issues.

World Directory (Builds upon #32).
2 participants