Fix Server Launch
This commit is contained in:
parent
48d796fa46
commit
151e404aab
@ -1,6 +1,6 @@
|
|||||||
FROM thebrokenrail/minecraft-pi:client
|
FROM thebrokenrail/minecraft-pi:client
|
||||||
|
|
||||||
ENV MCPI_SERVER=1
|
ENV MCPI_MODE=server
|
||||||
|
|
||||||
RUN apt-get install -y xvfb
|
RUN apt-get install -y xvfb
|
||||||
|
|
||||||
|
@ -156,7 +156,9 @@ int extra_has_feature(const char *name) {
|
|||||||
|
|
||||||
int extra_get_mode() {
|
int extra_get_mode() {
|
||||||
char *mode = getenv("MCPI_MODE");
|
char *mode = getenv("MCPI_MODE");
|
||||||
if (strcmp("virgl", mode) == 0) {
|
if (mode == NULL) {
|
||||||
|
ERR("%s", "MCPI Mode Not Specified");
|
||||||
|
} else if (strcmp("virgl", mode) == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (strcmp("native", mode) == 0) {
|
} else if (strcmp("native", mode) == 0) {
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user