Skip to content

Commit 4b8088a

Browse files
authored
Merge pull request #9 from dktapps/patch-1
Increase bus factor
2 parents eb364f9 + 57e2001 commit 4b8088a

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# ModLoader
2+
3+
This is a tool to load mods onto the Linux version of [Bedrock Dedicated Server](https://minecraft.net/download/server/bedrock).
4+
5+
## Usage
6+
- Get `libserver_modloader.so`, either from [releases](https://github.com/minecraft-linux/server-modloader/releases) or [building your own](#compiling-from-source)
7+
- Put your compiled mods in a folder called `mods/` next to your moddable BDS binary
8+
- `LD_PRELOAD=path/to/libserver_modloader.so ./bedrock_server_symbols_moddable.debug`
9+
10+
## Compiling from source
11+
1. `git clone https://github.com/minecraft-linux/server-modloader.git --recursive`
12+
2. `cd server-modloader`
13+
3. `mkdir build && cd build`
14+
4. `cmake ..`
15+
5. `make`
16+
17+
You now have a `libserver_modloader.so` binary.
18+
19+
## Examples, usage info
20+
Check out the [wiki](https://github.com/minecraft-linux/server-modloader/wiki) for examples and more information.
21+
22+
## Getting mods to work on newer versions (1.16+)
23+
Newer versions of BDS don't have exported symbols anymore, so a little hacking is necessary to modify the binary and make the symbols linkable.
24+
25+
Using [LIEF](https://github.com/lief-project/lief), you can create a patched, moddable BDS from `bedrock_server_symbols.debug` using the following Python script:
26+
27+
```py
28+
import lief
29+
import sys
30+
31+
lib_symbols = lief.parse("bedrock_server_symbols.debug")
32+
for s in filter(lambda e: e.exported, lib_symbols.static_symbols):
33+
lib_symbols.add_dynamic_symbol(s)
34+
lib_symbols.write("bedrock_server_symbols_patched.debug")
35+
```

0 commit comments

Comments
 (0)