package fr.koka99cab.ibelievechickenfly;

import fr.koka99cab.ibelievechickenfly.chickenboat.ChickenBoatControlPayload;
import fr.koka99cab.ibelievechickenfly.chickenboat.ChickenBoatServerController;
import fr.koka99cab.ibelievechickenfly.chickenfly.ChickenCarryController;
import fr.koka99cab.ibelievechickenfly.registry.ModItems;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry;
import net.minecraft.resources.Identifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public final class IBelieveChickenFlyMod implements ModInitializer {
	public static final String MOD_ID = "ibelievechickenfly";
	public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

	@Override
	public void onInitialize() {
		ModItems.register();
		PayloadTypeRegistry.serverboundPlay().register(ChickenBoatControlPayload.ID, ChickenBoatControlPayload.CODEC);
		ChickenCarryController.register();
		ChickenBoatServerController.register();

		LOGGER.info("IBelieveChickenFly 26.1.2 charge.");
	}

	public static Identifier id(String path) {
		return Identifier.fromNamespaceAndPath(MOD_ID, path);
	}
}
