Disconnected from singleplayer world

I was just playing Minecraft 1.12.2 with mods in my singleplayer world but then my game suddenly froze and then I got disconnected which doesn’t make any sense because it is my own singpleayer world and it’s not a serverand when I looked at the console there were a lot of fatal errors that occurefd. I’d appreciate any advice thanks.

my game didn’t crash btw

its just my world

that got shut down

it’s not the first time this happened

Close unnecessary programs in the background

But probably it’s the fault of some mod

what mods are the culprits?

Uranus from galacticraft makes big lag and shutting down your world.

is it because i didnt allocate enough ram?

it doesnt happen in my server

idk, maybe yes, you can allocate 4096MB ram to minecraft