Hi, Jayden Chapman
Welcome to Microsoft Community.
I understand that your computer unexpectedly shuts down and restarts when running Minecraft Java, and I understand the inconvenience of this issue.
With your description, you have ruled out a hardware problem, so the problem may be related to drivers, game settings, and system settings.
Here are some methods you can try to see if any of them solves your problem.
Update the graphics card driver:
In Windows, right-click the Start button and select Device Manager.
In the “Display Adapters” section, right-click on the name of your graphics card and select Update Driver.
Select “Automatically search for newer drivers” to allow the system to find and install the latest graphics card drivers.
Check the version and configuration of Minecraft:
Open the Minecraft launcher.
In the launcher, click “Settings” in the upper right corner.
Make sure the Minecraft version is up to date. If needed, you can choose to download and install the latest version.
If you are using mods, try disabling or removing all mods and just running a clean game to see if there is any improvement.
Increase Java heap memory:
Open the Minecraft launcher.
Click on Startup Options.
Select the version of the game you are using.
Under Startup Options, find Java Parameters.
In the Java Parameters box, add the following:
This will maximize Java heap memory to 4GB, which you can adjust higher or lower depending on your system memory.
Change the graphics settings for Minecraft:
Once in the game, press Esc, select “Options”, and then select “Video Settings”.
Set all advanced graphics settings (e.g. “View Distance”, “Shadows”, “Particles”, etc.) to a lower value or select “Fast “ (higher performance mode).
Change the power settings:
Right-click the Battery icon on the desktop and select Power Options.
Select the “High Performance” power plan, which avoids CPU and GPU limitations.
Ensure that in “Advanced Power Settings” the CPU does not automatically downclock during gameplay.
Kyra – MSFT | Microsoft Community Support Specialist