NucleoidMC / fantasy

Library to support creating dimensions at runtime
GNU Lesser General Public License v3.0
96 stars 28 forks source link

world delete not working propperly #18

Closed Thecoolpeople closed 1 year ago

Thecoolpeople commented 1 year ago

Version 1.18.2 (I need this version!)

On a new world, this log will be generated. grafik When I restart minecraft following will be created grafik As you can see, the world is reloaded on game start. (I deleted it as you can see it in the picture above.

I deleted the dimension folder manually after game close, and it is regenerated on world entry (even before I start Fantasy)

Does anybody know, what that could fix?

In the following zip file is my minimal Example. FantasyMinExample.zip

This is the "automated" test.

MainFabric.java File:

public void onInitialize() {
        Main.worldHandler = new WorldHandlerImpl();

        ServerLifecycleEvents.SERVER_STARTED.register((MinecraftServer server) -> {
            MainFabric.server = server;

            Main.LOGGER.info(Main.worldHandler.getServerWorlds());

            Main.worldHandler.createWorld("testworld", "normal");
            Main.LOGGER.info(Main.worldHandler.getServerWorlds());

            Main.worldHandler.deleteWorld("testworld");
            Main.LOGGER.info(Main.worldHandler.getServerWorlds());
        });

        ServerLifecycleEvents.SERVER_STOPPING.register((MinecraftServer server) -> {

        });
    }

It would be nice, if anyone knows, what causes this bug. If you look at the delete code, I even tried to remove it from the registry, but this also does not work

Have a nice evening.

Thecoolpeople