Decompiled source of IBelieveICanFly v1.0.1

IBelieveICanFly.dll

Decompiled 3 hours ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using IBelieveICanFly.Patches;
using IBelieveICanFly.Registration;
using ItemManager;
using JetBrains.Annotations;
using Microsoft.CodeAnalysis;
using ServerSync;
using TMPro;
using UnityEngine;
using UnityEngine.Audio;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("IBelieveICanFly")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Yggdrah")]
[assembly: AssemblyProduct("IBelieveICanFly")]
[assembly: AssemblyCopyright("Copyright \ufffd  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("E0E2F92E-557C-4A05-9D89-AA92A0BD75C4")]
[assembly: AssemblyFileVersion("1.0.1")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.1.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace IBelieveICanFly
{
	[BepInPlugin("Yggdrah.IBelieveICanFly", "IBelieveICanFly", "1.0.1")]
	public class IBelieveICanFlyPlugin : BaseUnityPlugin
	{
		private class ConfigurationManagerAttributes
		{
			public int? Order;

			public bool? Browsable;

			public string? Category;

			public Action<ConfigEntryBase>? CustomDrawer;
		}

		private class AcceptableShortcuts : AcceptableValueBase
		{
			public AcceptableShortcuts()
				: base(typeof(KeyboardShortcut))
			{
			}

			public override object Clamp(object value)
			{
				return value;
			}

			public override bool IsValid(object value)
			{
				return true;
			}

			public override string ToDescriptionString()
			{
				return "# Acceptable values: " + string.Join(", ", UnityInput.Current.SupportedKeyCodes);
			}
		}

		internal const string ModName = "IBelieveICanFly";

		internal const string ModVersion = "1.0.1";

		internal const string Author = "Yggdrah";

		private const string ModGUID = "Yggdrah.IBelieveICanFly";

		private static readonly string ConfigFileName = "Yggdrah.IBelieveICanFly.cfg";

		private static readonly string ConfigFileFullPath;

		internal static string ConnectionError;

		private readonly Harmony _harmony = new Harmony("Yggdrah.IBelieveICanFly");

		internal static IBelieveICanFlyPlugin? context;

		public static readonly ManualLogSource IBelieveICanFlyLogger;

		private static readonly ConfigSync ConfigSync;

		private static readonly Dictionary<string, AssetBundle> _assetBundleCache;

		public const string bundleName = "ibelieveicanfly";

		private static ConfigEntry<bool>? _serverConfigLocked;

		public void Awake()
		{
			bool saveOnConfigSet = ((BaseUnityPlugin)this).Config.SaveOnConfigSet;
			((BaseUnityPlugin)this).Config.SaveOnConfigSet = false;
			context = this;
			_serverConfigLocked = config("01 - ServerSync", "01 - Lock Configuration", value: true, "Whether to enable or disable if the configuration is locked in which only server admins can change");
			ConfigSync.AddLockingConfigEntry<bool>(_serverConfigLocked);
			GetAssetBundle("ibelieveicanfly");
			Config.RegisterAllConfigs(((BaseUnityPlugin)this).Config, "Yggdrah.IBelieveICanFly");
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			_harmony.PatchAll(executingAssembly);
			SetupWatcher();
			GliderSystem.Initialize();
			IBelieveICanFly.Registration.Item.RegisterAll("ibelieveicanfly");
			if (saveOnConfigSet)
			{
				((BaseUnityPlugin)this).Config.SaveOnConfigSet = saveOnConfigSet;
				((BaseUnityPlugin)this).Config.Save();
			}
		}

		private void OnDestroy()
		{
			((BaseUnityPlugin)this).Config.Save();
			GliderSystem.OnModUnload();
			GliderSystem.CleanupRemotePlayerGliders();
		}

		public static AssetBundle? GetAssetBundle(string filename)
		{
			string filename2 = filename;
			if (_assetBundleCache.TryGetValue(filename2, out AssetBundle value))
			{
				return value;
			}
			AssetBundle val = ((IEnumerable<AssetBundle>)Resources.FindObjectsOfTypeAll<AssetBundle>()).FirstOrDefault((Func<AssetBundle, bool>)((AssetBundle a) => ((Object)a).name == filename2));
			if ((Object)(object)val != (Object)null)
			{
				_assetBundleCache[filename2] = val;
				return val;
			}
			try
			{
				Assembly executingAssembly = Assembly.GetExecutingAssembly();
				string name = executingAssembly.GetManifestResourceNames().Single((string str) => str.EndsWith(filename2));
				using Stream stream = executingAssembly.GetManifestResourceStream(name);
				AssetBundle val2 = AssetBundle.LoadFromStream(stream);
				_assetBundleCache[filename2] = val2;
				return val2;
			}
			catch (Exception)
			{
				return null;
			}
		}

		private void SetupWatcher()
		{
			FileSystemWatcher fileSystemWatcher = new FileSystemWatcher(Paths.ConfigPath, ConfigFileName);
			fileSystemWatcher.Changed += ReadConfigValues;
			fileSystemWatcher.Created += ReadConfigValues;
			fileSystemWatcher.Renamed += ReadConfigValues;
			fileSystemWatcher.IncludeSubdirectories = true;
			fileSystemWatcher.SynchronizingObject = ThreadingHelper.SynchronizingObject;
			fileSystemWatcher.EnableRaisingEvents = true;
		}

		private void ReadConfigValues(object sender, FileSystemEventArgs e)
		{
			if (File.Exists(ConfigFileFullPath))
			{
				((BaseUnityPlugin)this).Config.Reload();
			}
		}

		internal ConfigEntry<T> config<T>(string group, string name, T value, ConfigDescription description, bool synchronizedSetting = true)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			ConfigDescription val = new ConfigDescription(description.Description + (synchronizedSetting ? " [Synced with Server]" : " [Not Synced with Server]"), description.AcceptableValues, description.Tags);
			ConfigEntry<T> val2 = ((BaseUnityPlugin)this).Config.Bind<T>(group, name, value, val);
			SyncedConfigEntry<T> syncedConfigEntry = ConfigSync.AddConfigEntry<T>(val2);
			syncedConfigEntry.SynchronizedConfig = synchronizedSetting;
			return val2;
		}

		internal ConfigEntry<T> config<T>(string group, string name, T value, string description, bool synchronizedSetting = true)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Expected O, but got Unknown
			return config(group, name, value, new ConfigDescription(description, (AcceptableValueBase)null, Array.Empty<object>()), synchronizedSetting);
		}

		static IBelieveICanFlyPlugin()
		{
			string configPath = Paths.ConfigPath;
			char directorySeparatorChar = Path.DirectorySeparatorChar;
			ConfigFileFullPath = configPath + directorySeparatorChar + ConfigFileName;
			ConnectionError = "";
			IBelieveICanFlyLogger = Logger.CreateLogSource("IBelieveICanFly");
			ConfigSync = new ConfigSync("Yggdrah.IBelieveICanFly")
			{
				DisplayName = "IBelieveICanFly",
				CurrentVersion = "1.0.1",
				MinimumRequiredVersion = "1.0.1",
				ModRequired = true
			};
			_assetBundleCache = new Dictionary<string, AssetBundle>();
		}
	}
	public static class KeyboardExtensions
	{
		public static bool IsKeyDown(this KeyboardShortcut shortcut)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			return (int)((KeyboardShortcut)(ref shortcut)).MainKey != 0 && Input.GetKeyDown(((KeyboardShortcut)(ref shortcut)).MainKey) && ((KeyboardShortcut)(ref shortcut)).Modifiers.All((Func<KeyCode, bool>)Input.GetKey);
		}

		public static bool IsKeyHeld(this KeyboardShortcut shortcut)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			return (int)((KeyboardShortcut)(ref shortcut)).MainKey != 0 && Input.GetKey(((KeyboardShortcut)(ref shortcut)).MainKey) && ((KeyboardShortcut)(ref shortcut)).Modifiers.All((Func<KeyCode, bool>)Input.GetKey);
		}
	}
	[HarmonyPatch(typeof(ZNet), "OnNewConnection")]
	public static class RegisterAndCheckVersion
	{
		private static void Prefix(ZNetPeer peer, ref ZNet __instance)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			peer.m_rpc.Register<ZPackage>("IBelieveICanFly_VersionCheck", (Action<ZRpc, ZPackage>)RpcHandlers.RPC_IBelieveICanFly_Version);
			ZPackage val = new ZPackage();
			val.Write("1.0.1");
			peer.m_rpc.Invoke("IBelieveICanFly_VersionCheck", new object[1] { val });
		}
	}
	[HarmonyPatch(typeof(ZNet), "RPC_PeerInfo")]
	public static class VerifyClient
	{
		private static bool Prefix(ZRpc rpc, ZPackage pkg, ref ZNet __instance)
		{
			if (!__instance.IsServer() || RpcHandlers.ValidatedPeers.Contains(rpc))
			{
				return true;
			}
			rpc.Invoke("Error", new object[1] { 3 });
			return false;
		}

		private static void Postfix(ZNet __instance)
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Expected O, but got Unknown
			ZRoutedRpc.instance.InvokeRoutedRPC(ZRoutedRpc.instance.GetServerPeerID(), "RequestAdminSync", new object[1] { (object)new ZPackage() });
		}
	}
	[HarmonyPatch(typeof(FejdStartup), "ShowConnectError")]
	public class ShowConnectionError
	{
		private static void Postfix(FejdStartup __instance)
		{
			if (__instance.m_connectionFailedPanel.activeSelf)
			{
				__instance.m_connectionFailedError.fontSizeMax = 25f;
				__instance.m_connectionFailedError.fontSizeMin = 15f;
				TMP_Text connectionFailedError = __instance.m_connectionFailedError;
				connectionFailedError.text = connectionFailedError.text + "\n" + IBelieveICanFlyPlugin.ConnectionError;
			}
		}
	}
	[HarmonyPatch(typeof(ZNet), "Disconnect")]
	public static class RemoveDisconnectedPeerFromVerified
	{
		private static void Prefix(ZNetPeer peer, ref ZNet __instance)
		{
			if (__instance.IsServer())
			{
				RpcHandlers.ValidatedPeers.Remove(peer.m_rpc);
			}
		}
	}
	public static class RpcHandlers
	{
		public static readonly List<ZRpc> ValidatedPeers = new List<ZRpc>();

		public static void RPC_IBelieveICanFly_Version(ZRpc rpc, ZPackage pkg)
		{
			string text = pkg.ReadString();
			if (text != "1.0.1")
			{
				IBelieveICanFlyPlugin.ConnectionError = "IBelieveICanFly Installed: 1.0.1\n Needed: " + text;
				if (ZNet.instance.IsServer())
				{
					rpc.Invoke("Error", new object[1] { 3 });
				}
			}
			else if (ZNet.instance.IsServer())
			{
				ValidatedPeers.Add(rpc);
			}
		}
	}
}
namespace IBelieveICanFly.Registration
{
	public static class Config
	{
		public static ConfigEntry<bool> ToggleMode { get; private set; }

		public static ConfigEntry<bool> Wings1Enabled { get; private set; }

		public static ConfigEntry<string> Wings1ItemName { get; private set; }

		public static ConfigEntry<bool> Wings1CheckRightHand { get; private set; }

		public static ConfigEntry<bool> Wings1CheckLeftHand { get; private set; }

		public static ConfigEntry<bool> Wings1CheckUtility { get; private set; }

		public static ConfigEntry<bool> Wings1UseFallReset { get; private set; }

		public static ConfigEntry<bool> Wings1Animation { get; private set; }

		public static ConfigEntry<float> Wings1MinActivationFallSpeed { get; private set; }

		public static ConfigEntry<float> Wings1ForwardSpeed { get; private set; }

		public static ConfigEntry<float> Wings1ForwardForce { get; private set; }

		public static ConfigEntry<float> Wings1DescentSpeed { get; private set; }

		public static ConfigEntry<float> Wings1AirTurnSpeed { get; private set; }

		public static ConfigEntry<float> Wings1LateralDamp { get; private set; }

		public static ConfigEntry<float> Wings1GroundProbeDistance { get; private set; }

		public static ConfigEntry<float> Wings1CushionDescentSpeed { get; private set; }

		public static ConfigEntry<float> Wings1CushionLerp { get; private set; }

		public static ConfigEntry<float> Wings1UpDownOffset { get; private set; }

		public static ConfigEntry<float> Wings1LeftRightOffset { get; private set; }

		public static ConfigEntry<float> Wings1ForwardBackOffset { get; private set; }

		public static ConfigEntry<float> Wings1RotationX { get; private set; }

		public static ConfigEntry<float> Wings1RotationY { get; private set; }

		public static ConfigEntry<float> Wings1RotationZ { get; private set; }

		public static ConfigEntry<float> Wings1Scale { get; private set; }

		public static ConfigEntry<bool> Wings1SFX { get; private set; }

		public static ConfigEntry<bool> Wings1AttachSFXToPlayer { get; private set; }

		public static ConfigEntry<string> Wings1StartSFX { get; private set; }

		public static ConfigEntry<string> Wings1LoopSFX { get; private set; }

		public static ConfigEntry<string> Wings1StopSFX { get; private set; }

		public static ConfigEntry<bool> Wings1VFX { get; private set; }

		public static ConfigEntry<bool> Wings1AttachEffectsToPlayer { get; private set; }

		public static ConfigEntry<string> Wings1StartVFX { get; private set; }

		public static ConfigEntry<string> Wings1LoopVFX { get; private set; }

