Small Changes

This commit is contained in:
TheBrokenRail 2020-09-25 14:52:28 -04:00
parent 82b9edcefc
commit a78b35ecd0
4 changed files with 8 additions and 2 deletions

View File

@ -22,6 +22,11 @@ static int ends_with(const char *s, const char *t) {
#define MODS_FOLDER "./mods/" #define MODS_FOLDER "./mods/"
static void set_and_print_env(char *name, char *value) { static void set_and_print_env(char *name, char *value) {
int length = strlen(value);
if (value[length - 1] == ':') {
value[length - 1] = '\0';
}
fprintf(stderr, "Set %s = %s\n", name, value); fprintf(stderr, "Set %s = %s\n", name, value);
setenv(name, value, 1); setenv(name, value, 1);
} }

View File

@ -8,3 +8,5 @@ services:
- '~/.minecraft-pi:/root/.minecraft' - '~/.minecraft-pi:/root/.minecraft'
environment: environment:
- 'DISPLAY=unix${DISPLAY}' - 'DISPLAY=unix${DISPLAY}'
ports:
- "4711:4711/tcp"

View File

@ -3,6 +3,4 @@
__attribute__((constructor)) static void init() { __attribute__((constructor)) static void init() {
unsigned char patch_data[4] = {0x01, 0x00, 0x50, 0xe3}; unsigned char patch_data[4] = {0x01, 0x00, 0x50, 0xe3};
patch((void *) 0x292fc, patch_data); patch((void *) 0x292fc, patch_data);
//unsigned char patch_data_2[4] = {0x00, 0x30, 0xa0, 0xe3};
//patch((void *) 0x3d9b8, patch_data_2);
} }

1
run.sh
View File

@ -8,5 +8,6 @@ PID="$!"
xhost local:root xhost local:root
sudo docker-compose up sudo docker-compose up
sudo docker-compose down
kill "${PID}" kill "${PID}"