/*
 * Gimbal
 * Copyright (C) 2024 moonleay
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

package net.moonleay.gimbal

import net.fabricmc.api.ModInitializer
import net.moonleay.gimbal.build.BuildConstants
import net.moonleay.gimbal.networking.GimbalServer
import org.apache.logging.log4j.LogManager

internal object Main : ModInitializer {
    private val LOGGER = LogManager.getLogger(BuildConstants.modName)

    override fun onInitialize() {
        LOGGER.info("Initializing Gimbal on the common side...")
        LOGGER.info("Registering packets...")
        GimbalServer.registerPacketHandler()
        LOGGER.info("Packets have been registered.")
        LOGGER.info("Gimbal has been initialized on the common side.")
        LOGGER.info("${BuildConstants.modName} (${BuildConstants.modId}) v.${BuildConstants.modVersion} by moonleay")
    }
}