		public static ConfigEntry<string> Wings1StopVFX { get; private set; }

		public static ConfigEntry<string> Wings1VFXPosition { get; private set; }

		public static ConfigEntry<float> Wings1VFXScale { get; private set; }

		public static ConfigEntry<float> Wings1VFXCustomX { get; private set; }

		public static ConfigEntry<float> Wings1VFXCustomY { get; private set; }

		public static ConfigEntry<float> Wings1VFXCustomZ { get; private set; }

		public static ConfigEntry<string> Wings1VisualPrefab { get; private set; }

		public static ConfigEntry<float> Wings1TiltMaxPitch { get; private set; }

		public static ConfigEntry<float> Wings1TiltMaxRoll { get; private set; }

		public static ConfigEntry<float> Wings1TiltPitchSmoothTime { get; private set; }

		public static ConfigEntry<float> Wings1TiltRollSmoothTime { get; private set; }

		public static ConfigEntry<bool> Wings2Enabled { get; private set; }

		public static ConfigEntry<string> Wings2ItemName { get; private set; }

		public static ConfigEntry<bool> Wings2CheckRightHand { get; private set; }

		public static ConfigEntry<bool> Wings2CheckLeftHand { get; private set; }

		public static ConfigEntry<bool> Wings2CheckUtility { get; private set; }

		public static ConfigEntry<bool> Wings2UseFallReset { get; private set; }

		public static ConfigEntry<bool> Wings2Animation { get; private set; }

		public static ConfigEntry<float> Wings2MinActivationFallSpeed { get; private set; }

		public static ConfigEntry<float> Wings2ForwardSpeed { get; private set; }

		public static ConfigEntry<float> Wings2ForwardForce { get; private set; }

		public static ConfigEntry<float> Wings2DescentSpeed { get; private set; }

		public static ConfigEntry<float> Wings2AirTurnSpeed { get; private set; }

		public static ConfigEntry<float> Wings2LateralDamp { get; private set; }

		public static ConfigEntry<float> Wings2GroundProbeDistance { get; private set; }

		public static ConfigEntry<float> Wings2CushionDescentSpeed { get; private set; }

		public static ConfigEntry<float> Wings2CushionLerp { get; private set; }

		public static ConfigEntry<float> Wings2UpDownOffset { get; private set; }

		public static ConfigEntry<float> Wings2LeftRightOffset { get; private set; }

		public static ConfigEntry<float> Wings2ForwardBackOffset { get; private set; }

		public static ConfigEntry<float> Wings2RotationX { get; private set; }

		public static ConfigEntry<float> Wings2RotationY { get; private set; }

		public static ConfigEntry<float> Wings2RotationZ { get; private set; }

		public static ConfigEntry<float> Wings2Scale { get; private set; }

		public static ConfigEntry<bool> Wings2SFX { get; private set; }

		public static ConfigEntry<bool> Wings2AttachSFXToPlayer { get; private set; }

		public static ConfigEntry<string> Wings2StartSFX { get; private set; }

		public static ConfigEntry<string> Wings2LoopSFX { get; private set; }

		public static ConfigEntry<string> Wings2StopSFX { get; private set; }

		public static ConfigEntry<bool> Wings2VFX { get; private set; }

		public static ConfigEntry<bool> Wings2AttachEffectsToPlayer { get; private set; }

		public static ConfigEntry<string> Wings2StartVFX { get; private set; }

		public static ConfigEntry<string> Wings2LoopVFX { get; private set; }

		public static ConfigEntry<string> Wings2StopVFX { get; private set; }

		public static ConfigEntry<string> Wings2VFXPosition { get; private set; }

		public static ConfigEntry<float> Wings2VFXScale { get; private set; }

		public static ConfigEntry<float> Wings2VFXCustomX { get; private set; }

		public static ConfigEntry<float> Wings2VFXCustomY { get; private set; }

		public static ConfigEntry<float> Wings2VFXCustomZ { get; private set; }

		public static ConfigEntry<string> Wings2VisualPrefab { get; private set; }

		public static ConfigEntry<float> Wings2TiltMaxPitch { get; private set; }

		public static ConfigEntry<float> Wings2TiltMaxRoll { get; private set; }

		public static ConfigEntry<float> Wings2TiltPitchSmoothTime { get; private set; }

		public static ConfigEntry<float> Wings2TiltRollSmoothTime { get; private set; }

		public static ConfigEntry<bool> Wings3Enabled { get; private set; }

		public static ConfigEntry<string> Wings3ItemName { get; private set; }

		public static ConfigEntry<bool> Wings3CheckRightHand { get; private set; }

		public static ConfigEntry<bool> Wings3CheckLeftHand { get; private set; }

		public static ConfigEntry<bool> Wings3CheckUtility { get; private set; }

		public static ConfigEntry<bool> Wings3UseFallReset { get; private set; }

		public static ConfigEntry<bool> Wings3Animation { get; private set; }

		public static ConfigEntry<float> Wings3MinActivationFallSpeed { get; private set; }

		public static ConfigEntry<float> Wings3ForwardSpeed { get; private set; }

		public static ConfigEntry<float> Wings3ForwardForce { get; private set; }

		public static ConfigEntry<float> Wings3DescentSpeed { get; private set; }

		public static ConfigEntry<float> Wings3AirTurnSpeed { get; private set; }

		public static ConfigEntry<float> Wings3LateralDamp { get; private set; }

		public static ConfigEntry<float> Wings3GroundProbeDistance { get; private set; }

		public static ConfigEntry<float> Wings3CushionDescentSpeed { get; private set; }

		public static ConfigEntry<float> Wings3CushionLerp { get; private set; }

		public static ConfigEntry<float> Wings3UpDownOffset { get; private set; }

		public static ConfigEntry<float> Wings3LeftRightOffset { get; private set; }

		public static ConfigEntry<float> Wings3ForwardBackOffset { get; private set; }

		public static ConfigEntry<float> Wings3RotationX { get; private set; }

		public static ConfigEntry<float> Wings3RotationY { get; private set; }

		public static ConfigEntry<float> Wings3RotationZ { get; private set; }

		public static ConfigEntry<float> Wings3Scale { get; private set; }

		public static ConfigEntry<bool> Wings3SFX { get; private set; }

		public static ConfigEntry<bool> Wings3AttachSFXToPlayer { get; private set; }

		public static ConfigEntry<string> Wings3StartSFX { get; private set; }

		public static ConfigEntry<string> Wings3LoopSFX { get; private set; }

		public static ConfigEntry<string> Wings3StopSFX { get; private set; }

		public static ConfigEntry<bool> Wings3VFX { get; private set; }

		public static ConfigEntry<bool> Wings3AttachEffectsToPlayer { get; private set; }

		public static ConfigEntry<string> Wings3StartVFX { get; private set; }

		public static ConfigEntry<string> Wings3LoopVFX { get; private set; }

		public static ConfigEntry<string> Wings3StopVFX { get; private set; }

		public static ConfigEntry<string> Wings3VFXPosition { get; private set; }

		public static ConfigEntry<float> Wings3VFXScale { get; private set; }

		public static ConfigEntry<float> Wings3VFXCustomX { get; private set; }

		public static ConfigEntry<float> Wings3VFXCustomY { get; private set; }

		public static ConfigEntry<float> Wings3VFXCustomZ { get; private set; }

		public static ConfigEntry<string> Wings3VisualPrefab { get; private set; }

		public static ConfigEntry<float> Wings3TiltMaxPitch { get; private set; }

		public static ConfigEntry<float> Wings3TiltMaxRoll { get; private set; }

		public static ConfigEntry<float> Wings3TiltPitchSmoothTime { get; private set; }

		public static ConfigEntry<float> Wings3TiltRollSmoothTime { get; private set; }

		public static ConfigEntry<bool> Wings4Enabled { get; private set; }

		public static ConfigEntry<string> Wings4ItemName { get; private set; }

		public static ConfigEntry<bool> Wings4CheckRightHand { get; private set; }

		public static ConfigEntry<bool> Wings4CheckLeftHand { get; private set; }

		public static ConfigEntry<bool> Wings4CheckUtility { get; private set; }

		public static ConfigEntry<bool> Wings4UseFallReset { get; private set; }

		public static ConfigEntry<bool> Wings4Animation { get; private set; }

		public static ConfigEntry<float> Wings4MinActivationFallSpeed { get; private set; }

		public static ConfigEntry<float> Wings4ForwardSpeed { get; private set; }

		public static ConfigEntry<float> Wings4ForwardForce { get; private set; }

		public static ConfigEntry<float> Wings4DescentSpeed { get; private set; }

		public static ConfigEntry<float> Wings4AirTurnSpeed { get; private set; }

		public static ConfigEntry<float> Wings4LateralDamp { get; private set; }

		public static ConfigEntry<float> Wings4GroundProbeDistance { get; private set; }

		public static ConfigEntry<float> Wings4CushionDescentSpeed { get; private set; }

		public static ConfigEntry<float> Wings4CushionLerp { get; private set; }

		public static ConfigEntry<float> Wings4UpDownOffset { get; private set; }

		public static ConfigEntry<float> Wings4LeftRightOffset { get; private set; }

		public static ConfigEntry<float> Wings4ForwardBackOffset { get; private set; }

		public static ConfigEntry<float> Wings4RotationX { get; private set; }

		public static ConfigEntry<float> Wings4RotationY { get; private set; }

		public static ConfigEntry<float> Wings4RotationZ { get; private set; }

		public static ConfigEntry<float> Wings4Scale { get; private set; }

		public static ConfigEntry<bool> Wings4SFX { get; private set; }

		public static ConfigEntry<bool> Wings4AttachSFXToPlayer { get; private set; }

		public static ConfigEntry<string> Wings4StartSFX { get; private set; }

		public static ConfigEntry<string> Wings4LoopSFX { get; private set; }

		public static ConfigEntry<string> Wings4StopSFX { get; private set; }

		public static ConfigEntry<bool> Wings4VFX { get; private set; }

		public static ConfigEntry<bool> Wings4AttachEffectsToPlayer { get; private set; }

		public static ConfigEntry<string> Wings4StartVFX { get; private set; }

		public static ConfigEntry<string> Wings4LoopVFX { get; private set; }

		public static ConfigEntry<string> Wings4StopVFX { get; private set; }

		public static ConfigEntry<string> Wings4VFXPosition { get; private set; }

		public static ConfigEntry<float> Wings4VFXScale { get; private set; }

		public static ConfigEntry<float> Wings4VFXCustomX { get; private set; }

		public static ConfigEntry<float> Wings4VFXCustomY { get; private set; }

		public static ConfigEntry<float> Wings4VFXCustomZ { get; private set; }

		public static ConfigEntry<string> Wings4VisualPrefab { get; private set; }

		public static ConfigEntry<float> Wings4TiltMaxPitch { get; private set; }

		public static ConfigEntry<float> Wings4TiltMaxRoll { get; private set; }

		public static ConfigEntry<float> Wings4TiltPitchSmoothTime { get; private set; }

		public static ConfigEntry<float> Wings4TiltRollSmoothTime { get; private set; }

		public static ConfigEntry<bool> Wings5Enabled { get; private set; }

		public static ConfigEntry<string> Wings5ItemName { get; private set; }

		public static ConfigEntry<bool> Wings5CheckRightHand { get; private set; }

		public static ConfigEntry<bool> Wings5CheckLeftHand { get; private set; }

		public static ConfigEntry<bool> Wings5CheckUtility { get; private set; }

		public static ConfigEntry<bool> Wings5UseFallReset { get; private set; }

		public static ConfigEntry<bool> Wings5Animation { get; private set; }

		public static ConfigEntry<float> Wings5MinActivationFallSpeed { get; private set; }

		public static ConfigEntry<float> Wings5ForwardSpeed { get; private set; }

		public static ConfigEntry<float> Wings5ForwardForce { get; private set; }

		public static ConfigEntry<float> Wings5DescentSpeed { get; private set; }

		public static ConfigEntry<float> Wings5AirTurnSpeed { get; private set; }

		public static ConfigEntry<float> Wings5LateralDamp { get; private set; }

		public static ConfigEntry<float> Wings5GroundProbeDistance { get; private set; }

		public static ConfigEntry<float> Wings5CushionDescentSpeed { get; private set; }

		public static ConfigEntry<float> Wings5CushionLerp { get; private set; }

		public static ConfigEntry<float> Wings5UpDownOffset { get; private set; }

		public static ConfigEntry<float> Wings5LeftRightOffset { get; private set; }

		public static ConfigEntry<float> Wings5ForwardBackOffset { get; private set; }

		public static ConfigEntry<float> Wings5RotationX { get; private set; }

		public static ConfigEntry<float> Wings5RotationY { get; private set; }

		public static ConfigEntry<float> Wings5RotationZ { get; private set; }

		public static ConfigEntry<float> Wings5Scale { get; private set; }

		public static ConfigEntry<bool> Wings5SFX { get; private set; }

		public static ConfigEntry<bool> Wings5AttachSFXToPlayer { get; private set; }

		public static ConfigEntry<string> Wings5StartSFX { get; private set; }

		public static ConfigEntry<string> Wings5LoopSFX { get; private set; }

		public static ConfigEntry<string> Wings5StopSFX { get; private set; }

		public static ConfigEntry<bool> Wings5VFX { get; private set; }

		public static ConfigEntry<bool> Wings5AttachEffectsToPlayer { get; private set; }

		public static ConfigEntry<string> Wings5StartVFX { get; private set; }

