private static void Main_EnsureRenderTargetContent(Main.orig_EnsureRenderTargetContent orig, Terraria.Main self) { if ( Terraria.Main.waterTarget == null || Terraria.Main.waterTarget.IsContentLost || self.backWaterTarget == null || self.backWaterTarget.IsContentLost || self.blackTarget == null || self.blackTarget.IsContentLost || self.tileTarget == null || self.tileTarget.IsContentLost || self.tile2Target == null || self.tile2Target.IsContentLost || self.wallTarget == null || self.wallTarget.IsContentLost || self.backgroundTarget == null || self.backgroundTarget.IsContentLost || Terraria.Main.screenTarget == null || Terraria.Main.screenTarget.IsContentLost || Terraria.Main.screenTargetSwap == null || Terraria.Main.screenTargetSwap.IsContentLost || playerTargets.Any(target => target == null || target.IsContentLost)) { self.InvokeMethod <object>("InitTargets"); } }