diff --git a/README.md b/README.md index 3cfa90c..e9f77d0 100644 --- a/README.md +++ b/README.md @@ -1,64 +1,22 @@ +
+ +![Start Screen](images/start.png) + +
+ # Minecraft: Pi Edition: Reborn Minecraft: Pi Edition Modding Project -## Getting Started +## Installation -### Debian/Raspbian Buster Users -1. Install Newer ``libseccomp2`` - ```sh - # Install Backports Key - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 - # Install Backports Repository - echo 'deb http://deb.debian.org/debian buster-backports main' | sudo tee -a /etc/apt/sources.list - # Update APT Index - sudo apt update - # Install Updated libseccomp2 - sudo apt install -t buster-backports libseccomp2 - ``` -2. Install Official Docker Build - ```sh - curl -fsSL https://get.docker.com -o get-docker.sh - sudo sh get-docker.sh - ``` -3. Remove Vanilla Minecraft: Pi Edition Package If Installed (``sudo apt remove minecraft-pi``) -4. Transfer Vanilla Minecraft: Pi Edition Worlds If Present (``mv ~/.minecraft ~/.minecraft-pi``) +### Option A: Pi-Apps (Raspberry Pi Only) +[![Pi-Apps](https://github.com/Botspot/pi-apps/blob/master/icons/badge.png?raw=true)](https://github.com/Botspot/pi-apps) -### Installation Instructions -1. Download Appropriate Package From [Here](https://jenkins.thebrokenrail.com/job/minecraft-pi-reborn/job/master/lastSuccessfulBuild/artifact/out/deb/) (See Table Below) -2. Install With ``sudo apt install ./`` -3. Have Fun! - -#### Package Table -| Package | Description | -| --- | --- | -| ``minecraft-pi-reborn-server`` | Minecraft Pi Edition Modded Into A Dedicated Server | -| ``minecraft-pi-reborn-virgl`` | Minecraft Pi Edition Using VirGL For Hardware Acceleration (Recommended For Desktop) | -| ``minecraft-pi-reborn-native`` | Minecraft: Pi Edition Using Docker Device Mounting For GPU Acceleration (Recommended For ARM Devices (ie. Raspberry Pi, PinePhone, etc)) | +### Option B: Manual Installation +[View Manual Installation](docs/INSTALL.md) ## Troubleshooting -Game logs are located in ``/tmp/minecraft-pi``. - -### ``Couldn't connect to Docker daemon at http+docker://localhost - is it running?`` -Start Docker if it isn't running: -```sh -sudo service docker start -``` - -### ``Error response from daemon: error gathering device information while adding custom device "/dev/dri": no such file or directory`` -Make sure you are using the correct GPU drivers for your system. - -If you are using a Raspberry Pi, make sure your GPU driver is set to ``Full KMS`` or ``Fake KMS`` in ``raspi-config``. - -### ``Segmentation Fault`` (Exit Code: ``139``) -Report an issue with reproduction instructions and system details. - -### ``[ERR]: Invalid ~/.minecraft-pi Permissions`` -Update ``~/.minecraft-pi`` permissions: -```sh -sudo chown -R "$(id -u):$(id -g)" ~/.minecraft-pi -chmod -R u+rw ~/.minecraft-pi -``` +[View Troubleshooting](docs/TROUBLESHOOTING.md) ## Dedicated Server The dedicated server is a version of Minecraft: Pi Edition modified to run in a headless environment. It loads settings from a ``server.properties`` file. @@ -73,7 +31,7 @@ This server is also compatible with MCPE Alpha v0.6.1. - Survival Mode servers are only compatible with ``minecraft-pi-reborn`` clients ## Modding -[View Modding](MODDING.md) +[View Modding](docs/MODDING.md) ## Credits -[View Credits](CREDITS.md) +[View Credits](docs/CREDITS.md) diff --git a/CREDITS.md b/docs/CREDITS.md similarity index 100% rename from CREDITS.md rename to docs/CREDITS.md diff --git a/docs/INSTALL.md b/docs/INSTALL.md new file mode 100644 index 0000000..5e27015 --- /dev/null +++ b/docs/INSTALL.md @@ -0,0 +1,66 @@ +# Manual Installation + +## System Requirements +- At Least Debian/Raspbian Buster Or Ubuntu 20.04 + +## Before You Install + +
+Debian/Raspbian Buster + +### ``libseccomp2`` +``minecraft-pi-reborn`` requires a newer version of the package ``libseccomp2`` to be installed when using Debian/Raspbian Buster. + +```sh +# Install Backports Key +sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 04EE7237B7D453EC +sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 648ACFD622F3D138 +# Install Backports Repository +echo 'deb http://deb.debian.org/debian buster-backports main' | sudo tee -a /etc/apt/sources.list +# Update APT Index +sudo apt update +# Install Updated libseccomp2 +sudo apt install -t buster-backports libseccomp2 +``` + +### Official Docker Package +``minecraft-pi-reborn`` requires the official Docker package when running Debian/Raspbian Buster instead of the Debian package (``docker.io``). + +```sh +# Remove Debian Docker Package +sudo apt-get remove -y docker.io +# Install Official Docker Package +curl -fsSL https://get.docker.com -o get-docker.sh +sudo sh get-docker.sh +``` + +### Existing Installation +If you have un-modded ``minecraft-pi`` installed, you must remove it and transfer your existing worlds to ``minecraft-pi-reborn``'s folder. + +```sh +# Transfer Worlds +mv ~/.minecraft ~/.minecraft-pi +# Remove Vanilla Minecraft Pi +sudo apt-get remove -y minecraft-pi +``` + +
+ +
+NVIDIA Users + +The proprietary NVIDIA drivers are not supported, use either the open-source ``noveau`` drivers or use a different GPU (ie. Intel Integrated GPU). + +
+ +## Installing +1. Download Appropriate Package From [Here](https://jenkins.thebrokenrail.com/job/minecraft-pi-reborn/job/master/lastSuccessfulBuild/artifact/out/deb/) (See Table Below To Pick Correct Package) +2. Install With ``sudo apt install ./`` Or Your Preferred Package Installer +3. Have Fun! + +### Package Table +| Package | Description | +| --- | --- | +| ``minecraft-pi-reborn-virgl`` | Minecraft Pi Edition Using VirGL For Hardware Acceleration (Recommended For Desktop/Laptop) | +| ``minecraft-pi-reborn-native`` | Minecraft: Pi Edition Using Docker Device Mounting For GPU Acceleration (Recommended For ARM Devices (ie. Raspberry Pi, PinePhone, etc)) | +| ``minecraft-pi-reborn-server`` | Minecraft Pi Edition Modded Into A Dedicated Server | \ No newline at end of file diff --git a/MODDING.md b/docs/MODDING.md similarity index 100% rename from MODDING.md rename to docs/MODDING.md diff --git a/docs/TROUBLESHOOTING.md b/docs/TROUBLESHOOTING.md new file mode 100644 index 0000000..9627dbe --- /dev/null +++ b/docs/TROUBLESHOOTING.md @@ -0,0 +1,26 @@ +# Troubleshooting +Game logs are located in ``/tmp/minecraft-pi``. + +## ``Couldn't connect to Docker daemon at http+docker://localhost - is it running?`` +Start Docker if it isn't running: +```sh +sudo service docker start +``` + +## ``Error response from daemon: error gathering device information while adding custom device "/dev/dri": no such file or directory`` +Make sure you are using the correct GPU drivers for your system. + +If you are using a Raspberry Pi, make sure your GPU driver is set to ``Full KMS`` or ``Fake KMS`` in ``raspi-config``. + +## ``Segmentation Fault`` (Exit Code: ``139``) +Report an issue with reproduction instructions and system details. + +## ``[ERR]: Invalid ~/.minecraft-pi Permissions`` +Update ``~/.minecraft-pi`` permissions: +```sh +sudo chown -R "$(id -u):$(id -g)" ~/.minecraft-pi +chmod -R u+rw ~/.minecraft-pi +``` + +## Other +If you experience a crash/error not listed above, report it on the issue tracker **with your game log attached**. \ No newline at end of file diff --git a/images/start.png b/images/start.png new file mode 100644 index 0000000..e6180ee Binary files /dev/null and b/images/start.png differ diff --git a/libreborn/include/libreborn/minecraft.h b/libreborn/include/libreborn/minecraft.h index a3cf7a3..ca1bbb4 100644 --- a/libreborn/include/libreborn/minecraft.h +++ b/libreborn/include/libreborn/minecraft.h @@ -94,7 +94,7 @@ static Minecraft_getProgressMessage_t Minecraft_getProgressMessage = (Minecraft_ typedef uint32_t (*Minecraft_isLevelGenerated_t)(unsigned char *minecraft); static Minecraft_isLevelGenerated_t Minecraft_isLevelGenerated = (Minecraft_isLevelGenerated_t) 0x16e6c; -typedef int32_t (*Minecraft_isCreativeMode_t)(unsigned char *minecraft); +typedef bool (*Minecraft_isCreativeMode_t)(unsigned char *minecraft); static Minecraft_isCreativeMode_t Minecraft_isCreativeMode = (Minecraft_isCreativeMode_t) 0x17270; typedef void (*Minecraft_releaseMouse_t)(unsigned char *minecraft); diff --git a/mods/src/input/input.c b/mods/src/input/input.c index 6b995a4..37e740c 100644 --- a/mods/src/input/input.c +++ b/mods/src/input/input.c @@ -82,7 +82,7 @@ static void Minecraft_tickInput_injection(unsigned char *minecraft) { #include // Block UI Interaction When Mouse Is Locked -static int32_t Gui_tickItemDrop_Minecraft_isCreativeMode_call_injection(unsigned char *minecraft) { +static bool Gui_tickItemDrop_Minecraft_isCreativeMode_call_injection(unsigned char *minecraft) { if (SDL_ShowCursor(SDL_QUERY) == SDL_ENABLE) { // Call Original Method return (*Minecraft_isCreativeMode)(minecraft);