mclevel.fromFile no longer takes last_played and random_seed arguments because it cannot implicitly create a level.

This commit is contained in:
David Vierra 2010-10-15 22:00:00 -10:00
parent 6e5110b532
commit 29a3037554
2 changed files with 5 additions and 5 deletions

6
mce.py
View File

@ -386,7 +386,7 @@ class mce(object):
destPoint = self.readPoint(command) destPoint = self.readPoint(command)
blocksToCopy = self.readBlocksToCopy(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); self.level.copyBlocksFrom(importLevel, importLevel.getWorldBounds(), destPoint, blocksToCopy);
@ -762,7 +762,7 @@ class mce(object):
self.loadWorld(command[0]) self.loadWorld(command[0])
def _reload(self, command): 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): def _help(self, command):
if len(command): if len(command):
@ -815,7 +815,7 @@ class mce(object):
try: try:
worldNum = int(world) worldNum = int(world)
except ValueError: 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 self.filename = self.level.filename

View File

@ -617,7 +617,7 @@ class MCLevel(object):
def saveInPlace(self): def saveInPlace(self):
self.saveToFile(self.filename); self.saveToFile(self.filename);
@classmethod @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. ''' The preferred method for loading Minecraft levels of any type.
pass False to loadInfinite if you'd rather not load infdev levels.''' pass False to loadInfinite if you'd rather not load infdev levels.'''
info( u"Identifying " + filename ) info( u"Identifying " + filename )
@ -634,7 +634,7 @@ class MCLevel(object):
raise; raise;
try: try:
info( u"Can't read, attempting to open directory" ) 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." ) info( u"Detected Alpha world." )
return lev; return lev;
except Exception, ex: except Exception, ex: