Skip to content

Instantly share code, notes, and snippets.

@reedacartwright
Last active July 16, 2024 22:17
Show Gist options
  • Save reedacartwright/a3c782efc2450979e372397c8209b936 to your computer and use it in GitHub Desktop.
Save reedacartwright/a3c782efc2450979e372397c8209b936 to your computer and use it in GitHub Desktop.
Instructions for Building on Nether Roof in Minecraft Bedrock Edition

How to Build on the Nether Roof in Minecraft: Bedrock Edition

Bedrock Edition has a hardcoded nether height of 128 blocks. This means that even if you are able to glitch up on to the nether roof you cannot place blocks there. However, if you have access to bedrock_server.exe or Minecraft.Windows.exe you can hexedit these files to the increase the hardcoded nether height.

Video Tutorial

YouTube: How to Build on the Nether Roof in Bedrock Edition: 1000 Subscriber Special

Patching the game via R

I've written a patching script that runs via R.

Install Dependencies

patch_nether_height depends on two R packages, readr and digest. They need to be installed and up to date for the script to work.

# Install Dependencies
if (!require(readr)) {
    install.packages("readr")
}
if (!require(digest)) {
    install.packages("digest")
}

Run the Script

# Source the script from the web.
source('https://git.io/JtfOu')
# Patch the nether height (and create backup file)
patch_nether_height('PATH/TO/bedrock_server.exe')

The script currently targets Windows and Linux Bedrock Dedicated Servers and Windows, Android, and Linux Clients. It also currently supports only a handful of versions. If the binary you are trying to patch is not recognized, it will throw an error.

Windows 10 Client Support

Bedrock Edition for Windows 10 is installed to a special folder which does not allow editing. In order to Win10 Clients, the game needs to be copied outside of this folder. This can be done two ways: (1) via a version-switcher or (2) via Powershell.

Overview

Copying via Powershell involves several steps. Be sure to watch the video tutorial.

  1. Backing up / Exporting all your local worlds so you don't lose them (Just in case something goes wrong.)
  2. Enabling Development mode (to allow windows to run your patched game)
  3. Starting a Powershell with Adminstrator permissions. The admin account you use for powershell needs to be the account you play Minecraft with.
  4. Backing up local user data (so it's not deleted when Minecraft uninstalls).
  5. Copying Minecraft from WindowsApps to your Documents folder.
  6. Unregister/uninstall Minecraft from WindowsApps
  7. Registering the copy of Minecraft in your Documents folder.

Backups

Backups are very important. One wrong command can cause you to lose all of your worlds. Before you patch your game, make sure to export all of your imporant worlds so you have a backup. If everything goes well, you will not need these backups.

Powershell Commands

Open a Powershell with Administrator permissions. This will allow you to copy the Minecraft files to your documents folder. The following command differ slightly from what is in the tutorial video to avoid explaining copying and pasting.

# Test if Minecraft is installed. This should return information about
# Minecraft if it is installed (see video for example). If it is not
# installed, install it before continuing.
Get-AppXPackage "Microsoft.Minecraft*"

# Save Local Data
move "$env:LOCALAPPDATA\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState" "$env:LOCALAPPDATA\TmpMinecraft" 

# Copy Minecraft
Get-AppXPackage "Microsoft.Minecraft*" | ForEach { xcopy /ehi "$($_.InstallLocation)" "$HOME\Documents\Minecraft_Copy" }

# Delete Signature File
cd "$HOME\Documents\Minecraft_Copy"
del AppxSignature.p7x

# Remove Original Minecraft
Get-AppXPackage "Microsoft.Minecraft*"  | ForEach { Remove-AppxPackage -Package "$($_.PackageFullName)" }

# Add Minecraft Copy and Check Installation
Add-AppxPackage -Register ".\AppXManifest.xml"
Get-AppXPackage "Microsoft.Minecraft*"

# Restore Local Data
move "$env:LOCALAPPDATA\TmpMinecraft\*" "$env:LOCALAPPDATA\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState"
del "$env:LOCALAPPDATA\TmpMinecraft"

# Test to see if you can run Minecraft
explorer.exe shell:appsFolder\Microsoft.MinecraftUWP_8wekyb3d8bbwe!App

Once the Minecraft is installed, you can run it from the Start Menu like normal.

Patching Windows 10 Clients

The Win10 executable is Minecraft.Windows.exe and it can be patched using patch_nether_height as described above.

Android Client Support

Patching Android can be done but is a trickier than Windows because you can't download a patching app from the Play Store. There are several tools on the internet for modifying and patching APKs and sideloading the results. I've never used them, so I can't recommend any particular toolset or methods.

Patching Android Client (with RStudio)

Download a copy of your Mincraft APK from your Android device to a desktop and extract it. The Android executable is libminecraftpe.so and it can be patched on a desktop using patch_nether_height as described above. After that you can rebuild the APK and sideload it back to your device for play.

Patching Android Client (Manually)

If you don't have access to a desktop, but do have access to an app that allows you to modify libminecraftpe.so directly on your Android device, the following may work for you.

  • 32-bit ARM MCPE: search for the bytes 4F F4 00 03 7E F3 78 EA and replace it with the bytes 4F F0 80 73 7E F3 78 EA.
  • 64-bit ARM MCPE: search for the bytes 03 10 A0 52 and replace it with the bytes 03 20 A0 52.

This was confirmed for MCPE 1.16.201.01 on my discord by ThunderGod#7022.

FAQ

Does this violate the EULA?

No. Mojang specifically allows for people to modify Minecraft in its EULA. As long as you are patching it locally and are not sharing modified copies of the game, Mojang is okay with that.

Can you send me a patched version?

No. See above. That would be breaking Minecraft's EULA.

Does this work with realms?

No. Players do not have access to realms software and cannot patch it.

Does this work with Dedicated Servers?

Yes. To build on the nether roof with a dedicated server, both the client and the server need to be patched.

Does this work on IoS/Xbox etc?

Not at this time. However, the video tutorial contains enough information that someone might be able to figure out how to properly patch one of those systems.

@reedacartwright
Copy link
Author

@joerivda The script is out of date and doesn't recognize your version of Minecraft. Follow my tutorial for manually changing your game. A few players on my discord maintain an up-to-date list of locations in the binary that need to be changed.

@Divinely-Otter
Copy link

Divinely-Otter commented Jul 3, 2023

@joerivda The script is out of date and doesn't recognize your version of Minecraft. Follow my tutorial for manually changing your game. A few players on my discord maintain an up-to-date list of locations in the binary that need to be changed.

What tutorial where? and What's your Discord? I have the same error, please help

@Yu-Hayate
Copy link

is this possible on a cross-version server?

@EditDungeon
Copy link

Is there a way to do this on a dedicated server without the clients having the patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment