started implementation of mchandler.py and some testing

backup
LinuxMint4Ever 2019-10-12 11:58:46 +02:00
parent 1275289461
commit 141542ca8a
7 changed files with 62 additions and 0 deletions

17
.project Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>CustomMinecraftLauncher</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>

8
.pydevproject Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/${PROJECT_DIR_NAME}</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python interpreter</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
</pydev_project>

0
lib/__init__.py Normal file
View File

0
lib/launcher/__init.py Normal file
View File

View File

View File

@ -0,0 +1,32 @@
# java -Xmx$RAM -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M -Djava.library.path=$NATIVES -cp $LIBRARIES net.minecraft.launchwrapper.Launch --username $USERNAME --version 1.7.10-Forge10.13.4.1614-1.7.10 --gameDir $GAMEDIR --assetsDir $ASSETS --assetIndex 1.7.10 --uuid $UUID --accessToken $ACCESSTOKEN --userProperties {} --userType mojang --width $WINDOWWIDTH --height $WINDOWHEIGHT --tweakClass cpw.mods.fml.common.launcher.FMLTweaker
# $RAM the amount of RAM with postfix (k, M, G ...)
# $WINDOWWIDTH, $WINDOWHEIGHT window width and height in pixels without the WMs decoration
# $USERNAME the username as shown in-game
# $UUID the players uuid
# $ACCESSTOKEN a valid accessToken
# $NATIVES the directory containing the natives
# $LIBRARIES a colon-separated (semicolon-separated on Windowze) list of library jars
# $GAMEDIR the game directory IMPORTANT! Change the cwd to that directory before launch. Some mods are coded to find the standard paths by using the cwd.
# $ASSETS the directory containing the assets
game_properties = {
"window width": "1366",
"window height": "768",
"ram": "4G",
"username": "",
"uuid":"1337",
"access token": "1337",
"native directory": "lib/natives",
"library directory": "lib/jar", # will be transformed by the launch function
"asset directory": "res",
"game directory": "run",
"java executable": "java"}
def launch():
pass
def set_parameter(parameter, value):
game_properties[parameter] = value

View File

@ -30,3 +30,8 @@
# - wait for launch or close actions
#
# - launch the game or exit
import lib.launcher.python.yggdrasil as yggdrasil # Import Error!?
# temporary test stuff
yggdrasil.authenticateUser(raw_input("Username: "), raw_input("Password: "))