package top.r3944realms.lib39.example;

import top.r3944realms.lib39.core.compat.CompatManager;
import top.r3944realms.lib39.example.core.compat.FabricLib39Compat;
import top.r3944realms.lib39.example.core.event.FabricExCommonEventHandler;
import top.r3944realms.lib39.example.core.network.FabricExNetworkHandler;
import top.r3944realms.lib39.example.core.register.FabricExLib39Items;

/**
 * The type Fabric lib 39 example.
 */
public class FabricLib39Example {
    private static boolean registered = false;

    /**
     * Instantiates a new Lib 39 example.
     */
    public FabricLib39Example() {
        if (!registered) {
            init();
            registered = true;
        }
    }

    /**
     * Init.
     */
    public void init() {
        FabricExCommonEventHandler.init();
        FabricExLib39Items.init();
        FabricExNetworkHandler.registerServerReceivers();
        CompatManager orCreateCompatManager = FabricExCommonEventHandler.getOrCreateCompatManager();
        orCreateCompatManager.registerCompat(FabricLib39Compat.ID, FabricLib39Compat.INSTANCE);
    }


    /**
     * Demonstrate feature.
     */
    public void demonstrateFeature() {

    }
}
