Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

[14Jul2023 - 22:46:41]

// ILCursor: Terraria.ModLoader.RecipeLoader::AddRecipes

// Arguments:
none

// Locals:
[0] System.Reflection.MethodInfo V_0
[1] Terraria.ModLoader.Mod[] V_1
[2] System.Int32 V_2
[3] Terraria.ModLoader.Mod V_3

// Body:
IL_00000: ldtoken Terraria.ModLoader.Mod
IL_00005: call System.Type
System.Type::GetTypeFromHandle(System.RuntimeTypeHandle)
IL_0000A: ldstr AddRecipes
IL_0000F: ldc.i4.s 20
IL_00011: call System.Reflection.MethodInfo
System.Type::GetMethod(System.String,System.Reflection.BindingFlags)
IL_00016: stloc.0
IL_00017: call Terraria.ModLoader.Mod[]
Terraria.ModLoader.ModLoader::get_Mods()
IL_0001C: stloc.1
IL_0001D: ldc.i4.0
IL_0001E: stloc.2
IL_0001F: br IL_000B9
IL_00024: ldloc.1
IL_00025: ldloc.2
IL_00026: ldelem.ref
IL_00027: stloc.3
IL_00028: ldloc.3
IL_00029: call System.Void
Terraria.ModLoader.RecipeLoader::set_CurrentMod(Terraria.ModLoader.Mod)
IL_0002E: ldloc.0
IL_0002F: ldloc.3
IL_00030: call T[] System.Array::Empty<System.Object>()
IL_00035: callvirt System.Object
System.Reflection.MethodBase::Invoke(System.Object,System.Object[])
IL_0003A: pop
IL_0003B: ldloc.3
IL_0003C: call System.Void
Terraria.ModLoader.SystemLoader::AddRecipes(Terraria.ModLoader.Mod)
IL_00041: ldloc.3
IL_00042: callvirt System.Collections.Generic.IEnumerable`1<T>
Terraria.ModLoader.Mod::GetContent<Terraria.ModLoader.ModItem>()
IL_00047: ldsfld System.Action`1<Terraria.ModLoader.ModItem>
Terraria.ModLoader.RecipeLoader/<>c::<>9__8_0
IL_0004C: dup
IL_0004D: brtrue.s IL_00066
IL_0004F: pop
IL_00050: ldsfld Terraria.ModLoader.RecipeLoader/<>c
Terraria.ModLoader.RecipeLoader/<>c::<>9
IL_00055: ldftn System.Void
Terraria.ModLoader.RecipeLoader/<>c::<AddRecipes>b__8_0(Terraria.ModLoader.ModItem)
IL_0005B: newobj System.Void
System.Action`1<Terraria.ModLoader.ModItem>::.ctor(System.Object,System.IntPtr)
IL_00060: dup
IL_00061: stsfld System.Action`1<Terraria.ModLoader.ModItem>
Terraria.ModLoader.RecipeLoader/<>c::<>9__8_0
IL_00066: call System.Void
Terraria.ModLoader.Core.LoaderUtils::ForEachAndAggregateExceptions<Terraria.ModLoad
er.ModItem>(System.Collections.Generic.IEnumerable`1<T>,System.Action`1<T>)
IL_0006B: ldloc.3
IL_0006C: callvirt System.Collections.Generic.IEnumerable`1<T>
Terraria.ModLoader.Mod::GetContent<Terraria.ModLoader.GlobalItem>()
IL_00071: ldsfld System.Action`1<Terraria.ModLoader.GlobalItem>
Terraria.ModLoader.RecipeLoader/<>c::<>9__8_1
IL_00076: dup
IL_00077: brtrue.s IL_00090
IL_00079: pop
IL_0007A: ldsfld Terraria.ModLoader.RecipeLoader/<>c
Terraria.ModLoader.RecipeLoader/<>c::<>9
IL_0007F: ldftn System.Void
Terraria.ModLoader.RecipeLoader/<>c::<AddRecipes>b__8_1(Terraria.ModLoader.GlobalIt
em)
IL_00085: newobj System.Void
System.Action`1<Terraria.ModLoader.GlobalItem>::.ctor(System.Object,System.IntPtr)
IL_0008A: dup
IL_0008B: stsfld System.Action`1<Terraria.ModLoader.GlobalItem>
Terraria.ModLoader.RecipeLoader/<>c::<>9__8_1
IL_00090: call System.Void
Terraria.ModLoader.Core.LoaderUtils::ForEachAndAggregateExceptions<Terraria.ModLoad
er.GlobalItem>(System.Collections.Generic.IEnumerable`1<T>,System.Action`1<T>)
IL_00095: leave.s IL_000B5
IL_00097: callvirt System.Collections.IDictionary System.Exception::get_Data()
IL_0009C: ldstr mod
IL_000A1: ldloc.3
IL_000A2: callvirt System.String Terraria.ModLoader.Mod::get_Name()
IL_000A7: callvirt System.Void
System.Collections.IDictionary::set_Item(System.Object,System.Object)
IL_000AC: rethrow
IL_000AE: ldnull
IL_000AF: call System.Void
Terraria.ModLoader.RecipeLoader::set_CurrentMod(Terraria.ModLoader.Mod)
IL_000B4: endfinally
IL_000B5: ldloc.2
IL_000B6: ldc.i4.1
IL_000B7: add
IL_000B8: stloc.2
IL_000B9: ldloc.2
IL_000BA: ldloc.1
IL_000BB: ldlen
IL_000BC: conv.i4
IL_000BD: blt IL_00024
IL_000C2: ret

You might also like