/* * macu_lib * Copyright (C) 2026 macuguita * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, see * . * */ package com.macuguita.lib; import java.nio.file.Path; import java.util.function.Consumer; //? fabric { import com.macuguita.lib.fabric.FabricPlatformImpl; //?} //? neoforge { /*import com.macuguita.lib.neoforge.NeoForgePlatformImpl; *///?} import com.macuguita.lib.network.NetworkManager; import com.macuguita.lib.reg.GuitaRegistry; import org.jetbrains.annotations.ApiStatus; import net.minecraft.core.Registry; import net.minecraft.network.protocol.common.custom.CustomPacketPayload; import net.minecraft.server.level.ServerPlayer; @ApiStatus.Internal @ApiStatus.NonExtendable public interface Platform { //? fabric { Platform INSTANCE = new FabricPlatformImpl(); //?} //? neoforge { /*Platform INSTANCE = new NeoForgePlatformImpl(); *///?} boolean isModLoaded(String modid); String loader(); Path getConfigDir(); boolean isDevelopment(); boolean isClient(); GuitaRegistry createGuitaRegistry(Registry registry, String id); void sendToServer(CustomPacketPayload payload); void sendToPlayer(ServerPlayer player, CustomPacketPayload payload); void registerC2S(NetworkManager.C2SRegistration reg); void registerS2C(NetworkManager.S2CRegistration reg); void registerClientS2CHandler(CustomPacketPayload.Type type, Consumer handler); }