package rosegoldaddons.mixins; import net.minecraftforge.fml.common.ModContainer; import net.minecraftforge.fml.common.network.handshake.FMLHandshakeMessage; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import rosegoldaddons.Main; import java.util.List; import java.util.Map; @Mixin(value = FMLHandshakeMessage.ModList.class, remap = false) public class MixinFMLHandShake { @Shadow private Map modTags; @Inject(method = "(Ljava/util/List;)V", at = @At("RETURN")) private void removeRGA(List modList, CallbackInfo ci) { if(!Main.mc.isIntegratedServerRunning()) modTags.remove(Main.MOD_ID); } }