[JAVA] Serveur Minecraft sur Raspberry Pi 4

"Créer un serveur Minecraft sur AWS" https://qiita.com/nanbuwks/items/601832b2da00b451d55d

Maintenant, cela fonctionnait si facilement, alors créons un serveur Minecraft avec Raspberry Pi 4 basé sur cette connaissance.

environnement

--Raspberry Pi 4 modèle B 4 Go (je l'ai vérifié avec Raspberry Pi 3 modèle B, mais cela semble dur)

Installation

Utilisez cette méthode pour écrire sur la carte micro SD

"Ecriture d'un fichier ZIP Raspian sur une carte microSD sous Ubuntu Linux" https://qiita.com/nanbuwks/items/2c296549ff72dacf7adc

Créez également un ssh dans / boot

Réglage initial

Les paramètres initiaux après la connexion


$ sudo apt update
$ sudo apt upgrade

Après,


$ sudo raspi-config

Comme

"Paramètres initiaux du Raspberry Pi dans CUI (si vous avez un écran et un clavier)" https://qiita.com/nanbuwks/items/9a1d46c22e898178015c

Je l'ai fait comme ça.

De plus, il semble que les réglages du clavier ne peuvent pas être effectués avec ssh.

Adresse IP fixe

Lorsque vous l'utilisez comme serveur, il est pratique de garder l'adresse IP fixe.


sudo vi /etc/dhcpcd.conf

Et ajoutez ce qui suit à la fin du fichier:


interface eth0
static ip_address=192.168.42.104/24
static routers=192.168.42.1
static domain_name_servers=192.168.42.1

Une fois l'enregistrement terminé, recommencez avec ce qui suit.


$ sudo reboot

Reconnectez-vous à 102.168.42.104.

Installez Java

J'ai utilisé le dernier fourni par Raspbian.


sudo apt install openjdk-11-jre

Commencez

Commencez comme suit


$ java -Xmx1024M -Xms1024M -jar server.jar nogui

C'est bien pour les tests, mais si vous voulez le faire fonctionner pendant une longue période, il est préférable d'ajouter & à la fin, de l'utiliser dans une session d'écran ou d'en faire un paramètre ou un service de démarrage automatique à grande échelle. ..

Lorsque je l'ai exécuté sur Raspberry Pi 4 Model B (4G), il a démarré en environ 2 minutes comme suit.


[20:29:36] [main/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[20:29:36] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[20:29:36] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[20:29:36] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[20:29:36] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[20:29:36] [Server thread/INFO]: Starting minecraft server version 1.15.2
[20:29:36] [Server thread/INFO]: Loading properties
[20:29:36] [Server thread/INFO]: Default game type: SURVIVAL
[20:29:36] [Server thread/INFO]: Generating keypair
[20:29:37] [Server thread/INFO]: Starting Minecraft server on *:25565
[20:29:38] [Server thread/INFO]: Using default channel type
[20:29:38] [Server thread/INFO]: Preparing level "world"
[20:29:39] [Server thread/INFO]: Reloading ResourceManager: Default
[20:30:10] [Server thread/INFO]: Loaded 6 recipes
[20:30:27] [Server thread/INFO]: Loaded 825 advancements
[20:30:28] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[20:30:34] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:34] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:34] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:34] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:34] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:34] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:34] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:34] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:34] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:34] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:34] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:34] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:34] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:34] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:35] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:36] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:36] [Server thread/INFO]: Preparing spawn area: 0%
[20:30:36] [Server thread/INFO]: Preparing spawn area: 48%
[20:30:49] [Server-Worker-3/INFO]: Preparing spawn area: 83%
[20:30:49] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:49] [Server-Worker-3/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-3/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-3/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-3/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-3/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-3/INFO]: Preparing spawn area: 83%
[20:30:50] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:53] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:53] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:53] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:53] [Server-Worker-3/INFO]: Preparing spawn area: 83%
[20:30:53] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:53] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:53] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:54] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:54] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:54] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:55] [Server-Worker-3/INFO]: Preparing spawn area: 83%
[20:30:55] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:56] [Server-Worker-3/INFO]: Preparing spawn area: 83%
[20:30:56] [Server-Worker-3/INFO]: Preparing spawn area: 83%
[20:30:57] [Server-Worker-3/INFO]: Preparing spawn area: 83%
[20:30:57] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:30:58] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:58] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:30:59] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:31:00] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:31:00] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:31:00] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:31:01] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:31:01] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:31:02] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:31:02] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:31:03] [Server-Worker-1/INFO]: Preparing spawn area: 83%
[20:31:03] [Server-Worker-2/INFO]: Preparing spawn area: 83%
[20:31:04] [Server-Worker-3/INFO]: Preparing spawn area: 83%
[20:31:04] [Server-Worker-3/INFO]: Preparing spawn area: 84%
[20:31:05] [Server-Worker-3/INFO]: Preparing spawn area: 84%
[20:31:05] [Server-Worker-3/INFO]: Preparing spawn area: 86%
[20:31:06] [Server-Worker-2/INFO]: Preparing spawn area: 91%
[20:31:06] [Server-Worker-1/INFO]: Preparing spawn area: 91%
[20:31:07] [Server-Worker-1/INFO]: Preparing spawn area: 92%
[20:31:07] [Server-Worker-2/INFO]: Preparing spawn area: 93%
[20:31:08] [Server-Worker-3/INFO]: Preparing spawn area: 95%
[20:31:08] [Server-Worker-3/INFO]: Preparing spawn area: 98%
[20:31:09] [Server thread/INFO]: Preparing spawn area: 99%
[20:31:09] [Server thread/INFO]: Time elapsed: 41122 ms
[20:31:09] [Server thread/INFO]: Done (90.443s)! For help, type "help"
[20:31:13] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2008ms or 40 ticks behind

