Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yechentide/cddea43b639251e2a107dc79e5b02328 to your computer and use it in GitHub Desktop.
Save yechentide/cddea43b639251e2a107dc79e5b02328 to your computer and use it in GitHub Desktop.
#!/usr/local/env bash
# shellcheck disable=SC2174
set -eu

# Install wine
dpkg --add-architecture i386 && apt update && apt upgrade -y
apt install -y wget unzip
mkdir -pm755 /etc/apt/keyrings
wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bullseye/winehq-bullseye.sources
apt update
apt install winehq-stable -y

mkdir ~/downloads

# Install Lip
# https://docs.litebds.com/zh-Hans
# https://raw.githubusercontent.com/LiteLDev/LiteLoaderBDS/main/scripts/install.sh
lip_version='0.14.0'
cd ~/downloads
wget https://github.com/LiteLDev/Lip/releases/download/v${lip_version}/lip-${lip_version}-linux-amd64.tar.gz
tar -xvf lip-${lip_version}-linux-amd64.tar.gz
chmod +x lip-${lip_version}-linux-amd64/lip
mv lip-${lip_version}-linux-amd64/lip /usr/local/bin

# Install BDS
mkdir ~/bedrock_server && cd ~/bedrock_server
lip install -y bds && lip install ll
WINEDEBUG=-all wine LLPeEditor.exe

# Install trapdoor
# https://bedrock-dev.github.io/tr-wiki/use.html
trapdoor_version='0.35.0-1.19.63.01'
trapdoor_zip='trapdoor-0.35.0-1.19.61.01-9820411.zip'
cd ~/downloads
wget https://github.com/bedrock-dev/trapdoor-ll/releases/download/${trapdoor_version}/${trapdoor_zip}
unzip $trapdoor_zip
cp -r out/plugins/* ~/bedrock_server/plugins/

cd ~/bedrock_server
wine bedrock_server_mod.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment