diff --git a/Cooldowns/CooldownRegistry.cs b/Cooldowns/CooldownRegistry.cs index 42ad47e6b4..76328fbcad 100644 --- a/Cooldowns/CooldownRegistry.cs +++ b/Cooldowns/CooldownRegistry.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Reflection; using Terraria.ModLoader; +using Terraria.ModLoader.Core; namespace CalamityMod.Cooldowns { @@ -64,7 +65,7 @@ namespace CalamityMod.Cooldowns public static void RegisterModCooldowns(Mod mod) { Type baseHandlerType = typeof(CooldownHandler); - foreach (Type type in mod.Code.GetTypes()) + foreach (Type type in AssemblyManager.GetLoadableTypes(mod.Code)) { if (type.IsSubclassOf(baseHandlerType) && !type.IsAbstract && type != baseHandlerType) { diff --git a/Particles/GeneralParticleHandler.cs b/Particles/GeneralParticleHandler.cs index 034916b93c..1c113bd1bc 100644 --- a/Particles/GeneralParticleHandler.cs +++ b/Particles/GeneralParticleHandler.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Runtime.Serialization; using Terraria; using Terraria.ModLoader; +using Terraria.ModLoader.Core; namespace CalamityMod.Particles { @@ -27,7 +28,7 @@ namespace CalamityMod.Particles public static void LoadModParticleInstances(Mod mod) { Type baseParticleType = typeof(Particle); - foreach (Type type in mod.Code.GetTypes()) + foreach (Type type in AssemblyManager.GetLoadableTypes(mod.Code)) { if (type.IsSubclassOf(baseParticleType) && !type.IsAbstract && type != baseParticleType) {