		public static ConfigEntry<string> Wings5LoopVFX { get; private set; }

		public static ConfigEntry<string> Wings5StopVFX { get; private set; }

		public static ConfigEntry<string> Wings5VFXPosition { get; private set; }

		public static ConfigEntry<float> Wings5VFXScale { get; private set; }

		public static ConfigEntry<float> Wings5VFXCustomX { get; private set; }

		public static ConfigEntry<float> Wings5VFXCustomY { get; private set; }

		public static ConfigEntry<float> Wings5VFXCustomZ { get; private set; }

		public static ConfigEntry<string> Wings5VisualPrefab { get; private set; }

		public static ConfigEntry<float> Wings5TiltMaxPitch { get; private set; }

		public static ConfigEntry<float> Wings5TiltMaxRoll { get; private set; }

		public static ConfigEntry<float> Wings5TiltPitchSmoothTime { get; private set; }

		public static ConfigEntry<float> Wings5TiltRollSmoothTime { get; private set; }

		public static void RegisterAllConfigs(ConfigFile config, string modGuid)
		{
			if ((Object)(object)IBelieveICanFlyPlugin.context != (Object)null)
			{
				ToggleMode = IBelieveICanFlyPlugin.context.config("02 - General Settings", "01 - Toggle Mode", value: true, "Whether to enable or disable if pressing Space will toggle gliding. When disabled, hold Space to glide.");
				RegisterWings1();
				RegisterWings2();
				RegisterWings3();
				RegisterWings4();
				RegisterWings5();
			}
		}

		private static void RegisterWings1()
		{
			Wings1Enabled = IBelieveICanFlyPlugin.context.config("02.01 - Wings 1", "01 - Enabled", value: true, "Whether to enable or disable Wings 1. When enabled, this wings configuration will be active.");
			Wings1ItemName = IBelieveICanFlyPlugin.context.config("02.01 - Wings 1", "02 - Item Name", "Glider_BackPack_Ygg", "Item prefab name that triggers Wings 1. Use vanilla item names like 'SwordIron' or custom item names.");
			Wings1VisualPrefab = IBelieveICanFlyPlugin.context.config("02.01 - Wings 1", "03 - Visual Prefab Override", "DragonWings_Ygg", "Optional: Override the visual prefab shown when gliding. If empty, uses the trigger item's model. Use this to show wings while having a ring/amulet as the trigger item.");
			Wings1CheckRightHand = IBelieveICanFlyPlugin.context.config("02.02 - Wings 1", "01 - Check Right Hand", value: true, "Whether to enable or disable checking the right hand slot for Wings 1 item.");
			Wings1CheckLeftHand = IBelieveICanFlyPlugin.context.config("02.02 - Wings 1", "02 - Check Left Hand", value: false, "Whether to enable or disable checking the left hand slot for Wings 1 item.");
			Wings1CheckUtility = IBelieveICanFlyPlugin.context.config("02.02 - Wings 1", "03 - Check Utility Slot", value: false, "Whether to enable or disable checking the utility/belt slot for Wings 1 item.");
			Wings1UseFallReset = IBelieveICanFlyPlugin.context.config("02.02 - Wings 1", "04 - Prevent Fall Damage", value: true, "Whether to enable or disable fall damage when landing after gliding with Wings 1.");
			Wings1Animation = IBelieveICanFlyPlugin.context.config("02.02 - Wings 1", "05 - Use Animation", value: true, "Whether to enable or disable using animation while gliding with Wings 1.");
			Wings1MinActivationFallSpeed = IBelieveICanFlyPlugin.context.config("02.03 - Wings 1", "01 - Min Activation Fall Speed", -0.5f, "Prevent glide trigger if you barely left ground for Wings 1.");
			Wings1ForwardSpeed = IBelieveICanFlyPlugin.context.config("02.03 - Wings 1", "02 - Max Forward Speed", 10f, "Maximum forward speed while gliding with Wings 1.");
			Wings1ForwardForce = IBelieveICanFlyPlugin.context.config("02.03 - Wings 1", "03 - Forward Force", 5f, "Forward acceleration while gliding with Wings 1.");
			Wings1DescentSpeed = IBelieveICanFlyPlugin.context.config("02.03 - Wings 1", "04 - Max Descent Speed", -4f, "How fast you can fall while gliding with Wings 1 (more negative = faster fall).");
			Wings1AirTurnSpeed = IBelieveICanFlyPlugin.context.config("02.03 - Wings 1", "05 - Air Turn Speed", 120f, "Yaw control while gliding with Wings 1 (deg/sec).");
			Wings1LateralDamp = IBelieveICanFlyPlugin.context.config("02.03 - Wings 1", "06 - Lateral Damping", 0.15f, "Slight damping to stabilize lateral drift for Wings 1.");
			Wings1GroundProbeDistance = IBelieveICanFlyPlugin.context.config("02.03 - Wings 1", "07 - Ground Probe Distance", 2.5f, "Start cushioning this far from ground for Wings 1.");
			Wings1CushionDescentSpeed = IBelieveICanFlyPlugin.context.config("02.03 - Wings 1", "08 - Cushion Descent Speed", -0.7f, "Final descent cap near ground for Wings 1.");
			Wings1CushionLerp = IBelieveICanFlyPlugin.context.config("02.03 - Wings 1", "09 - Cushion Lerp", 0.6f, "How quickly we clamp toward the cushion speed for Wings 1.");
			Wings1TiltMaxPitch = IBelieveICanFlyPlugin.context.config("02.04 - Wings 1", "01 - Max Pitch", 25f, "Maximum pitch angle (nose up/down) in degrees for Wings 1.");
			Wings1TiltMaxRoll = IBelieveICanFlyPlugin.context.config("02.04 - Wings 1", "02 - Max Roll", 35f, "Maximum roll angle (banking) in degrees for Wings 1.");
			Wings1TiltPitchSmoothTime = IBelieveICanFlyPlugin.context.config("02.04 - Wings 1", "03 - Pitch Smooth Time", 0.15f, "How quickly pitch changes (lower = faster response) for Wings 1.");
			Wings1TiltRollSmoothTime = IBelieveICanFlyPlugin.context.config("02.04 - Wings 1", "04 - Roll Smooth Time", 0.1f, "How quickly roll/banking changes (lower = faster response) for Wings 1.");
			Wings1UpDownOffset = IBelieveICanFlyPlugin.context.config("02.05 - Wings 1", "01 - Up/Down Offset", 0.3f, "Adjust Wings 1 vertical position on the player's back. Higher values move it up.");
			Wings1LeftRightOffset = IBelieveICanFlyPlugin.context.config("02.05 - Wings 1", "02 - Left/Right Offset", 0f, "Adjust Wings 1 horizontal position on the player's back. Positive values move it to the right.");
			Wings1ForwardBackOffset = IBelieveICanFlyPlugin.context.config("02.05 - Wings 1", "03 - Forward/Back Offset", 0.7f, "Adjust Wings 1 position front-to-back on the player. Negative values move it backward.");
			Wings1RotationX = IBelieveICanFlyPlugin.context.config("02.06 - Wings 1", "01 - X Rotation", 10f, "Adjust Wings 1 pitch rotation in degrees. Controls tilt forward/backward.");
			Wings1RotationY = IBelieveICanFlyPlugin.context.config("02.06 - Wings 1", "02 - Y Rotation", 160f, "Adjust Wings 1 yaw rotation in degrees. Controls left/right facing.");
			Wings1RotationZ = IBelieveICanFlyPlugin.context.config("02.06 - Wings 1", "03 - Z Rotation", 0f, "Adjust Wings 1 roll rotation in degrees. Controls tilt to sides.");
			Wings1Scale = IBelieveICanFlyPlugin.context.config("02.06 - Wings 1", "04 - Scale", 0.3f, "Adjust the overall size of Wings 1. 1.0 is normal size.");
			Wings1SFX = IBelieveICanFlyPlugin.context.config("02.07 - Wings 1", "01 - SFX", value: true, "Whether to enable or disable SFX when gliding with Wings 1.");
			Wings1AttachSFXToPlayer = IBelieveICanFlyPlugin.context.config("02.07 - Wings 1", "02 - Attach SFX To Player", value: true, "Whether to enable or disable SFX for Wings 1 will be attached to the player and follow their movement.");
			Wings1StartSFX = IBelieveICanFlyPlugin.context.config("02.07 - Wings 1", "03 - Start SFX", "sfx_flap_glider_Ygg", "Sound effect to play when starting to glide with Wings 1. Use vanilla sound effect names.");
			Wings1LoopSFX = IBelieveICanFlyPlugin.context.config("02.07 - Wings 1", "04 - Loop SFX", "", "Sound effect to play continuously while gliding with Wings 1. Use vanilla sound effect names.");
			Wings1StopSFX = IBelieveICanFlyPlugin.context.config("02.07 - Wings 1", "05 - Stop SFX", "sfx_flap_glider_Ygg", "Sound effect to play when stopping gliding with Wings 1. Use vanilla sound effect names.");
			Wings1VFX = IBelieveICanFlyPlugin.context.config("02.08 - Wings 1", "01 - VFX", value: true, "Whether to enable or disable VFX when gliding with Wings 1.");
			Wings1AttachEffectsToPlayer = IBelieveICanFlyPlugin.context.config("02.08 - Wings 1", "02 - Attach VFX To Player", value: true, "Whether to enable or disable VFX for Wings 1 will be attached to the player and follow their movement.");
			Wings1StartVFX = IBelieveICanFlyPlugin.context.config("02.08 - Wings 1", "03 - Start VFX", "", "Visual effect to play when starting to glide with Wings 1. Use vanilla VFX names.");
			Wings1LoopVFX = IBelieveICanFlyPlugin.context.config("02.08 - Wings 1", "04 - Loop VFX", "", "Visual effect to play continuously while gliding with Wings 1. Use vanilla VFX names.");
			Wings1StopVFX = IBelieveICanFlyPlugin.context.config("02.08 - Wings 1", "05 - Stop VFX", "", "Visual effect to play when stopping gliding with Wings 1. Use vanilla VFX names.");
			Wings1VFXPosition = IBelieveICanFlyPlugin.context.config("02.08 - Wings 1", "06 - VFX Position", "Root", "Position for VFX for Wings 1: 'Root' (at player's feet), 'Middle' (at player's center), or 'Custom' (use custom coordinates).");
			Wings1VFXScale = IBelieveICanFlyPlugin.context.config("02.08 - Wings 1", "07 - VFX Scale", 1f, "Scale factor for VFX for Wings 1. 1.0 is normal size.");
			Wings1VFXCustomX = IBelieveICanFlyPlugin.context.config("02.08 - Wings 1", "08 - Custom X Offset", 0f, "X offset for custom VFX position for Wings 1 (only used when VFX Position is set to 'Custom').");
			Wings1VFXCustomY = IBelieveICanFlyPlugin.context.config("02.08 - Wings 1", "09 - Custom Y Offset", 1f, "Y offset for custom VFX position for Wings 1 (only used when VFX Position is set to 'Custom').");
			Wings1VFXCustomZ = IBelieveICanFlyPlugin.context.config("02.08 - Wings 1", "10 - Custom Z Offset", 0f, "Z offset for custom VFX position for Wings 1 (only used when VFX Position is set to 'Custom').");
		}

