From a78b35ecd0ec3ac2cb5f902c59cee8d507775b72 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Fri, 25 Sep 2020 14:52:28 -0400 Subject: [PATCH] Small Changes --- core/src/launcher.c | 5 +++++ docker-compose.yml | 2 ++ mods/src/touch.c | 2 -- run.sh | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/src/launcher.c b/core/src/launcher.c index 8849c7e1c..d1ff6f6eb 100644 --- a/core/src/launcher.c +++ b/core/src/launcher.c @@ -22,6 +22,11 @@ static int ends_with(const char *s, const char *t) { #define MODS_FOLDER "./mods/" 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); setenv(name, value, 1); } diff --git a/docker-compose.yml b/docker-compose.yml index 493089516..f6482b816 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,3 +8,5 @@ services: - '~/.minecraft-pi:/root/.minecraft' environment: - 'DISPLAY=unix${DISPLAY}' + ports: + - "4711:4711/tcp" diff --git a/mods/src/touch.c b/mods/src/touch.c index 6364cd728..06099eb0a 100644 --- a/mods/src/touch.c +++ b/mods/src/touch.c @@ -3,6 +3,4 @@ __attribute__((constructor)) static void init() { unsigned char patch_data[4] = {0x01, 0x00, 0x50, 0xe3}; patch((void *) 0x292fc, patch_data); - //unsigned char patch_data_2[4] = {0x00, 0x30, 0xa0, 0xe3}; - //patch((void *) 0x3d9b8, patch_data_2); } diff --git a/run.sh b/run.sh index 7bf984a25..1c12cb559 100755 --- a/run.sh +++ b/run.sh @@ -8,5 +8,6 @@ PID="$!" xhost local:root sudo docker-compose up +sudo docker-compose down kill "${PID}"