Mystical Agriculture Tiered Crystals

Mystical Agriculture Tiered Crystals

6M Downloads

1.21.1 NeoForge Dedicated Server Crash

Zelioth opened this issue ยท 6 comments

commented

Minecraft 1.21.1
Neo-Forge 21.1.28
MATC 1.7.0

When attempting to use this on a serverit crashes. Claims its not for server usage.

image
latest.log

commented

Yeahhh I'm going to have to say no to that one
seems like scam there

commented

confirmed/ran into this as well today, calling clientside class on the server.

commented

Is this ever going to be fixed?

commented

yep getting this as well

commented

Config screens cannot be registered on a physical server (dedicated).

public MATC(IEventBus bus, ModContainer container) {
container.registerConfig(ModConfig.Type.CLIENT, MATCModConfig.CLIENT_CONFIG);
container.registerConfig(ModConfig.Type.SERVER, MATCModConfig.SERVER_CONFIG);
container.registerExtensionPoint(IConfigScreenFactory.class, ConfigurationScreen::new);
ModRegistry.register(bus);
CREATIVE_MODE_TABS.register(bus);
}

In this case you can include the Dist argument in the Mod's class constructor and check it.

import net.neoforged.api.distmarker.Dist;

...

    public MATC(IEventBus bus, ModContainer container, Dist dist) {
        container.registerConfig(ModConfig.Type.CLIENT, MATCModConfig.CLIENT_CONFIG);
        container.registerConfig(ModConfig.Type.SERVER, MATCModConfig.SERVER_CONFIG);

        if (dist == Dist.CLIENT) {
            container.registerExtensionPoint(IConfigScreenFactory.class, ConfigurationScreen::new);
        }

        ModRegistry.register(bus);
        CREATIVE_MODE_TABS.register(bus);
    }
commented

Apologies for the long wait, Github decided not to send any notifications for this issue. It should be resolved as of verison 1.7.1.