我想从ROpenSci尝试miner Minecraft API,但是从R连接到服务器时遇到问题。我确信这是一个网络问题,而不是R或Minecraft问题,但我不知道真的有这方面的经验。
我按照小插图在spigot之后在我的Arch机器上安装了these instructions,并且可以使用Minecraft客户端成功启动服务器并连接到它。
然而,当我尝试通过R连接时,我无法这样做。这就是我得到的:
library(miner)
mc_connect("127.0.0.1")
Error in socketConnection(host = hostname, as.integer(port), open = "r+b", :
cannot open the connection
In addition: Warning message:
In socketConnection(host = hostname, as.integer(port), open = "r+b", :
127.0.0.1:4711 cannot be opened
我还尝试了“localhost”并添加了server-ip = 127.0.0.1
这看起来很有趣,所以弄清楚我做错了会很酷。
如果有帮助,这是我的server.properties文件:
#Minecraft server properties
#Wed Jul 12 21:30:47 NZST 2017
generator-settings=
force-gamemode=true
allow-nether=true
gamemode=1
enable-query=false
player-idle-timeout=0
difficulty=0
spawn-monsters=true
op-permission-level=4
pvp=true
snooper-enabled=true
level-type=DEFAULT
hardcore=false
enable-command-block=false
max-players=20
network-compression-threshold=256
resource-pack-sha1=
max-world-size=29999984
server-port=25565
debug=false
server-ip=
spawn-npcs=true
allow-flight=false
level-name=world
view-distance=10
resource-pack=
spawn-animals=true
white-list=false
generate-structures=true
online-mode=true
max-build-height=256
level-seed=
prevent-proxy-connections=false
use-native-transport=true
enable-rcon=false
motd=My very own minecraft server```