added Entity class with position methods
This commit is contained in:
parent
73653c3130
commit
f95f6c6795
11
mclevel.py
11
mclevel.py
@ -4057,6 +4057,17 @@ class TileEntity(object):
|
|||||||
for a, p in zip('xyz', pos):
|
for a, p in zip('xyz', pos):
|
||||||
tag[a] = TAG_Int(p)
|
tag[a] = TAG_Int(p)
|
||||||
|
|
||||||
|
class Entity(object):
|
||||||
|
@classmethod
|
||||||
|
def pos(cls, tag):
|
||||||
|
if "Pos" not in tag:
|
||||||
|
print tag
|
||||||
|
return [a.value for a in tag["Pos"]]
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def setpos(cls, tag, pos):
|
||||||
|
tag["Pos"] = TAG_List([TAG_Int(p) for p in pos])
|
||||||
|
|
||||||
class MCAlphaDimension (MCInfdevOldLevel):
|
class MCAlphaDimension (MCInfdevOldLevel):
|
||||||
def loadLevelDat(self, create, random_seed, last_played):
|
def loadLevelDat(self, create, random_seed, last_played):
|
||||||
pass;
|
pass;
|
||||||
|
Reference in New Issue
Block a user