This repository had an exceptionally short lifetime of relevance, since Code Connection, sadly, was just officially discontinued:
https://forum.makecode.com/t/bedrock-edition-no-longer-working-with-makecode-super-disappointing/22597/20?u=vegz78
A script and some tips for MakeCode coding in Minecraft Bedrock for Windows 10 and 11 with Code Connection and CodeConnectionFix
With the introduction of the bug MCPE-154405(please upvote here for a fix) with Minecraft Bedrock version 1.18.30 for Windows as far back in time as April the 19th 2022, the latest Code Connection App version 1.50 could unfortunately no longer connect successfully.
To the rescue came Laurent Rocher with his great CodeConnecFix.
Here, I present a batch script and some tips for starting everything up in the correct order quickly and some common troubleshooting:
- Minecraft Bedrock Edition installed on Windows 10 or 11
- Code Connection UWP App installed
- Check and exempt Minecraft from loopback net isolation, especially on Windows 11
- Create and download the following files to the folder C:\Program Files\CodeConnectFix:
- Make a Windows shortcut(.lnk) to C:\Program Files\CodeConnectFix\Minecraft_Coding.bat, add C:\Program Files\CodeConnectFix\images.ico as icon for the shortcut
- To be able to pin this shortcut to the Start Menu and Taskbar, add "cmd /c " to the beginning of the Target Path in the properties
- Execute the above shortcut or C:\Program Files\CodeConnectFix\Minecraft_Coding.bat directly
- Inside a Minecraft world with cheats enabled, press T to open chat, and with the chat box highlighted press CTRL+V to connect
- The first time you connect, you might have to authorize the connection for private networks in the Windows firewall pop-up menu
- The connection string sometimes is not available in the clipboard to paste with CTRL+V when Minecraft starts:
- Run the Minecraft_Coding.bat script and try CTRL+V again in the Minecraft chat
- CodeConnectFix.exe crashes and closes:
- Run the Minecraft_Coding.bat script and try CTRL+V again in the Minecraft chat
- CodeConnectFix.exe hangs and does not connect:
- Close the CodeConnectFix window and run the Minecraft_Coding.bat script again
- Code Connection hangs and does not connect(seldom):
- Close both Code Connection and the CodeConnectFix window and run the Minecraft_Coding.bat script again
- Sometimes, often on Windows 11, none of the above works and Minecraft does not connect with Makecode through Code Connection:
- This might be due to UWP local loopback restrictions on the Minecraft app
- Open PowerShell as administrator and run the following command:
CheckNetIsolation LoopbackExempt -a -n="Microsoft.MinecraftUWP_8wekyb3d8bbwe"
- This solution was found here:
https://www.mysysadmintips.com/windows/clients/912-windows-10-uwp-apps-can-t-connect-to-local-ip-loopback-restriction