		private static void RegisterWings2()
		{
			Wings2Enabled = IBelieveICanFlyPlugin.context.config("03.01 - Wings 2", "01 - Enabled", value: true, "Whether to enable or disable Wings 2. When enabled, this wings configuration will be active.");
			Wings2ItemName = IBelieveICanFlyPlugin.context.config("03.01 - Wings 2", "02 - Item Name", "Glider_BackPack_DragonModer_Ygg", "Item prefab name that triggers Wings 2. Use vanilla item names like 'SwordBronze' or custom item names.");
			Wings2VisualPrefab = IBelieveICanFlyPlugin.context.config("03.01 - Wings 2", "03 - Visual Prefab Override", "DragonWings_Ygg1", "Optional: Override the visual prefab shown when gliding. If empty, uses the trigger item's model. Use this to show wings while having a ring/amulet as the trigger item.");
			Wings2CheckRightHand = IBelieveICanFlyPlugin.context.config("03.02 - Wings 2", "01 - Check Right Hand", value: true, "Whether to enable or disable checking the right hand slot for Wings 2 item.");
			Wings2CheckLeftHand = IBelieveICanFlyPlugin.context.config("03.02 - Wings 2", "02 - Check Left Hand", value: false, "Whether to enable or disable checking the left hand slot for Wings 2 item.");
			Wings2CheckUtility = IBelieveICanFlyPlugin.context.config("03.02 - Wings 2", "03 - Check Utility Slot", value: false, "Whether to enable or disable checking the utility/belt slot for Wings 2 item.");
			Wings2UseFallReset = IBelieveICanFlyPlugin.context.config("03.02 - Wings 2", "04 - Prevent Fall Damage", value: true, "Whether to enable or disable fall damage when landing after gliding with Wings 2.");
			Wings2Animation = IBelieveICanFlyPlugin.context.config("03.02 - Wings 2", "05 - Use Animation", value: true, "Whether to enable or disable using animation while gliding with Wings 2.");
			Wings2MinActivationFallSpeed = IBelieveICanFlyPlugin.context.config("03.03 - Wings 2", "01 - Min Activation Fall Speed", -0.5f, "Prevent glide trigger if you barely left ground for Wings 2.");
			Wings2ForwardSpeed = IBelieveICanFlyPlugin.context.config("03.03 - Wings 2", "02 - Max Forward Speed", 12f, "Maximum forward speed while gliding with Wings 2.");
			Wings2ForwardForce = IBelieveICanFlyPlugin.context.config("03.03 - Wings 2", "03 - Forward Force", 8f, "Forward acceleration while gliding with Wings 2.");
			Wings2DescentSpeed = IBelieveICanFlyPlugin.context.config("03.03 - Wings 2", "04 - Max Descent Speed", -3.5f, "How fast you can fall while gliding with Wings 2 (more negative = faster fall).");
			Wings2AirTurnSpeed = IBelieveICanFlyPlugin.context.config("03.03 - Wings 2", "05 - Air Turn Speed", 100f, "Yaw control while gliding with Wings 2 (deg/sec).");
			Wings2LateralDamp = IBelieveICanFlyPlugin.context.config("03.03 - Wings 2", "06 - Lateral Damping", 0.15f, "Slight damping to stabilize lateral drift for Wings 2.");
			Wings2GroundProbeDistance = IBelieveICanFlyPlugin.context.config("03.03 - Wings 2", "07 - Ground Probe Distance", 2.5f, "Start cushioning this far from ground for Wings 2.");
			Wings2CushionDescentSpeed = IBelieveICanFlyPlugin.context.config("03.03 - Wings 2", "08 - Cushion Descent Speed", -0.7f, "Final descent cap near ground for Wings 2.");
			Wings2CushionLerp = IBelieveICanFlyPlugin.context.config("03.03 - Wings 2", "09 - Cushion Lerp", 0.6f, "How quickly we clamp toward the cushion speed for Wings 2.");
			Wings2TiltMaxPitch = IBelieveICanFlyPlugin.context.config("03.04 - Wings 2", "01 - Max Pitch", 25f, "Maximum pitch angle (nose up/down) in degrees for Wings 2.");
			Wings2TiltMaxRoll = IBelieveICanFlyPlugin.context.config("03.04 - Wings 2", "02 - Max Roll", 35f, "Maximum roll angle (banking) in degrees for Wings 2.");
			Wings2TiltPitchSmoothTime = IBelieveICanFlyPlugin.context.config("03.04 - Wings 2", "03 - Pitch Smooth Time", 0.15f, "How quickly pitch changes (lower = faster response) for Wings 2.");
			Wings2TiltRollSmoothTime = IBelieveICanFlyPlugin.context.config("03.04 - Wings 2", "04 - Roll Smooth Time", 0.1f, "How quickly roll/banking changes (lower = faster response) for Wings 2.");
			Wings2UpDownOffset = IBelieveICanFlyPlugin.context.config("03.05 - Wings 2", "01 - Up/Down Offset", -0.18f, "Adjust Wings 2 vertical position on the player's back. Higher values move it up.");
			Wings2LeftRightOffset = IBelieveICanFlyPlugin.context.config("03.05 - Wings 2", "02 - Left/Right Offset", 0f, "Adjust Wings 2 horizontal position on the player's back. Positive values move it to the right.");
			Wings2ForwardBackOffset = IBelieveICanFlyPlugin.context.config("03.05 - Wings 2", "03 - Forward/Back Offset", -0.15f, "Adjust Wings 2 position front-to-back on the player. Negative values move it backward.");
			Wings2RotationX = IBelieveICanFlyPlugin.context.config("03.06 - Wings 2", "01 - X Rotation", 0f, "Adjust Wings 2 pitch rotation in degrees. Controls tilt forward/backward.");
			Wings2RotationY = IBelieveICanFlyPlugin.context.config("03.06 - Wings 2", "02 - Y Rotation", 0f, "Adjust Wings 2 yaw rotation in degrees. Controls left/right facing.");
			Wings2RotationZ = IBelieveICanFlyPlugin.context.config("03.06 - Wings 2", "03 - Z Rotation", 0f, "Adjust Wings 2 roll rotation in degrees. Controls tilt to sides.");
			Wings2Scale = IBelieveICanFlyPlugin.context.config("03.06 - Wings 2", "04 - Scale", 0.3f, "Adjust the overall size of Wings 2. 1.0 is normal size.");
			Wings2SFX = IBelieveICanFlyPlugin.context.config("03.07 - Wings 2", "01 - SFX", value: true, "Whether to enable or disable SFX when gliding with Wings 2.");
			Wings2AttachSFXToPlayer = IBelieveICanFlyPlugin.context.config("03.07 - Wings 2", "02 - Attach SFX To Player", value: true, "Whether to enable or disable SFX for Wings 2 will be attached to the player and follow their movement.");
			Wings2StartSFX = IBelieveICanFlyPlugin.context.config("03.07 - Wings 2", "03 - Start SFX", "sfx_flap_glider_Ygg", "Sound effect to play when starting to glide with Wings 2. Use vanilla sound effect names.");
			Wings2LoopSFX = IBelieveICanFlyPlugin.context.config("03.07 - Wings 2", "04 - Loop SFX", "", "Sound effect to play continuously while gliding with Wings 2. Use vanilla sound effect names.");
			Wings2StopSFX = IBelieveICanFlyPlugin.context.config("03.07 - Wings 2", "05 - Stop SFX", "sfx_flap_glider_Ygg", "Sound effect to play when stopping gliding with Wings 2. Use vanilla sound effect names.");
			Wings2VFX = IBelieveICanFlyPlugin.context.config("03.08 - Wings 2", "01 - VFX", value: true, "Whether to enable or disable VFX when gliding with Wings 2.");
			Wings2AttachEffectsToPlayer = IBelieveICanFlyPlugin.context.config("03.08 - Wings 2", "02 - Attach VFX To Player", value: true, "Whether to enable or disable VFX for Wings 2 will be attached to the player and follow their movement.");
			Wings2StartVFX = IBelieveICanFlyPlugin.context.config("03.08 - Wings 2", "03 - Start VFX", "", "Visual effect to play when starting to glide with Wings 2. Use vanilla VFX names.");
			Wings2LoopVFX = IBelieveICanFlyPlugin.context.config("03.08 - Wings 2", "04 - Loop VFX", "", "Visual effect to play continuously while gliding with Wings 2. Use vanilla VFX names.");
			Wings2StopVFX = IBelieveICanFlyPlugin.context.config("03.08 - Wings 2", "05 - Stop VFX", "", "Visual effect to play when stopping gliding with Wings 2. Use vanilla VFX names.");
			Wings2VFXPosition = IBelieveICanFlyPlugin.context.config("03.08 - Wings 2", "06 - VFX Position", "Root", "Position for VFX for Wings 2: 'Root' (at player's feet), 'Middle' (at player's center), or 'Custom' (use custom coordinates).");
			Wings2VFXScale = IBelieveICanFlyPlugin.context.config("03.08 - Wings 2", "07 - VFX Scale", 1f, "Scale factor for VFX for Wings 2. 1.0 is normal size.");
			Wings2VFXCustomX = IBelieveICanFlyPlugin.context.config("03.08 - Wings 2", "08 - Custom X Offset", 0f, "X offset for custom VFX position for Wings 2 (only used when VFX Position is set to 'Custom').");
			Wings2VFXCustomY = IBelieveICanFlyPlugin.context.config("03.08 - Wings 2", "09 - Custom Y Offset", 1f, "Y offset for custom VFX position for Wings 2 (only used when VFX Position is set to 'Custom').");
			Wings2VFXCustomZ = IBelieveICanFlyPlugin.context.config("03.08 - Wings 2", "10 - Custom Z Offset", 0f, "Z offset for custom VFX position for Wings 2 (only used when VFX Position is set to 'Custom').");
		}

		private static void RegisterWings3()
		{
			Wings3Enabled = IBelieveICanFlyPlugin.context.config("04.01 - Wings 3", "01 - Enabled", value: true, "Whether to enable or disable Wings 3. When enabled, this wings configuration will be active.");
			Wings3ItemName = IBelieveICanFlyPlugin.context.config("04.01 - Wings 3", "02 - Item Name", "Glider_BackPack_BlackDragon_Ygg", "Item prefab name that triggers Wings 3. Use vanilla item names like 'SwordBlackmetal' or custom item names.");
			Wings3VisualPrefab = IBelieveICanFlyPlugin.context.config("04.01 - Wings 3", "03 - Visual Prefab Override", "DragonWings_Ygg2", "Optional: Override the visual prefab shown when gliding. If empty, uses the trigger item's model. Use this to show wings while having a ring/amulet as the trigger item.");
			Wings3CheckRightHand = IBelieveICanFlyPlugin.context.config("04.02 - Wings 3", "01 - Check Right Hand", value: true, "Whether to enable or disable checking the right hand slot for Wings 3 item.");
			Wings3CheckLeftHand = IBelieveICanFlyPlugin.context.config("04.02 - Wings 3", "02 - Check Left Hand", value: false, "Whether to enable or disable checking the left hand slot for Wings 3 item.");
			Wings3CheckUtility = IBelieveICanFlyPlugin.context.config("04.02 - Wings 3", "03 - Check Utility Slot", value: false, "Whether to enable or disable checking the utility/belt slot for Wings 3 item.");
			Wings3UseFallReset = IBelieveICanFlyPlugin.context.config("04.02 - Wings 3", "04 - Prevent Fall Damage", value: true, "Whether to enable or disable fall damage when landing after gliding with Wings 3.");
			Wings3Animation = IBelieveICanFlyPlugin.context.config("04.02 - Wings 3", "05 - Use Animation", value: true, "Whether to enable or disable using animation while gliding with Wings 3.");
			Wings3MinActivationFallSpeed = IBelieveICanFlyPlugin.context.config("04.03 - Wings 3", "01 - Min Activation Fall Speed", -0.5f, "Prevent glide trigger if you barely left ground for Wings 3.");
			Wings3ForwardSpeed = IBelieveICanFlyPlugin.context.config("04.03 - Wings 3", "02 - Max Forward Speed", 20f, "Maximum forward speed while gliding with Wings 3.");
			Wings3ForwardForce = IBelieveICanFlyPlugin.context.config("04.03 - Wings 3", "03 - Forward Force", 12f, "Forward acceleration while gliding with Wings 3.");
			Wings3DescentSpeed = IBelieveICanFlyPlugin.context.config("04.03 - Wings 3", "04 - Max Descent Speed", -2.5f, "How fast you can fall while gliding with Wings 3 (more negative = faster fall).");
			Wings3AirTurnSpeed = IBelieveICanFlyPlugin.context.config("04.03 - Wings 3", "05 - Air Turn Speed", 100f, "Yaw control while gliding with Wings 3 (deg/sec).");
			Wings3LateralDamp = IBelieveICanFlyPlugin.context.config("04.03 - Wings 3", "06 - Lateral Damping", 0.15f, "Slight damping to stabilize lateral drift for Wings 3.");
			Wings3GroundProbeDistance = IBelieveICanFlyPlugin.context.config("04.03 - Wings 3", "07 - Ground Probe Distance", 2.5f, "Start cushioning this far from ground for Wings 3.");
			Wings3CushionDescentSpeed = IBelieveICanFlyPlugin.context.config("04.03 - Wings 3", "08 - Cushion Descent Speed", -0.7f, "Final descent cap near ground for Wings 3.");
			Wings3CushionLerp = IBelieveICanFlyPlugin.context.config("04.03 - Wings 3", "09 - Cushion Lerp", 0.6f, "How quickly we clamp toward the cushion speed for Wings 3.");
			Wings3TiltMaxPitch = IBelieveICanFlyPlugin.context.config("04.04 - Wings 3", "01 - Max Pitch", 25f, "Maximum pitch angle (nose up/down) in degrees for Wings 3.");
			Wings3TiltMaxRoll = IBelieveICanFlyPlugin.context.config("04.04 - Wings 3", "02 - Max Roll", 35f, "Maximum roll angle (banking) in degrees for Wings 3.");
			Wings3TiltPitchSmoothTime = IBelieveICanFlyPlugin.context.config("04.04 - Wings 3", "03 - Pitch Smooth Time", 0.15f, "How quickly pitch changes (lower = faster response) for Wings 3.");
			Wings3TiltRollSmoothTime = IBelieveICanFlyPlugin.context.config("04.04 - Wings 3", "04 - Roll Smooth Time", 0.1f, "How quickly roll/banking changes (lower = faster response) for Wings 3.");
			Wings3UpDownOffset = IBelieveICanFlyPlugin.context.config("04.05 - Wings 3", "01 - Up/Down Offset", -0.1f, "Adjust Wings 3 vertical position on the player's back. Higher values move it up.");
			Wings3LeftRightOffset = IBelieveICanFlyPlugin.context.config("04.05 - Wings 3", "02 - Left/Right Offset", 0f, "Adjust Wings 3 horizontal position on the player's back. Positive values move it to the right.");
			Wings3ForwardBackOffset = IBelieveICanFlyPlugin.context.config("04.05 - Wings 3", "03 - Forward/Back Offset", -0.2f, "Adjust Wings 3 position front-to-back on the player. Negative values move it backward.");
			Wings3RotationX = IBelieveICanFlyPlugin.context.config("04.06 - Wings 3", "01 - X Rotation", 0f, "Adjust Wings 3 pitch rotation in degrees. Controls tilt forward/backward.");
			Wings3RotationY = IBelieveICanFlyPlugin.context.config("04.06 - Wings 3", "02 - Y Rotation", 0f, "Adjust Wings 3 yaw rotation in degrees. Controls left/right facing.");
			Wings3RotationZ = IBelieveICanFlyPlugin.context.config("04.06 - Wings 3", "03 - Z Rotation", 0f, "Adjust Wings 3 roll rotation in degrees. Controls tilt to sides.");
			Wings3Scale = IBelieveICanFlyPlugin.context.config("04.06 - Wings 3", "04 - Scale", 0.3f, "Adjust the overall size of Wings 3. 1.0 is normal size.");
			Wings3SFX = IBelieveICanFlyPlugin.context.config("04.07 - Wings 3", "01 - SFX", value: true, "Whether to enable or disable SFX when gliding with Wings 3.");
			Wings3AttachSFXToPlayer = IBelieveICanFlyPlugin.context.config("04.07 - Wings 3", "02 - Attach SFX To Player", value: true, "Whether to enable or disable SFX for Wings 3 will be attached to the player and follow their movement.");
			Wings3StartSFX = IBelieveICanFlyPlugin.context.config("04.07 - Wings 3", "03 - Start SFX", "sfx_flap_glider_Ygg", "Sound effect to play when starting to glide with Wings 3. Use vanilla sound effect names.");
			Wings3LoopSFX = IBelieveICanFlyPlugin.context.config("04.07 - Wings 3", "04 - Loop SFX", "", "Sound effect to play continuously while gliding with Wings 3. Use vanilla sound effect names.");
			Wings3StopSFX = IBelieveICanFlyPlugin.context.config("04.07 - Wings 3", "05 - Stop SFX", "sfx_flap_glider_Ygg", "Sound effect to play when stopping gliding with Wings 3. Use vanilla sound effect names.");
			Wings3VFX = IBelieveICanFlyPlugin.context.config("04.08 - Wings 3", "01 - VFX", value: true, "Whether to enable or disable VFX when gliding with Wings 3.");
			Wings3AttachEffectsToPlayer = IBelieveICanFlyPlugin.context.config("04.08 - Wings 3", "02 - Attach VFX To Player", value: true, "Whether to enable or disable VFX for Wings 3 will be attached to the player and follow their movement.");
			Wings3StartVFX = IBelieveICanFlyPlugin.context.config("04.08 - Wings 3", "03 - Start VFX", "", "Visual effect to play when starting to glide with Wings 3. Use vanilla VFX names.");
			Wings3LoopVFX = IBelieveICanFlyPlugin.context.config("04.08 - Wings 3", "04 - Loop VFX", "", "Visual effect to play continuously while gliding with Wings 3. Use vanilla VFX names.");
			Wings3StopVFX = IBelieveICanFlyPlugin.context.config("04.08 - Wings 3", "05 - Stop VFX", "", "Visual effect to play when stopping gliding with Wings 3. Use vanilla VFX names.");
			Wings3VFXPosition = IBelieveICanFlyPlugin.context.config("04.08 - Wings 3", "06 - VFX Position", "Root", "Position for VFX for Wings 3: 'Root' (at player's feet), 'Middle' (at player's center), or 'Custom' (use custom coordinates).");
			Wings3VFXScale = IBelieveICanFlyPlugin.context.config("04.08 - Wings 3", "07 - VFX Scale", 1f, "Scale factor for VFX for Wings 3. 1.0 is normal size.");
			Wings3VFXCustomX = IBelieveICanFlyPlugin.context.config("04.08 - Wings 3", "08 - Custom X Offset", 0f, "X offset for custom VFX position for Wings 3 (only used when VFX Position is set to 'Custom').");
			Wings3VFXCustomY = IBelieveICanFlyPlugin.context.config("04.08 - Wings 3", "09 - Custom Y Offset", 1f, "Y offset for custom VFX position for Wings 3 (only used when VFX Position is set to 'Custom').");
			Wings3VFXCustomZ = IBelieveICanFlyPlugin.context.config("04.08 - Wings 3", "10 - Custom Z Offset", 0f, "Z offset for custom VFX position for Wings 3 (only used when VFX Position is set to 'Custom').");
		}

