From fda5de7c546d3c337d1cfa50154088b81cdd7aa9 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Sun, 31 Oct 2010 13:58:55 -1000 Subject: [PATCH] removed absolute silliness in copyEntityWithOffset all we need to do is add the offset, believe it or not --- mclevel.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mclevel.py b/mclevel.py index f6a5e41..c3ade2d 100644 --- a/mclevel.py +++ b/mclevel.py @@ -774,9 +774,8 @@ class MCLevel(object): def copyEntityWithOffset(self, entity, copyOffset): eTag = deepcopy(entity) - eFloatOffsets = map(lambda pos:pos.value-int(pos.value), eTag[Pos]) - positionTags = map(lambda pos, off, co: nbt.TAG_Double(pos+co+off), map(lambda x:int(x.value), eTag[Pos]), eFloatOffsets, copyOffset) + positionTags = map(lambda p, co: nbt.TAG_Double(p.value+co), eTag[Pos], copyOffset) eTag[Pos] = nbt.TAG_List(positionTags) if eTag["id"].value == "Painting": @@ -803,8 +802,7 @@ class MCLevel(object): copyOffset = map(lambda x,y:x-y, destinationPoint, sourceBox.origin) for entity in chunk.Entities: - pos = map(lambda x:x.value, entity[Pos]) - x,y,z = [0 if isnan(p) else int(floor(p)) for p in pos]; + x,y,z = map(lambda x:x.value, entity[Pos]) if x-wx=slices[0].stop: continue if y=slices[2].stop: continue