Donate us(afdian)
Official Forum
English | 简体中文
LiteLoader
is an unofficial plugin loader that provides basic API support for Bedrock Dedicated Server
, with a massive API, lots of packed utility interfaces, a rich event system and powerful basic interface support.
Writing plugins in C++, Golang and other languages allows developers to easily extend and customize BDS functionality, making it easy to learn and extremely flexible.
“Why should I choose LiteLoader?”
Easy to use, intuitive interface!
BlockInstance Actor::getBlockFromViewVector(FaceID& face, bool includeLiquid, bool solidOnly, float maxDistance, bool ignoreBorderBlocks, bool fullOnly) const {
auto& bs = getRegion();
auto& pos = getCameraPos();
auto viewVec = getViewVector(1.0f);
auto viewPos = pos + (viewVec * maxDistance);
auto player = isPlayer() ? (Player*)this : nullptr;
int maxDisManhattan = (int)((maxDistance + 1) * 2);
HitResult result = bs.clip(pos, viewPos, includeLiquid, solidOnly, maxDisManhattan, ignoreBorderBlocks, fullOnly, nullptr);
if (result.isHit() || (includeLiquid && result.isHitLiquid())) {
BlockPos bpos;
if (includeLiquid && result.isHitLiquid()) {
bpos = result.getLiquidPos();
face = result.getLiquidFacing();
} else {
bpos = result.getBlockPos();
face = result.getFacing();
}
return Level::getBlockInstance(bpos, bs.getDimensionId());
}
return BlockInstance::Null;
}
- 📕 Full access to all classes and functions
- 💻 Auto-generacted C++ headers
- 💡 Free and simple coding experience
- 🔌 APIs of high quality and large quantity
- 🛡 Fix some vulnerabilities in BDS to ensure the stability and security of your server
- 🏃 Open-source
- Download
LiteLoader.zip
from Releases or Actions, unzip it to BDS directory - Run
SymDB2.exe
to generate symbol files(bedrock_server.symdb2
) and BDS with export symbolsbedrock_server_mod.exe
(plugins in future may require this version of bds), before you runSymDB2.exe
you need to check if thebedrock_server.pdb
exists
docker pull shrbox/liteloaderbds
docker create --name liteloader -p 19132:19132/udp -i -t shrbox/liteloaderbds
Start server: docker container start liteloader
Stop server(uncommended): docker container stop liteloader
Show console: docker attach liteloader
Exit console: press Ctrl + P + Q
, if you press Ctrl + C
server process will exit
If you want to manage server file, use docker volume --help
for more details
Installed! Next, you can install what you want LL plugins!
From version 2.0.0
, LL has added an autoupdate function.
If in the same BDS version, LiteLoader update will automatically push, and automatically install the next time the server is started.
The latest features, get the first time! Eliminate the trouble of repeated manual upgrades!
LL plugins are mainly published in MineBBS, please click here to find and download your LL plugins
- If the download is a .zip, please unzip
- Put all the obtained content directly into the
plugins
directory - run
bedrock_server_mod.exe
- run
SymDB2.exe -def
- add
bedrock_server.dll
to[Properties -> Linker -> Input -> Delay Load DLL]
- run llvm-dlltool to generate import library using the following command (Tools/llvm-dlltool-msys2 is recommended)
llvm-dlltool -m i386:x86-64 -d bedrock_server_api.def -l bedrock_server_api.lib
llvm-dlltool -m i386:x86-64 -d bedrock_server_var.def -l bedrock_server_var.lib
- use
#pragma comment(lib, "path to lib")
or any method you like to add those libraries - add
SymDBHelper.lib
to your project - using headers in SDK/Header/MC and here we go
Click Here Check out more open source LL plugins as example plugins.
You can learn plugin development methods and techniques here
Go to
GitHub Actions
to get the latest build artifact
Of course, if you are willing to build the project yourself, or contribute code to LiteLoader, you can build by yourself according to the following instructions
- Install newest Microsoft Visual Studio with standard C++ building suite
- Install the newest version of Windows SDK
- Open
LiteLoader.sln
project files,Click on Build
You can use the following methods to contribute to the LiteLoader
project
- Contribute code, maintain symbols
- Help us modify and optimize development documents
- Write the new API that you want in the format and submit a PR, or make good suggestions
- Help us promote LL ,support our development
⭐⭐⭐We welcome your contributions to LiteLoader!⭐⭐⭐
You must accept the Minecraft EULA.
- It means DO NOT MAKE COMMERCIAL USE OF ANYTHING which breaks the EULA.
- Accepting this LICENSE means you ACCEPTED Minecraft EULA too.
- If you violate the EULA, any legal liability is IRRELEVANT to the developers
- NO WARRANTY
LiteLoader GPLv3 with extra restrictions&exceptions
BedrockX GPLv3 with extra restrictions&exceptions
ElementZero GPL v3
ChakraCore MIT License
OpenSSL Apache-2.0 License
SimpleIni MIT License
Nlohmann-Json MIT License
nbt-cpp MIT License
If you provides a server hosting service,you can use this framework for free, but you SHOULD NOT make PRIVATE changes to this framework as a selling point. If you fixed or tweaked the code, please pull request, instead of making it private for commercial use.
Do not do evil.
Although we expected to build an open-source community, but forcing everything open-source will ruin this community.
So you can write plugins based on LiteXLoader
with ANY open-source license or even dont publish your source code.
but if you modified the framework, or write a new framework based on this framework, you MUST open-source it.
@ShrBox | @dreamguxiang | @WangYneos | @wzy | @xiaoqch | @yqs112358 | @Sysca11 | @RimuruChan |
Thanks to JetBrains for allocating free open-source licences for IDEs such as CLion.