Essayez de jouer

Essayez de le déplacer et assurez-vous que tout va bien.

Publié en dehors d'Internet

J'omettrai les détails, mais ce n'est pas grave si vous définissez le public de TCP25565 et UDP25565 sur le routeur, etc.

Bonus Log lors de l'exécution sur Raspberry Pi 3

Lorsque je l'ai utilisé pour la première fois sur le Raspberry Pi 3, cela fonctionnait, mais cela semblait assez douloureux.


[19:23:59] [main/WARN]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498]
[19:23:59] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9,
 0 0 0]
[19:24:00] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[19:24:00] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[19:24:00] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[19:24:00] [Server thread/INFO]: Starting minecraft server version 1.15.2
[19:24:00] [Server thread/INFO]: Loading properties
[19:24:00] [Server thread/INFO]: Default game type: SURVIVAL
[19:24:00] [Server thread/INFO]: Generating keypair
[19:24:07] [Server thread/INFO]: Starting Minecraft server on *:25565
[19:24:07] [Server thread/INFO]: Using default channel type
[19:24:08] [Server thread/INFO]: Preparing level "world"
[19:24:10] [Server thread/INFO]: Found new data pack vanilla, loading it automatically
[19:24:10] [Server thread/INFO]: Reloading ResourceManager: Default
[19:26:04] [Server thread/INFO]: Loaded 6 recipes
[19:26:06] [Server thread/INFO]: Loaded 825 advancements
[19:26:56] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[19:26:57] [Server-Worker-2/INFO]: Preparing spawn area: 0%
[19:26:57] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[19:26:57] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[19:26:58] [Server-Worker-2/INFO]: Preparing spawn area: 0%
[19:26:58] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[19:26:59] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[19:26:59] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[19:27:00] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[19:27:01] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[19:27:01] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[19:27:01] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[19:27:02] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[19:27:02] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[19:27:03] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[19:27:03] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[19:27:04] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[19:27:04] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[19:27:05] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[19:27:05] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[19:27:06] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[19:27:06] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[19:27:07] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[19:27:07] [Server-Worker-1/INFO]: Preparing spawn area: 0%
[19:27:08] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[19:27:08] [Server-Worker-3/INFO]: Preparing spawn area: 0%
[19:27:09] [Server-Worker-2/INFO]: Preparing spawn area: 0%
[19:27:09] [Server-Worker-2/INFO]: Preparing spawn area: 0%
[19:27:10] [Server-Worker-2/INFO]: Preparing spawn area: 0%
[19:27:10] [Server-Worker-2/INFO]: Preparing spawn area: 0%
[19:27:11] [Server-Worker-2/INFO]: Preparing spawn area: 1%
[19:27:11] [Server-Worker-3/INFO]: Preparing spawn area: 1%
[19:27:12] [Server-Worker-3/INFO]: Preparing spawn area: 1%
[19:27:12] [Server-Worker-2/INFO]: Preparing spawn area: 1%
・
・
・
[19:29:27] [Server-Worker-2/INFO]: Preparing spawn area: 92%
[19:29:27] [Server-Worker-2/INFO]: Preparing spawn area: 92%
[19:29:27] [Server-Worker-2/INFO]: Preparing spawn area: 92%
[19:29:27] [Server-Worker-3/INFO]: Preparing spawn area: 92%
[19:29:27] [Server-Worker-2/INFO]: Preparing spawn area: 92%
[19:29:27] [Server-Worker-3/INFO]: Preparing spawn area: 92%
[19:29:27] [Server-Worker-3/INFO]: Preparing spawn area: 92%
[19:29:27] [Server-Worker-3/INFO]: Preparing spawn area: 92%
[19:29:27] [Server-Worker-2/INFO]: Preparing spawn area: 92%
[19:29:27] [Server-Worker-2/INFO]: Preparing spawn area: 92%
[19:29:30] [Server-Worker-3/INFO]: Preparing spawn area: 97%
[19:29:30] [Server-Worker-1/INFO]: Preparing spawn area: 97%
[19:29:30] [Server-Worker-3/INFO]: Preparing spawn area: 97%
[19:29:30] [Server-Worker-2/INFO]: Preparing spawn area: 97%
[19:29:30] [Server-Worker-1/INFO]: Preparing spawn area: 97%
[19:29:30] [Server thread/INFO]: Time elapsed: 153775 ms
[19:29:30] [Server thread/INFO]: Done (321.899s)! For help, type "help"
[19:29:32] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2159ms or 43 ticks behind
[19:30:05] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 17806ms or 356 ticks behind
[19:34:58] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 7821ms or 156 ticks behind
・
・
・

