This might be dumb and everyone might already know this but i didnt at one point so i thought i should share.
1) collect all your ore onto your person (get encumbered so you dont have to do multiple trips)
2) log out of that world.
3) log into an nice fresh clean world and dump all your ore on the floor.
4) log back into your orginal world and go through whatever portal you need (hopefully to your home base)
5)log out again and head back into your fresh world to collect your ore
6) Pretty obvious at this point, but once you have your ore collected log back into your main world, safely beyond the portal and viola! no mod neccesary! just a bunch of extra steps lol.