Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I need a very simple procedure that will return the name of the world folder in windows explorer as a string. I don't know much about coding Minecraft mods as I use MCreator but I'm learning Java in college and have a technical aptitude. I tried this but it just returned the world name.

package com.angelofcreation.creativebackport;

import net.minecraft.world.level.LevelAccessor;

public class GetWorldName {
    public static String execute(LevelAccessor world) {
        return world.getServer().getWorldData().getLevelName();
    }
}

 

19 hours ago, X66Herobrine66X said:

I don't know much about coding Minecraft mods as I use MCreator

We don't support MCreator here.

19 hours ago, X66Herobrine66X said:

but I'm learning Java in college and have a technical aptitude

Learn Java completely first. Without doing so, you'll likely be confused on most explanations given on this forum since we assume a decent level of Java knowledge is known by modders.

19 hours ago, X66Herobrine66X said:

I need a very simple procedure that will return the name of the world folder in windows explorer as a string

Why do you want this? You should not need to do anything in the world folder.

19 hours ago, X66Herobrine66X said:
package com.angelofcreation.creativebackport;

Since this is a backport, do you have permission to backport this mod from the author (or at least have it from a permissible license)?

  • Author
On 2/25/2023 at 12:10 PM, ChampionAsh5357 said:

We don't support MCreator here.

Learn Java completely first. Without doing so, you'll likely be confused on most explanations given on this forum since we assume a decent level of Java knowledge is known by modders.

Why do you want this? You should not need to do anything in the world folder.

Since this is a backport, do you have permission to backport this mod from the author (or at least have it from a permissible license)?

"We don't support MCreator here.
Learn Java completely first. Without doing so, you'll likely be confused on most explanations given on this forum since we assume a decent level of Java knowledge is known by modders."

Not what I asked, but ok.

"Why do you want this? You should not need to do anything in the world folder."

Why does it matter?

"Since this is a backport, do you have permission to backport this mod from the author (or at least have it from a permissible license)?"
It's not a backport that's just the directory of the java file I'm writing in. I just opened whatever random project I had open to write the code in. And, once again, it's not what I asked.

5 hours ago, X66Herobrine66X said:

Not what I asked, but ok.

I mean...it's kinda important since we don't support MCreator help, so it would be rude to not provide support and not tell you why.

5 hours ago, X66Herobrine66X said:

Why does it matter?

Because, as I said, there's no reason for you to directly touch the world folder itself. There are plenty of other systems that allows you to write/read arbitrary data without it.

5 hours ago, X66Herobrine66X said:

It's not a backport that's just the directory of the java file I'm writing in. I just opened whatever random project I had open to write the code in. And, once again, it's not what I asked.

Apologies for the misunderstanding, but again, it doesn't matter the question if there is a better way to solve it or we don't support it.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.