		private static void RegisterWings4()
		{
			Wings4Enabled = IBelieveICanFlyPlugin.context.config("05.01 - Wings 4", "01 - Enabled", value: true, "Whether to enable or disable Wings 4. When enabled, this wings configuration will be active.");
			Wings4ItemName = IBelieveICanFlyPlugin.context.config("05.01 - Wings 4", "02 - Item Name", "Glider_Gjall_BackPack_Ygg", "Item prefab name that triggers Wings 4. Use vanilla item names like 'SwordSilver' or custom item names.");
			Wings4VisualPrefab = IBelieveICanFlyPlugin.context.config("05.01 - Wings 4", "03 - Visual Prefab Override", "DragonWings_Ygg3", "Optional: Override the visual prefab shown when gliding. If empty, uses the trigger item's model. Use this to show wings while having a ring/amulet as the trigger item.");
			Wings4CheckRightHand = IBelieveICanFlyPlugin.context.config("05.02 - Wings 4", "01 - Check Right Hand", value: true, "Whether to enable or disable checking the right hand slot for Wings 4 item.");
			Wings4CheckLeftHand = IBelieveICanFlyPlugin.context.config("05.02 - Wings 4", "02 - Check Left Hand", value: false, "Whether to enable or disable checking the left hand slot for Wings 4 item.");
			Wings4CheckUtility = IBelieveICanFlyPlugin.context.config("05.02 - Wings 4", "03 - Check Utility Slot", value: false, "Whether to enable or disable checking the utility/belt slot for Wings 4 item.");
			Wings4UseFallReset = IBelieveICanFlyPlugin.context.config("05.02 - Wings 4", "04 - Prevent Fall Damage", value: true, "Whether to enable or disable fall damage when landing after gliding with Wings 4.");
			Wings4Animation = IBelieveICanFlyPlugin.context.config("05.02 - Wings 4", "05 - Use Animation", value: true, "Whether to enable or disable using animation while gliding with Wings 4.");
			Wings4MinActivationFallSpeed = IBelieveICanFlyPlugin.context.config("05.03 - Wings 4", "01 - Min Activation Fall Speed", -0.5f, "Prevent glide trigger if you barely left ground for Wings 4.");
			Wings4ForwardSpeed = IBelieveICanFlyPlugin.context.config("05.03 - Wings 4", "02 - Max Forward Speed", 6f, "Maximum forward speed while gliding with Wings 4.");
			Wings4ForwardForce = IBelieveICanFlyPlugin.context.config("05.03 - Wings 4", "03 - Forward Force", 11f, "Forward acceleration while gliding with Wings 4.");
			Wings4DescentSpeed = IBelieveICanFlyPlugin.context.config("05.03 - Wings 4", "04 - Max Descent Speed", -1f, "How fast you can fall while gliding with Wings 4 (more negative = faster fall).");
			Wings4AirTurnSpeed = IBelieveICanFlyPlugin.context.config("05.03 - Wings 4", "05 - Air Turn Speed", 130f, "Yaw control while gliding with Wings 4 (deg/sec).");
			Wings4LateralDamp = IBelieveICanFlyPlugin.context.config("05.03 - Wings 4", "06 - Lateral Damping", 0.15f, "Slight damping to stabilize lateral drift for Wings 4.");
			Wings4GroundProbeDistance = IBelieveICanFlyPlugin.context.config("05.03 - Wings 4", "07 - Ground Probe Distance", 2.5f, "Start cushioning this far from ground for Wings 4.");
			Wings4CushionDescentSpeed = IBelieveICanFlyPlugin.context.config("05.03 - Wings 4", "08 - Cushion Descent Speed", -0.7f, "Final descent cap near ground for Wings 4.");
			Wings4CushionLerp = IBelieveICanFlyPlugin.context.config("05.03 - Wings 4", "09 - Cushion Lerp", 0.6f, "How quickly we clamp toward the cushion speed for Wings 4.");
			Wings4TiltMaxPitch = IBelieveICanFlyPlugin.context.config("05.04 - Wings 4", "01 - Max Pitch", 25f, "Maximum pitch angle (nose up/down) in degrees for Wings 4.");
			Wings4TiltMaxRoll = IBelieveICanFlyPlugin.context.config("05.04 - Wings 4", "02 - Max Roll", 35f, "Maximum roll angle (banking) in degrees for Wings 4.");
			Wings4TiltPitchSmoothTime = IBelieveICanFlyPlugin.context.config("05.04 - Wings 4", "03 - Pitch Smooth Time", 0.15f, "How quickly pitch changes (lower = faster response) for Wings 4.");
			Wings4TiltRollSmoothTime = IBelieveICanFlyPlugin.context.config("05.04 - Wings 4", "04 - Roll Smooth Time", 0.1f, "How quickly roll/banking changes (lower = faster response) for Wings 4.");
			Wings4UpDownOffset = IBelieveICanFlyPlugin.context.config("05.05 - Wings 4", "01 - Up/Down Offset", -2f, "Adjust Wings 4 vertical position on the player's back. Higher values move it up.");
			Wings4LeftRightOffset = IBelieveICanFlyPlugin.context.config("05.05 - Wings 4", "02 - Left/Right Offset", 0f, "Adjust Wings 4 horizontal position on the player's back. Positive values move it to the right.");
			Wings4ForwardBackOffset = IBelieveICanFlyPlugin.context.config("05.05 - Wings 4", "03 - Forward/Back Offset", -5f, "Adjust Wings 4 position front-to-back on the player. Negative values move it backward.");
			Wings4RotationX = IBelieveICanFlyPlugin.context.config("05.06 - Wings 4", "01 - X Rotation", 70f, "Adjust Wings 4 pitch rotation in degrees. Controls tilt forward/backward.");
			Wings4RotationY = IBelieveICanFlyPlugin.context.config("05.06 - Wings 4", "02 - Y Rotation", 0f, "Adjust Wings 4 yaw rotation in degrees. Controls left/right facing.");
			Wings4RotationZ = IBelieveICanFlyPlugin.context.config("05.06 - Wings 4", "03 - Z Rotation", 0f, "Adjust Wings 4 roll rotation in degrees. Controls tilt to sides.");
			Wings4Scale = IBelieveICanFlyPlugin.context.config("05.06 - Wings 4", "04 - Scale", 0.4f, "Adjust the overall size of Wings 4. 1.0 is normal size.");
			Wings4SFX = IBelieveICanFlyPlugin.context.config("05.06 - Wings 4", "01 - SFX", value: true, "Whether to enable or disable SFX when gliding with Wings 4.");
			Wings4AttachSFXToPlayer = IBelieveICanFlyPlugin.context.config("05.06 - Wings 4", "02 - Attach SFX To Player", value: true, "Whether to enable or disable SFX for Wings 4 will be attached to the player and follow their movement.");
			Wings4StartSFX = IBelieveICanFlyPlugin.context.config("05.06 - Wings 4", "03 - Start SFX", "sfx_flap_glider_Ygg", "Sound effect to play when starting to glide with Wings 4. Use vanilla sound effect names.");
			Wings4LoopSFX = IBelieveICanFlyPlugin.context.config("05.06 - Wings 4", "04 - Loop SFX", "", "Sound effect to play continuously while gliding with Wings 4. Use vanilla sound effect names.");
			Wings4StopSFX = IBelieveICanFlyPlugin.context.config("05.06 - Wings 4", "05 - Stop SFX", "sfx_flap_glider_Ygg", "Sound effect to play when stopping gliding with Wings 4. Use vanilla sound effect names.");
			Wings4VFX = IBelieveICanFlyPlugin.context.config("05.07 - Wings 4", "01 - VFX", value: true, "Whether to enable or disable VFX when gliding with Wings 4.");
			Wings4AttachEffectsToPlayer = IBelieveICanFlyPlugin.context.config("05.07 - Wings 4", "02 - Attach VFX To Player", value: true, "Whether to enable or disable VFX for Wings 4 will be attached to the player and follow their movement.");
			Wings4StartVFX = IBelieveICanFlyPlugin.context.config("05.07 - Wings 4", "03 - Start VFX", "", "Visual effect to play when starting to glide with Wings 4. Use vanilla VFX names.");
			Wings4LoopVFX = IBelieveICanFlyPlugin.context.config("05.07 - Wings 4", "04 - Loop VFX", "", "Visual effect to play continuously while gliding with Wings 4. Use vanilla VFX names.");
			Wings4StopVFX = IBelieveICanFlyPlugin.context.config("05.07 - Wings 4", "05 - Stop VFX", "", "Visual effect to play when stopping gliding with Wings 4. Use vanilla VFX names.");
			Wings4VFXPosition = IBelieveICanFlyPlugin.context.config("05.07 - Wings 4", "06 - VFX Position", "Root", "Position for VFX for Wings 4: 'Root' (at player's feet), 'Middle' (at player's center), or 'Custom' (use custom coordinates).");
			Wings4VFXScale = IBelieveICanFlyPlugin.context.config("05.07 - Wings 4", "07 - VFX Scale", 1f, "Scale factor for VFX for Wings 4. 1.0 is normal size.");
			Wings4VFXCustomX = IBelieveICanFlyPlugin.context.config("05.07 - Wings 4", "08 - Custom X Offset", 0f, "X offset for custom VFX position for Wings 4 (only used when VFX Position is set to 'Custom').");
			Wings4VFXCustomY = IBelieveICanFlyPlugin.context.config("05.07 - Wings 4", "09 - Custom Y Offset", 1f, "Y offset for custom VFX position for Wings 4 (only used when VFX Position is set to 'Custom').");
			Wings4VFXCustomZ = IBelieveICanFlyPlugin.context.config("05.07 - Wings 4", "10 - Custom Z Offset", 0f, "Z offset for custom VFX position for Wings 4 (only used when VFX Position is set to 'Custom').");
		}

