mclevel.fromFile no longer takes last_played and random_seed arguments because it cannot implicitly create a level.
This commit is contained in:
parent
6e5110b532
commit
29a3037554
6
mce.py
6
mce.py
@ -386,7 +386,7 @@ class mce(object):
|
||||
destPoint = self.readPoint(command)
|
||||
blocksToCopy = self.readBlocksToCopy(command)
|
||||
|
||||
importLevel = mclevel.fromFile(filename, last_played=self.last_played, random_seed=self.random_seed)
|
||||
importLevel = mclevel.fromFile(filename)
|
||||
self.level.copyBlocksFrom(importLevel, importLevel.getWorldBounds(), destPoint, blocksToCopy);
|
||||
|
||||
|
||||
@ -762,7 +762,7 @@ class mce(object):
|
||||
self.loadWorld(command[0])
|
||||
|
||||
def _reload(self, command):
|
||||
self.level = mclevel.fromFile(self.filename, last_played=self.last_played, random_seed=self.random_seed);
|
||||
self.level = mclevel.fromFile(self.filename);
|
||||
|
||||
def _help(self, command):
|
||||
if len(command):
|
||||
@ -815,7 +815,7 @@ class mce(object):
|
||||
try:
|
||||
worldNum = int(world)
|
||||
except ValueError:
|
||||
self.level = mclevel.fromFile(world, last_played=self.last_played, random_seed=self.random_seed)
|
||||
self.level = mclevel.fromFile(world)
|
||||
|
||||
self.filename = self.level.filename
|
||||
|
||||
|
@ -617,7 +617,7 @@ class MCLevel(object):
|
||||
def saveInPlace(self):
|
||||
self.saveToFile(self.filename);
|
||||
@classmethod
|
||||
def fromFile(cls, filename, loadInfinite=True, random_seed=None, last_played=None):
|
||||
def fromFile(cls, filename, loadInfinite=True):
|
||||
''' The preferred method for loading Minecraft levels of any type.
|
||||
pass False to loadInfinite if you'd rather not load infdev levels.'''
|
||||
info( u"Identifying " + filename )
|
||||
@ -634,7 +634,7 @@ class MCLevel(object):
|
||||
raise;
|
||||
try:
|
||||
info( u"Can't read, attempting to open directory" )
|
||||
lev = MCInfdevOldLevel(filename=filename, random_seed=random_seed, last_played=last_played)
|
||||
lev = MCInfdevOldLevel(filename=filename)
|
||||
info( u"Detected Alpha world." )
|
||||
return lev;
|
||||
except Exception, ex:
|
||||
|
Reference in New Issue
Block a user