Terraria.ModLoader.MountLoader.GetMount C# (CSharp) Method

GetMount() public static method

public static GetMount ( int type ) : ModMountData
type int
return ModMountData
		public static ModMountData GetMount(int type)
		{
			if (mountDatas.ContainsKey(type))
			{
				return mountDatas[type];
			}
			return null;
		}

Usage Example

Ejemplo n.º 1
0
 /// <summary>
 /// Gets the ModMountData instance corresponding to the given type. Returns null if no ModMountData has the given type.
 /// </summary>
 /// <param name="type">The type of the mount.</param>
 /// <returns>Null if not found, otherwise the ModMountData associated with the mount.</returns>
 public static ModMountData GetModMountData(int type) => MountLoader.GetMount(type);