		private static void RegisterWings5()
		{
			Wings5Enabled = IBelieveICanFlyPlugin.context.config("06.01 - Wings 5", "01 - Enabled", value: true, "Whether to enable or disable Wings 5. When enabled, this wings configuration will be active.");
			Wings5ItemName = IBelieveICanFlyPlugin.context.config("06.01 - Wings 5", "02 - Item Name", "", "Item prefab name that triggers Wings 5. Use vanilla item names like 'SwordFlametal' or custom item names.");
			Wings5VisualPrefab = IBelieveICanFlyPlugin.context.config("06.01 - Wings 5", "03 - Visual Prefab Override", "ibicf_wing5", "Optional: Override the visual prefab shown when gliding. If empty, uses the trigger item's model. Use this to show wings while having a ring/amulet as the trigger item.");
			Wings5CheckRightHand = IBelieveICanFlyPlugin.context.config("06.02 - Wings 5", "01 - Check Right Hand", value: true, "Whether to enable or disable checking the right hand slot for Wings 5 item.");
			Wings5CheckLeftHand = IBelieveICanFlyPlugin.context.config("06.02 - Wings 5", "02 - Check Left Hand", value: false, "Whether to enable or disable checking the left hand slot for Wings 5 item.");
			Wings5CheckUtility = IBelieveICanFlyPlugin.context.config("06.02 - Wings 5", "03 - Check Utility Slot", value: false, "Whether to enable or disable checking the utility/belt slot for Wings 5 item.");
			Wings5UseFallReset = IBelieveICanFlyPlugin.context.config("06.02 - Wings 5", "04 - Prevent Fall Damage", value: true, "Whether to enable or disable fall damage when landing after gliding with Wings 5.");
			Wings5Animation = IBelieveICanFlyPlugin.context.config("06.02 - Wings 5", "05 - Use Animation", value: true, "Whether to enable or disable using animation while gliding with Wings 5.");
			Wings5MinActivationFallSpeed = IBelieveICanFlyPlugin.context.config("06.03 - Wings 5", "01 - Min Activation Fall Speed", -0.5f, "Prevent glide trigger if you barely left ground for Wings 5.");
			Wings5ForwardSpeed = IBelieveICanFlyPlugin.context.config("06.03 - Wings 5", "02 - Max Forward Speed", 18f, "Maximum forward speed while gliding with Wings 5.");
			Wings5ForwardForce = IBelieveICanFlyPlugin.context.config("06.03 - Wings 5", "03 - Forward Force", 14f, "Forward acceleration while gliding with Wings 5.");
			Wings5DescentSpeed = IBelieveICanFlyPlugin.context.config("06.03 - Wings 5", "04 - Max Descent Speed", -5f, "How fast you can fall while gliding with Wings 5 (more negative = faster fall).");
			Wings5AirTurnSpeed = IBelieveICanFlyPlugin.context.config("06.03 - Wings 5", "05 - Air Turn Speed", 150f, "Yaw control while gliding with Wings 5 (deg/sec).");
			Wings5LateralDamp = IBelieveICanFlyPlugin.context.config("06.03 - Wings 5", "06 - Lateral Damping", 0.15f, "Slight damping to stabilize lateral drift for Wings 5.");
			Wings5GroundProbeDistance = IBelieveICanFlyPlugin.context.config("06.03 - Wings 5", "07 - Ground Probe Distance", 2.5f, "Start cushioning this far from ground for Wings 5.");
			Wings5CushionDescentSpeed = IBelieveICanFlyPlugin.context.config("06.03 - Wings 5", "08 - Cushion Descent Speed", -0.7f, "Final descent cap near ground for Wings 5.");
			Wings5CushionLerp = IBelieveICanFlyPlugin.context.config("06.03 - Wings 5", "09 - Cushion Lerp", 0.6f, "How quickly we clamp toward the cushion speed for Wings 5.");
			Wings5TiltMaxPitch = IBelieveICanFlyPlugin.context.config("06.04 - Wings 5", "01 - Max Pitch", 25f, "Maximum pitch angle (nose up/down) in degrees for Wings 5.");
			Wings5TiltMaxRoll = IBelieveICanFlyPlugin.context.config("06.04 - Wings 5", "02 - Max Roll", 35f, "Maximum roll angle (banking) in degrees for Wings 5.");
			Wings5TiltPitchSmoothTime = IBelieveICanFlyPlugin.context.config("06.04 - Wings 5", "03 - Pitch Smooth Time", 0.15f, "How quickly pitch changes (lower = faster response) for Wings 5.");
			Wings5TiltRollSmoothTime = IBelieveICanFlyPlugin.context.config("06.04 - Wings 5", "04 - Roll Smooth Time", 0.1f, "How quickly roll/banking changes (lower = faster response) for Wings 5.");
			Wings5UpDownOffset = IBelieveICanFlyPlugin.context.config("06.05 - Wings 5", "01 - Up/Down Offset", 0.8f, "Adjust Wings 5 vertical position on the player's back. Higher values move it up.");
			Wings5LeftRightOffset = IBelieveICanFlyPlugin.context.config("06.05 - Wings 5", "02 - Left/Right Offset", 0f, "Adjust Wings 5 horizontal position on the player's back. Positive values move it to the right.");
			Wings5ForwardBackOffset = IBelieveICanFlyPlugin.context.config("06.05 - Wings 5", "03 - Forward/Back Offset", 0.5f, "Adjust Wings 5 position front-to-back on the player. Negative values move it backward.");
			Wings5RotationX = IBelieveICanFlyPlugin.context.config("06.06 - Wings 5", "01 - X Rotation", 70f, "Adjust Wings 5 pitch rotation in degrees. Controls tilt forward/backward.");
			Wings5RotationY = IBelieveICanFlyPlugin.context.config("06.06 - Wings 5", "02 - Y Rotation", 0f, "Adjust Wings 5 yaw rotation in degrees. Controls left/right facing.");
			Wings5RotationZ = IBelieveICanFlyPlugin.context.config("06.06 - Wings 5", "03 - Z Rotation", 0f, "Adjust Wings 5 roll rotation in degrees. Controls tilt to sides.");
			Wings5Scale = IBelieveICanFlyPlugin.context.config("06.06 - Wings 5", "04 - Scale", 1f, "Adjust the overall size of Wings 5. 1.0 is normal size.");
			Wings5SFX = IBelieveICanFlyPlugin.context.config("06.07 - Wings 5", "01 - SFX", value: true, "Whether to enable or disable SFX when gliding with Wings 5.");
			Wings5AttachSFXToPlayer = IBelieveICanFlyPlugin.context.config("06.07 - Wings 5", "02 - Attach SFX To Player", value: true, "Whether to enable or disable SFX for Wings 5 will be attached to the player and follow their movement.");
			Wings5StartSFX = IBelieveICanFlyPlugin.context.config("06.07 - Wings 5", "03 - Start SFX", "sfx_build_hammer_metal", "Sound effect to play when starting to glide with Wings 5. Use vanilla sound effect names.");
			Wings5LoopSFX = IBelieveICanFlyPlugin.context.config("06.07 - Wings 5", "04 - Loop SFX", "", "Sound effect to play continuously while gliding with Wings 5. Use vanilla sound effect names.");
			Wings5StopSFX = IBelieveICanFlyPlugin.context.config("06.07 - Wings 5", "05 - Stop SFX", "sfx_build_hammer_metal", "Sound effect to play when stopping gliding with Wings 5. Use vanilla sound effect names.");
			Wings5VFX = IBelieveICanFlyPlugin.context.config("06.08 - Wings 5", "01 - VFX", value: true, "Whether to enable or disable VFX when gliding with Wings 5.");
			Wings5AttachEffectsToPlayer = IBelieveICanFlyPlugin.context.config("06.08 - Wings 5", "02 - Attach VFX To Player", value: true, "Whether to enable or disable VFX for Wings 5 will be attached to the player and follow their movement.");
			Wings5StartVFX = IBelieveICanFlyPlugin.context.config("06.08 - Wings 5", "03 - Start VFX", "fx_fenring_burning_hand_long", "Visual effect to play when starting to glide with Wings 5. Use vanilla VFX names.");
			Wings5LoopVFX = IBelieveICanFlyPlugin.context.config("06.08 - Wings 5", "04 - Loop VFX", "", "Visual effect to play continuously while gliding with Wings 5. Use vanilla VFX names.");
			Wings5StopVFX = IBelieveICanFlyPlugin.context.config("06.08 - Wings 5", "05 - Stop VFX", "fx_fenring_frost_hand_long", "Visual effect to play when stopping gliding with Wings 5. Use vanilla VFX names.");
			Wings5VFXPosition = IBelieveICanFlyPlugin.context.config("06.08 - Wings 5", "06 - VFX Position", "Root", "Position for VFX for Wings 5: 'Root' (at player's feet), 'Middle' (at player's center), or 'Custom' (use custom coordinates).");
			Wings5VFXScale = IBelieveICanFlyPlugin.context.config("06.08 - Wings 5", "07 - VFX Scale", 1f, "Scale factor for VFX for Wings 5. 1.0 is normal size.");
			Wings5VFXCustomX = IBelieveICanFlyPlugin.context.config("06.08 - Wings 5", "08 - Custom X Offset", 0f, "X offset for custom VFX position for Wings 5 (only used when VFX Position is set to 'Custom').");
			Wings5VFXCustomY = IBelieveICanFlyPlugin.context.config("06.08 - Wings 5", "09 - Custom Y Offset", 1f, "Y offset for custom VFX position for Wings 5 (only used when VFX Position is set to 'Custom').");
			Wings5VFXCustomZ = IBelieveICanFlyPlugin.context.config("06.08 - Wings 5", "10 - Custom Z Offset", 0f, "Z offset for custom VFX position for Wings 5 (only used when VFX Position is set to 'Custom').");
		}

		public static (bool enabled, int wingsIndex) GetWingsConfigForItem(ItemData item)
		{
			if (item == null)
			{
				return (false, -1);
			}
			string text = (Object.op_Implicit((Object)(object)item.m_dropPrefab) ? ((Object)item.m_dropPrefab).name : "");
			string name = item.m_shared.m_name;
			if (Wings1Enabled.Value && !string.IsNullOrEmpty(Wings1ItemName.Value) && (text.Equals(Wings1ItemName.Value) || name.Equals(Wings1ItemName.Value) || name.Contains(Wings1ItemName.Value)))
			{
				return (true, 1);
			}
			if (Wings2Enabled.Value && !string.IsNullOrEmpty(Wings2ItemName.Value) && (text.Equals(Wings2ItemName.Value) || name.Equals(Wings2ItemName.Value) || name.Contains(Wings2ItemName.Value)))
			{
				return (true, 2);
			}
			if (Wings3Enabled.Value && !string.IsNullOrEmpty(Wings3ItemName.Value) && (text.Equals(Wings3ItemName.Value) || name.Equals(Wings3ItemName.Value) || name.Contains(Wings3ItemName.Value)))
			{
				return (true, 3);
			}
			if (Wings4Enabled.Value && !string.IsNullOrEmpty(Wings4ItemName.Value) && (text.Equals(Wings4ItemName.Value) || name.Equals(Wings4ItemName.Value) || name.Contains(Wings4ItemName.Value)))
			{
				return (true, 4);
			}
			if (Wings5Enabled.Value && !string.IsNullOrEmpty(Wings5ItemName.Value) && (text.Equals(Wings5ItemName.Value) || name.Equals(Wings5ItemName.Value) || name.Contains(Wings5ItemName.Value)))
			{
				return (true, 5);
			}
			return (false, -1);
		}

