Embedding the webserver

PHOTO EMBED

Fri Feb 26 2021 19:17:35 GMT+0000 (UTC)

Saved by @surrealemily

// import statements...

@Mod(HifiMC.MOD_ID)
public class HifiMC {
    // ...

    public HifiMC() {
        // Register the doClientStuff method for modloading
        FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff);

        // ...
    }

    private void doClientStuff(final FMLClientSetupEvent event) {
        String webhostname = "localhost";
        int webport = 7777;

        // TODO: Initialize a webserver
    }

    // ...
}
content_copyCOPY