我的世界python端,从命令行Python / C ++启动Minecraft

I have an issue where I am trying to use my previous knowledge of programming to write a Minecraft launcher. I have use of commands that are in the standard C++ libraries and any Python eggs that are not huge. I would prefer to use system("java ...") in order to launch Minecraft.

The question in short:

How do I launch Minecraft from the command line without any auxillary Java code? (Without using launcher code like net.minecraft.LauncherFrame) Is it possible? I tried java -cp mine craft.jar net.minecraft.client.Minecraft from the Terminal in Mac OS X, to no avail, ending with a ClassNotFoundException.

Can anyone shed some light on my problem?

Thank you,

Pyro.

解决方案

I'm running on linux, but this also should work for you:

java -cp ".minecraft/bin/*" -Djava.library.path=".minecraft/bin/natives/" net.minecraft.client.Minecraft "username" "login id"

You don't need to input your username/login id, but if you don't, you can't get in any servers.

You can get your login id here: https://login.minecraft.net?user=&password=&version=13

More info about the authentication scheme here

UPDATE:

The new launcher for minecraft 1.6 changed a lot.

For the launch command you should look in .minecraft/versions//.json

The authentication also changed. It now uses POST parameters and returns JSON. More about it here.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值