Recommended Posts

Serveur Minecraft sur Raspberry Pi 4
Serveur d'enregistrement Radiko avec Raspberry Pi 4 (Docker non utilisé)
Installez Docker sur Raspberry Pi
Mettez Ubuntu 20.04.1 dans Raspberry 4
Installez MariaDB sur le système d'exploitation Raspberry Pi
Créer un serveur Minecraft sur AWS
Essayez de mettre CentOS 8 dans Raspberry Pi 3
Installation sans tête d'Ubuntu 20.10 sur Raspberry Pi
Installez CentOS 7 sur Raspberry pi 4 modèle B
Connectez-vous en série à Ubuntu sur Raspberry Pi
Installez Docker sur Raspberry Pi 4 et Raspberry Pi OS 64 bits
Créer un environnement de bureau Ubuntu 20.04 LTS sur Raspberry Pi 4 (+ localisation japonaise)
Comment exécuter javafx avec Raspeye publié le 12/07/2020
Afficher les caractères sur l'écran LCD I2C 1602 avec Raspberry Pi 3 et Java
Installez Docker sur Ubuntu Server 20.04
Configurer un serveur MineCraft Paper avec Ubuntu 20.04.1 LTS ② Mise à jour
Installez Ubuntu Server 20.04 sur Btrfs
Installez Docker et docker-compose sur Raspeye 4, Linux (Debian) et Windows 10, respectivement
Afficher les caractères définis par l'utilisateur sur l'écran LCD I2C 1602 avec Raspberry Pi 3 et Java