added Entity class with position methods
This commit is contained in:
parent
73653c3130
commit
f95f6c6795
11
mclevel.py
11
mclevel.py
@ -4056,6 +4056,17 @@ class TileEntity(object):
|
||||
def setpos(cls, tag, pos):
|
||||
for a, p in zip('xyz', pos):
|
||||
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):
|
||||
def loadLevelDat(self, create, random_seed, last_played):
|
||||
|
Reference in New Issue
Block a user