		public static string GetWingsVisualPrefab(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			string result = wingsIndex switch
			{
				1 => Wings1VisualPrefab.Value, 
				2 => Wings2VisualPrefab.Value, 
				3 => Wings3VisualPrefab.Value, 
				4 => Wings4VisualPrefab.Value, 
				5 => Wings5VisualPrefab.Value, 
				_ => "", 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static bool GetWingsCheckRightHand(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			bool result = wingsIndex switch
			{
				1 => Wings1CheckRightHand.Value, 
				2 => Wings2CheckRightHand.Value, 
				3 => Wings3CheckRightHand.Value, 
				4 => Wings4CheckRightHand.Value, 
				5 => Wings5CheckRightHand.Value, 
				_ => true, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static bool GetWingsCheckLeftHand(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			bool result = wingsIndex switch
			{
				1 => Wings1CheckLeftHand.Value, 
				2 => Wings2CheckLeftHand.Value, 
				3 => Wings3CheckLeftHand.Value, 
				4 => Wings4CheckLeftHand.Value, 
				5 => Wings5CheckLeftHand.Value, 
				_ => false, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static bool GetWingsCheckUtility(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			bool result = wingsIndex switch
			{
				1 => Wings1CheckUtility.Value, 
				2 => Wings2CheckUtility.Value, 
				3 => Wings3CheckUtility.Value, 
				4 => Wings4CheckUtility.Value, 
				5 => Wings5CheckUtility.Value, 
				_ => false, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static bool GetWingsUseFallReset(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			bool result = wingsIndex switch
			{
				1 => Wings1UseFallReset.Value, 
				2 => Wings2UseFallReset.Value, 
				3 => Wings3UseFallReset.Value, 
				4 => Wings4UseFallReset.Value, 
				5 => Wings5UseFallReset.Value, 
				_ => true, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static bool GetWingsAnimation(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			bool result = wingsIndex switch
			{
				1 => Wings1Animation.Value, 
				2 => Wings2Animation.Value, 
				3 => Wings3Animation.Value, 
				4 => Wings4Animation.Value, 
				5 => Wings5Animation.Value, 
				_ => true, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsMinActivationFallSpeed(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1MinActivationFallSpeed.Value, 
				2 => Wings2MinActivationFallSpeed.Value, 
				3 => Wings3MinActivationFallSpeed.Value, 
				4 => Wings4MinActivationFallSpeed.Value, 
				5 => Wings5MinActivationFallSpeed.Value, 
				_ => -0.5f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static bool GetWingsSFX(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			bool result = wingsIndex switch
			{
				1 => Wings1SFX.Value, 
				2 => Wings2SFX.Value, 
				3 => Wings3SFX.Value, 
				4 => Wings4SFX.Value, 
				5 => Wings5SFX.Value, 
				_ => true, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static string GetWingsStartSFX(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			string result = wingsIndex switch
			{
				1 => Wings1StartSFX.Value, 
				2 => Wings2StartSFX.Value, 
				3 => Wings3StartSFX.Value, 
				4 => Wings4StartSFX.Value, 
				5 => Wings5StartSFX.Value, 
				_ => "", 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static string GetWingsLoopSFX(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			string result = wingsIndex switch
			{
				1 => Wings1LoopSFX.Value, 
				2 => Wings2LoopSFX.Value, 
				3 => Wings3LoopSFX.Value, 
				4 => Wings4LoopSFX.Value, 
				5 => Wings5LoopSFX.Value, 
				_ => "", 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static string GetWingsStopSFX(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			string result = wingsIndex switch
			{
				1 => Wings1StopSFX.Value, 
				2 => Wings2StopSFX.Value, 
				3 => Wings3StopSFX.Value, 
				4 => Wings4StopSFX.Value, 
				5 => Wings5StopSFX.Value, 
				_ => "", 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static bool GetWingsVFX(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			bool result = wingsIndex switch
			{
				1 => Wings1VFX.Value, 
				2 => Wings2VFX.Value, 
				3 => Wings3VFX.Value, 
				4 => Wings4VFX.Value, 
				5 => Wings5VFX.Value, 
				_ => true, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static string GetWingsStartVFX(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			string result = wingsIndex switch
			{
				1 => Wings1StartVFX.Value, 
				2 => Wings2StartVFX.Value, 
				3 => Wings3StartVFX.Value, 
				4 => Wings4StartVFX.Value, 
				5 => Wings5StartVFX.Value, 
				_ => "", 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static string GetWingsLoopVFX(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			string result = wingsIndex switch
			{
				1 => Wings1LoopVFX.Value, 
				2 => Wings2LoopVFX.Value, 
				3 => Wings3LoopVFX.Value, 
				4 => Wings4LoopVFX.Value, 
				5 => Wings5LoopVFX.Value, 
				_ => "", 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static string GetWingsStopVFX(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			string result = wingsIndex switch
			{
				1 => Wings1StopVFX.Value, 
				2 => Wings2StopVFX.Value, 
				3 => Wings3StopVFX.Value, 
				4 => Wings4StopVFX.Value, 
				5 => Wings5StopVFX.Value, 
				_ => "", 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsForwardSpeed(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1ForwardSpeed.Value, 
				2 => Wings2ForwardSpeed.Value, 
				3 => Wings3ForwardSpeed.Value, 
				4 => Wings4ForwardSpeed.Value, 
				5 => Wings5ForwardSpeed.Value, 
				_ => 14f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsForwardForce(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1ForwardForce.Value, 
				2 => Wings2ForwardForce.Value, 
				3 => Wings3ForwardForce.Value, 
				4 => Wings4ForwardForce.Value, 
				5 => Wings5ForwardForce.Value, 
				_ => 10f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsDescentSpeed(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1DescentSpeed.Value, 
				2 => Wings2DescentSpeed.Value, 
				3 => Wings3DescentSpeed.Value, 
				4 => Wings4DescentSpeed.Value, 
				5 => Wings5DescentSpeed.Value, 
				_ => -4f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsAirTurnSpeed(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1AirTurnSpeed.Value, 
				2 => Wings2AirTurnSpeed.Value, 
				3 => Wings3AirTurnSpeed.Value, 
				4 => Wings4AirTurnSpeed.Value, 
				5 => Wings5AirTurnSpeed.Value, 
				_ => 120f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsLateralDamp(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1LateralDamp.Value, 
				2 => Wings2LateralDamp.Value, 
				3 => Wings3LateralDamp.Value, 
				4 => Wings4LateralDamp.Value, 
				5 => Wings5LateralDamp.Value, 
				_ => 0.15f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsGroundProbeDistance(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1GroundProbeDistance.Value, 
				2 => Wings2GroundProbeDistance.Value, 
				3 => Wings3GroundProbeDistance.Value, 
				4 => Wings4GroundProbeDistance.Value, 
				5 => Wings5GroundProbeDistance.Value, 
				_ => 2.5f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsCushionDescentSpeed(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1CushionDescentSpeed.Value, 
				2 => Wings2CushionDescentSpeed.Value, 
				3 => Wings3CushionDescentSpeed.Value, 
				4 => Wings4CushionDescentSpeed.Value, 
				5 => Wings5CushionDescentSpeed.Value, 
				_ => -0.7f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsCushionLerp(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1CushionLerp.Value, 
				2 => Wings2CushionLerp.Value, 
				3 => Wings3CushionLerp.Value, 
				4 => Wings4CushionLerp.Value, 
				5 => Wings5CushionLerp.Value, 
				_ => 0.6f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsTiltMaxPitch(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1TiltMaxPitch.Value, 
				2 => Wings2TiltMaxPitch.Value, 
				3 => Wings3TiltMaxPitch.Value, 
				4 => Wings4TiltMaxPitch.Value, 
				5 => Wings5TiltMaxPitch.Value, 
				_ => 25f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsTiltMaxRoll(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1TiltMaxRoll.Value, 
				2 => Wings2TiltMaxRoll.Value, 
				3 => Wings3TiltMaxRoll.Value, 
				4 => Wings4TiltMaxRoll.Value, 
				5 => Wings5TiltMaxRoll.Value, 
				_ => 35f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsTiltPitchSmoothTime(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1TiltPitchSmoothTime.Value, 
				2 => Wings2TiltPitchSmoothTime.Value, 
				3 => Wings3TiltPitchSmoothTime.Value, 
				4 => Wings4TiltPitchSmoothTime.Value, 
				5 => Wings5TiltPitchSmoothTime.Value, 
				_ => 0.15f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsTiltRollSmoothTime(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1TiltRollSmoothTime.Value, 
				2 => Wings2TiltRollSmoothTime.Value, 
				3 => Wings3TiltRollSmoothTime.Value, 
				4 => Wings4TiltRollSmoothTime.Value, 
				5 => Wings5TiltRollSmoothTime.Value, 
				_ => 0.1f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsUpDownOffset(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1UpDownOffset.Value, 
				2 => Wings2UpDownOffset.Value, 
				3 => Wings3UpDownOffset.Value, 
				4 => Wings4UpDownOffset.Value, 
				5 => Wings5UpDownOffset.Value, 
				_ => 1.2f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsLeftRightOffset(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1LeftRightOffset.Value, 
				2 => Wings2LeftRightOffset.Value, 
				3 => Wings3LeftRightOffset.Value, 
				4 => Wings4LeftRightOffset.Value, 
				5 => Wings5LeftRightOffset.Value, 
				_ => 0f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsForwardBackOffset(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1ForwardBackOffset.Value, 
				2 => Wings2ForwardBackOffset.Value, 
				3 => Wings3ForwardBackOffset.Value, 
				4 => Wings4ForwardBackOffset.Value, 
				5 => Wings5ForwardBackOffset.Value, 
				_ => -0.1f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsRotationX(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1RotationX.Value, 
				2 => Wings2RotationX.Value, 
				3 => Wings3RotationX.Value, 
				4 => Wings4RotationX.Value, 
				5 => Wings5RotationX.Value, 
				_ => 0f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsRotationY(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1RotationY.Value, 
				2 => Wings2RotationY.Value, 
				3 => Wings3RotationY.Value, 
				4 => Wings4RotationY.Value, 
				5 => Wings5RotationY.Value, 
				_ => 180f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsRotationZ(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1RotationZ.Value, 
				2 => Wings2RotationZ.Value, 
				3 => Wings3RotationZ.Value, 
				4 => Wings4RotationZ.Value, 
				5 => Wings5RotationZ.Value, 
				_ => 0f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsScale(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1Scale.Value, 
				2 => Wings2Scale.Value, 
				3 => Wings3Scale.Value, 
				4 => Wings4Scale.Value, 
				5 => Wings5Scale.Value, 
				_ => 1f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static bool GetWingsAttachSFXToPlayer(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			bool result = wingsIndex switch
			{
				1 => Wings1AttachSFXToPlayer.Value, 
				2 => Wings2AttachSFXToPlayer.Value, 
				3 => Wings3AttachSFXToPlayer.Value, 
				4 => Wings4AttachSFXToPlayer.Value, 
				5 => Wings5AttachSFXToPlayer.Value, 
				_ => true, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static bool GetWingsAttachEffectsToPlayer(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			bool result = wingsIndex switch
			{
				1 => Wings1AttachEffectsToPlayer.Value, 
				2 => Wings2AttachEffectsToPlayer.Value, 
				3 => Wings3AttachEffectsToPlayer.Value, 
				4 => Wings4AttachEffectsToPlayer.Value, 
				5 => Wings5AttachEffectsToPlayer.Value, 
				_ => true, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static string GetWingsVFXPosition(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			string result = wingsIndex switch
			{
				1 => Wings1VFXPosition.Value, 
				2 => Wings2VFXPosition.Value, 
				3 => Wings3VFXPosition.Value, 
				4 => Wings4VFXPosition.Value, 
				5 => Wings5VFXPosition.Value, 
				_ => "Root", 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsVFXScale(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1VFXScale.Value, 
				2 => Wings2VFXScale.Value, 
				3 => Wings3VFXScale.Value, 
				4 => Wings4VFXScale.Value, 
				5 => Wings5VFXScale.Value, 
				_ => 1f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsVFXCustomX(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1VFXCustomX.Value, 
				2 => Wings2VFXCustomX.Value, 
				3 => Wings3VFXCustomX.Value, 
				4 => Wings4VFXCustomX.Value, 
				5 => Wings5VFXCustomX.Value, 
				_ => 0f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsVFXCustomY(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1VFXCustomY.Value, 
				2 => Wings2VFXCustomY.Value, 
				3 => Wings3VFXCustomY.Value, 
				4 => Wings4VFXCustomY.Value, 
				5 => Wings5VFXCustomY.Value, 
				_ => 1f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsVFXCustomZ(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => Wings1VFXCustomZ.Value, 
				2 => Wings2VFXCustomZ.Value, 
				3 => Wings3VFXCustomZ.Value, 
				4 => Wings4VFXCustomZ.Value, 
				5 => Wings5VFXCustomZ.Value, 
				_ => 0f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static int GetCurrentWingsIndex()
		{
			return GliderSystem.GetCurrentWingsIndex();
		}
	}
	public static class Item
	{
		public static ItemManager.Item? Glider_BackPack_Ygg { get; private set; }

		public static ItemManager.Item? Glider_Gjall_BackPack_Ygg { get; private set; }

		public static ItemManager.Item? Glider_BackPack_DragonModer_Ygg { get; private set; }

		public static ItemManager.Item? Glider_BackPack_BlackDragon_Ygg { get; private set; }

		public static ItemManager.Item? Wing1 { get; private set; }

		public static ItemManager.Item? Wing2 { get; private set; }

		public static ItemManager.Item? Wing3 { get; private set; }

		public static ItemManager.Item? Wing4 { get; private set; }

		public static void RegisterAll(string bundleName)
		{
			RegisterItems(bundleName);
			RegisterGliders(bundleName);
			RegisterFX(bundleName);
		}

		private static void RegisterItems(string bundleName)
		{
			Glider_BackPack_Ygg = new ItemManager.Item(bundleName, "Glider_BackPack_Ygg");
			Glider_BackPack_Ygg.Name.English("Glider Bag");
			Glider_BackPack_Ygg.Description.English("A Glider Bag made from Crystal Glass, Deerhides and Wood.");
			Glider_BackPack_Ygg.Crafting.Add(CraftingTable.Workbench, 0);
			Glider_BackPack_Ygg.RequiredItems.Add("DeerHide", 5);
			Glider_BackPack_Ygg.RequiredItems.Add("Crystal", 10);
			Glider_BackPack_Ygg.RequiredItems.Add("FineWood", 15);
			Glider_BackPack_Ygg.CraftAmount = 1;
			Glider_Gjall_BackPack_Ygg = new ItemManager.Item(bundleName, "Glider_Gjall_BackPack_Ygg");
			Glider_Gjall_BackPack_Ygg.Name.English("Gjall Balloon Bag");
			Glider_Gjall_BackPack_Ygg.Description.English("A Balloon Glider made from Gjall Trophy, Wisps and Yggdrassil Wood.");
			Glider_Gjall_BackPack_Ygg.Crafting.Add(CraftingTable.BlackForge, 0);
			Glider_Gjall_BackPack_Ygg.RequiredItems.Add("TrophyGjall", 1);
			Glider_Gjall_BackPack_Ygg.RequiredItems.Add("Wisp", 10);
			Glider_Gjall_BackPack_Ygg.RequiredItems.Add("YggdrasilWood", 15);
			Glider_Gjall_BackPack_Ygg.CraftAmount = 1;
			Glider_BackPack_DragonModer_Ygg = new ItemManager.Item(bundleName, "Glider_BackPack_DragonModer_Ygg");
			Glider_BackPack_DragonModer_Ygg.Name.English("Dragon Glider Wings");
			Glider_BackPack_DragonModer_Ygg.Description.English("A Dragon Glider back sack made from Moders wings.");
			Glider_BackPack_BlackDragon_Ygg = new ItemManager.Item(bundleName, "Glider_BackPack_BlackDragon_Ygg");
			Glider_BackPack_BlackDragon_Ygg.Name.English("Black Dragon Glider Wings");
			Glider_BackPack_BlackDragon_Ygg.Description.English("A Dragon Glider back sack made from a special Black Dragon Wings.");
		}

		private static void RegisterGliders(string bundleName)
		{
			Wing1 = new ItemManager.Item(bundleName, "DragonWings_Ygg");
			Wing1.Name.English("Glider Glass");
			Wing1.Description.English("Wing 1");
			Wing2 = new ItemManager.Item(bundleName, "DragonWings_Ygg1");
			Wing2.Name.English("Dragon Glider Wings");
			Wing2.Description.English("Wing 2");
			Wing3 = new ItemManager.Item(bundleName, "DragonWings_Ygg2");
			Wing3.Name.English("Black Dragon Glider Wings");
			Wing3.Description.English("Wing 3");
			Wing4 = new ItemManager.Item(bundleName, "DragonWings_Ygg3");
			Wing4.Name.English("Gjall Balloon Glider");
			Wing4.Description.English("Wing 4");
		}

		private static void RegisterFX(string bundleName)
		{
			GameObject val = PrefabManager.RegisterPrefab("ibelieveicanfly", "sfx_flap_glider_Ygg");
			GameObject val2 = PrefabManager.RegisterPrefab("ibelieveicanfly", "sfx_gliding_glider_Ygg");
		}
	}
}
namespace IBelieveICanFly.Patches
{
	public static class GliderSystem
	{
		private const string WINGS1_CONTROLLER_NAME = "gliding_controller";

		private const string WINGS1_START_TRIGGER = "start_gliding";

		private const string WINGS1_STOP_TRIGGER = "stop_gliding";

		private const float WINGS1_EXIT_DURATION = 0.1f;

		private const string WINGS2_CONTROLLER_NAME = "gliding_controller2";

		private const string WINGS2_START_TRIGGER = "start_gliding";

		private const string WINGS2_STOP_TRIGGER = "stop_gliding";

		private const float WINGS2_EXIT_DURATION = 0.1f;

		private const string WINGS3_CONTROLLER_NAME = "gliding_controller3";

		private const string WINGS3_START_TRIGGER = "start_gliding";

		private const string WINGS3_STOP_TRIGGER = "stop_gliding";

		private const float WINGS3_EXIT_DURATION = 0.1f;

		private const string WINGS4_CONTROLLER_NAME = "gliding_controller";

		private const string WINGS4_START_TRIGGER = "start_gliding";

		private const string WINGS4_STOP_TRIGGER = "stop_gliding";

		private const float WINGS4_EXIT_DURATION = 0.1f;

		private const string WINGS5_CONTROLLER_NAME = "gliding_controller";

		private const string WINGS5_START_TRIGGER = "start_gliding";

		private const string WINGS5_STOP_TRIGGER = "stop_gliding";

		private const float WINGS5_EXIT_DURATION = 0.1f;

		private static float lastItemCheckTime = 0f;

		private static float itemCheckInterval = 0.5f;

		private static bool cachedItemEquippedResult = false;

		private static bool isCurrentlyGliding = false;

		private static RuntimeAnimatorController? originalController;

		private static Dictionary<int, RuntimeAnimatorController?> gliderControllers = new Dictionary<int, RuntimeAnimatorController>();

		private static bool isExitingGlide = false;

		private static float exitAnimationStartTime = 0f;

		private static ItemData? equippedGliderItem = null;

		private static int currentWingsIndex = -1;

		private static FieldInfo? _fiMaxAirAltitude;

		private static bool toggleModeActive = false;

		private static bool lastSpaceKeyState = false;

		private static GameObject? activeLoopVFX = null;

		private static GameObject? activeLoopSFX = null;

		private const string ZDO_GLIDING_KEY = "IBelieveICanFly_Gliding";

		private const string ZDO_WINGS_INDEX_KEY = "IBelieveICanFly_WingsIndex";

		private static readonly Dictionary<ZDOID, GameObject> remotePlayerGliders = new Dictionary<ZDOID, GameObject>();

		private static readonly Dictionary<ZDOID, RuntimeAnimatorController> remotePlayerOriginalControllers = new Dictionary<ZDOID, RuntimeAnimatorController>();

		public static LayerMask groundMask = LayerMask.op_Implicit(-1);

		private static Vector3 _smoothedForward = Vector3.forward;

		private static Vector3 _smoothedVelocity = Vector3.zero;

		private static float _currentPitch = 0f;

		private static float _currentRoll = 0f;

		private static float _pitchVelocity = 0f;

		private static float _rollVelocity = 0f;

		private static Vector3 _lastPosition = Vector3.zero;

		private static float _lastUpdateTime = 0f;

		public static bool IsCurrentlyGliding()
		{
			return isCurrentlyGliding;
		}

		public static RuntimeAnimatorController? GetGliderController(int wingsIndex)
		{
			RuntimeAnimatorController value;
			return gliderControllers.TryGetValue(wingsIndex, out value) ? value : null;
		}

		public static RuntimeAnimatorController? GetOriginalController()
		{
			return originalController;
		}

		public static int GetCurrentWingsIndex()
		{
			return currentWingsIndex;
		}

		public static string GetWingsControllerName(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			string result = wingsIndex switch
			{
				1 => "gliding_controller", 
				2 => "gliding_controller2", 
				3 => "gliding_controller3", 
				4 => "gliding_controller", 
				5 => "gliding_controller", 
				_ => "gliding_controller", 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static string GetWingsStartTrigger(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			string result = wingsIndex switch
			{
				1 => "start_gliding", 
				2 => "start_gliding", 
				3 => "start_gliding", 
				4 => "start_gliding", 
				5 => "start_gliding", 
				_ => "start_gliding", 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static string GetWingsStopTrigger(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			string result = wingsIndex switch
			{
				1 => "stop_gliding", 
				2 => "stop_gliding", 
				3 => "stop_gliding", 
				4 => "stop_gliding", 
				5 => "stop_gliding", 
				_ => "stop_gliding", 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static float GetWingsExitDuration(int wingsIndex)
		{
			if (1 == 0)
			{
			}
			float result = wingsIndex switch
			{
				1 => 0.1f, 
				2 => 0.1f, 
				3 => 0.1f, 
				4 => 0.1f, 
				5 => 0.1f, 
				_ => 0.1f, 
			};
			if (1 == 0)
			{
			}
			return result;
		}

		public static void Initialize()
		{
			lastItemCheckTime = 0f;
			cachedItemEquippedResult = false;
			AssetBundle assetBundle = IBelieveICanFlyPlugin.GetAssetBundle("ibelieveicanfly");
			if ((Object)(object)assetBundle != (Object)null)
			{
				for (int i = 1; i <= 5; i++)
				{
					string wingsControllerName = GetWingsControllerName(i);
					RuntimeAnimatorController val = assetBundle.LoadAsset<RuntimeAnimatorController>(wingsControllerName);
					if ((Object)(object)val != (Object)null)
					{
						gliderControllers[i] = val;
					}
				}
				if (gliderControllers.Count == 0)
				{
					RuntimeAnimatorController val2 = assetBundle.LoadAsset<RuntimeAnimatorController>("gliding_controller");
					if ((Object)(object)val2 != (Object)null)
					{
						for (int j = 1; j <= 5; j++)
						{
							gliderControllers[j] = val2;
						}
					}
				}
			}
			try
			{
				_fiMaxAirAltitude = typeof(Character).GetField("m_maxAirAltitude", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
			}
			catch (Exception)
			{
				_fiMaxAirAltitude = null;
			}
		}

		private static bool CanGlide(Player player)
		{
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			var (flag, num) = GetEquippedWingsConfig(player);
			if (!flag)
			{
				return false;
			}
			currentWingsIndex = num;
			bool flag2 = ((Character)player).IsOnGround();
			bool flag3 = ((Character)player).InWater();
			bool flag4 = ((Character)player).IsAttached();
			if (flag2 || flag3 || flag4)
			{
				return false;
			}
			bool key = Input.GetKey((KeyCode)32);
			bool keyDown = Input.GetKeyDown((KeyCode)32);
			if (Config.ToggleMode.Value)
			{
				if (keyDown)
				{
					toggleModeActive = !toggleModeActive;
				}
				if (!toggleModeActive)
				{
					return false;
				}
			}
			else if (!key)
			{
				toggleModeActive = false;
				return false;
			}
			Rigidbody component = ((Component)player).GetComponent<Rigidbody>();
			if ((Object)(object)component == (Object)null)
			{
				return false;
			}
			float y = component.linearVelocity.y;
			float wingsMinActivationFallSpeed = Config.GetWingsMinActivationFallSpeed(currentWingsIndex);
			if (y > wingsMinActivationFallSpeed)
			{
				return false;
			}
			return true;
		}

		public static bool IsGliderItem(ItemData item)
		{
			if ((Object)(object)item?.m_dropPrefab == (Object)null)
			{
				return false;
			}
			return Config.GetWingsConfigForItem(item).enabled;
		}

		public static (bool enabled, int wingsIndex) GetEquippedWingsConfig(Player player)
		{
			if (Time.time < lastItemCheckTime + itemCheckInterval && equippedGliderItem != null)
			{
				if (cachedItemEquippedResult)
				{
					return Config.GetWingsConfigForItem(equippedGliderItem);
				}
				return (false, -1);
			}
			lastItemCheckTime = Time.time;
			ItemData rightItem = ((Humanoid)player).GetRightItem();
			if (rightItem != null)
			{
				(bool, int) wingsConfigForItem = Config.GetWingsConfigForItem(rightItem);
				if (wingsConfigForItem.Item1 && Config.GetWingsCheckRightHand(wingsConfigForItem.Item2))
				{
					equippedGliderItem = rightItem;
					cachedItemEquippedResult = true;
					return wingsConfigForItem;
				}
			}
			ItemData leftItem = ((Humanoid)player).GetLeftItem();
			if (leftItem != null)
			{
				(bool, int) wingsConfigForItem2 = Config.GetWingsConfigForItem(leftItem);
				if (wingsConfigForItem2.Item1 && Config.GetWingsCheckLeftHand(wingsConfigForItem2.Item2))
				{
					equippedGliderItem = leftItem;
					cachedItemEquippedResult = true;
					return wingsConfigForItem2;
				}
			}
			if (((Humanoid)player).m_utilityItem != null)
			{
				(bool, int) wingsConfigForItem3 = Config.GetWingsConfigForItem(((Humanoid)player).m_utilityItem);
				if (wingsConfigForItem3.Item1 && Config.GetWingsCheckUtility(wingsConfigForItem3.Item2))
				{
					equippedGliderItem = ((Humanoid)player).m_utilityItem;
					cachedItemEquippedResult = true;
					return wingsConfigForItem3;
				}
			}
			cachedItemEquippedResult = false;
			return (false, -1);
		}

		private static void StartGliding(Player player)
		{
			ResetFlightState(player);
			if ((Object)(object)originalController == (Object)null && (Object)(object)((Character)player).m_animator != (Object)null)
			{
				originalController = ((Character)player).m_animator.runtimeAnimatorController;
			}
			RuntimeAnimatorController gliderController = GetGliderController(currentWingsIndex);
			if (Config.GetWingsAnimation(currentWingsIndex) && (Object)(object)((Character)player).m_animator != (Object)null && (Object)(object)gliderController != (Object)null)
			{
				((Character)player).m_animator.runtimeAnimatorController = gliderController;
				((Character)player).m_animator.SetBool("wakeup", false);
				((Character)player).m_animator.SetTrigger(GetWingsStartTrigger(currentWingsIndex));
				((Character)player).m_animator.Update(0f);
			}
			if (currentWingsIndex > 0 && Config.GetWingsSFX(currentWingsIndex))
			{
				string wingsStartSFX = Config.GetWingsStartSFX(currentWingsIndex);
				if (!string.IsNullOrEmpty(wingsStartSFX))
				{
					PlaySoundEffect(player, wingsStartSFX);
				}
				string wingsLoopSFX = Config.GetWingsLoopSFX(currentWingsIndex);
				if (!string.IsNullOrEmpty(wingsLoopSFX))
				{
					PlaySoundEffect(player, wingsLoopSFX, isLoopSFX: true);
				}
			}
			if (currentWingsIndex > 0 && Config.GetWingsVFX(currentWingsIndex))
			{
				string wingsStartVFX = Config.GetWingsStartVFX(currentWingsIndex);
				if (!string.IsNullOrEmpty(wingsStartVFX))
				{
					SpawnVFX(player, win