Merge branch 'master' of https://github.com/chungy/pymclevel
This commit is contained in:
commit
d027bfb610
20
mce.py
20
mce.py
@ -57,6 +57,7 @@ class mce(object):
|
|||||||
{commandPrefix}worldsize
|
{commandPrefix}worldsize
|
||||||
{commandPrefix}heightmap <filename>
|
{commandPrefix}heightmap <filename>
|
||||||
{commandPrefix}randomseed [ <seed> ]
|
{commandPrefix}randomseed [ <seed> ]
|
||||||
|
{commandPrefix}gametype [ <gametype> ]
|
||||||
|
|
||||||
Editor commands:
|
Editor commands:
|
||||||
{commandPrefix}save
|
{commandPrefix}save
|
||||||
@ -112,6 +113,7 @@ class mce(object):
|
|||||||
"worldsize",
|
"worldsize",
|
||||||
"heightmap",
|
"heightmap",
|
||||||
"randomseed",
|
"randomseed",
|
||||||
|
"gametype",
|
||||||
|
|
||||||
"save",
|
"save",
|
||||||
"load",
|
"load",
|
||||||
@ -1084,6 +1086,24 @@ class mce(object):
|
|||||||
else:
|
else:
|
||||||
print "Random Seed: ", self.level.RandomSeed
|
print "Random Seed: ", self.level.RandomSeed
|
||||||
|
|
||||||
|
def _gametype(self, command):
|
||||||
|
"""
|
||||||
|
gametype [ <gametype> ]
|
||||||
|
|
||||||
|
Set or display the world's game type, an integer that identifies whether
|
||||||
|
the game is survival (0) or creative (1).
|
||||||
|
"""
|
||||||
|
if len(command):
|
||||||
|
try:
|
||||||
|
gametype = int(command[0])
|
||||||
|
except ValueError:
|
||||||
|
raise UsageError, "Expected an integer."
|
||||||
|
|
||||||
|
self.level.GameType = gametype
|
||||||
|
self.needsSave = True
|
||||||
|
else:
|
||||||
|
print "Game Type: ", self.level.GameType
|
||||||
|
|
||||||
def _worldsize(self, command):
|
def _worldsize(self, command):
|
||||||
"""
|
"""
|
||||||
worldsize
|
worldsize
|
||||||
|
Reference in New Issue
Block a user