InfdevChunk now ensures that its entities' Motion and Position are lists of doubles. this fixes compatibility with indev worlds, mostly
This commit is contained in:
parent
e527de9d7f
commit
a3f0b16c47
@ -872,6 +872,19 @@ class InfdevChunk(EntityLevel):
|
||||
if Entities not in chunkTag[Level]:
|
||||
chunkTag[Level][Entities] = TAG_List();
|
||||
|
||||
def addEntity(self, entityTag):
|
||||
|
||||
def doubleize(name):
|
||||
if name in entityTag:
|
||||
m = entityTag[name]
|
||||
entityTag[name] = TAG_List([TAG_Double(i.value) for i in m])
|
||||
|
||||
doubleize("Motion")
|
||||
doubleize("Position")
|
||||
|
||||
self.dirty = True
|
||||
return super(InfdevChunk, self).addEntity(entityTag)
|
||||
|
||||
def removeEntitiesInBox(self, box):
|
||||
self.dirty = True;
|
||||
return super(InfdevChunk, self).removeEntitiesInBox(box)
|
||||
|
Reference in New Issue
Block a user