I thought it might be helpful to make a blog and video for people struggling to beat the Moon Lord. For this battle I wore:
- Beetle Armor (with Beetle Shell chest)
- Warding Solar Wings
- Warding Flesh Knuckles
- Warding Lightning Boots
- Warding Paladin's Shield
- Warding Ankh Shield
- Lifeforce Potion
- Rage Potion (Crimson world/artificial biome)
- Wrath Potion (Corruption world/artificial biome)
- Endurance Potion
- Regeneration Potion
- Ironskin Potion
- Pumpkin Pie (or any Well-Fed buff)
With these items plus the Ironskin Potion and Pumpkin Pie, I have 120 defense. You don't have to have these exact accessories, but I recommend having as much defense as you can, perhaps at least 110 range. You may play different classes and have different accessories, but as long as your defense is still high, you can take a lot of hits between heals.
As you can see from the video, I tried to stay in one place unless I needed to dodge the beam, so that I can be close to my lantern and campfire. Near the end I do more flying and dodging. My HP can get a little low at times, but generally it's not a problem with Super Healing Potions.