This crate is made to redirect MCBE shaders to ones from resource packs externally so that it can work with any mcbe version and even multiple platforms. for now it only supports Android and also ChromeOS.
Note
This repo is a dependency of draco-injector.
Warning
The redirector is still unstable and might have some bugs or crashes, please report those in this repo.
- 1.20.73
- 1.20.81
- 1.21.0.03
Tip
This can automatically update renderdragon shaders to work using code ported to rust of MaterialBinTool made by ddf8196.
formatVersion V1 to V2 to be specific
-
Go to Releases and download the
.so
file for your arch and rename it tolibmcbe_r.so
-
Open up your minecraft.apk. Place
libmcbe_r.so
in /lib/arch -
Make the library start with mc by any of these methods:
This method automatically creates patched APK with MCBER.
- Download Draco Injector for your platform and follow instructions.
- Or use automated GUI script like DroidDraco or MineDraco.
- Open/Extract classes.dex in minecraft APK
- Search the com.mojang.minecraftpe.MainActivity class
- Inside of it, search the function OnCreate and paste this inside of it:
const-string v0, "mcbe_r" invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V invoke-virtual {p0}, Lcom/mojang/minecraftpe/MainActivity;->dracoSetupStorage()V
- Then just before the function add this:
.method public native dracoSetupStorage()V .end method
Done using MT Manager
- Download patchelf binary
- Extract the libminecraftpe.so library from lib/(arch)
- Run patchelf on it to make libmcbe_r a needed library: (replace path/to/ with the path to the library)
patchelf path/to/libminecraftpe.so --add-needed libmcbe_r.so
- Now if you did everything correctly you should have a patched mcbe that redirects shaders.
- Install rust using rustup if you dont have it
- Download the ndk
- Add android target using "rustup target add"
- Setup rust to use the ndk depending on your platform
- cd to this repo and do "cargo build --release --target your-android-target"
- Search for your .so in target folder
- Now you have it
- Install Termux if you dont have it
- Update packages using "pkg upg"
- Install essential stuff for building using "apt install build-essential"
- Install rust using "pkg install rust"
- git clone this repo
- do "cargo build --release" on where the repo is
- Now you should have your lib in target folder in repo dir