rename playerOrientation to getPlayerOrientation
This commit is contained in:
parent
c50a73fb2b
commit
f31b81cfe9
2
indev.py
2
indev.py
@ -115,7 +115,7 @@ class MCIndevLevel(EntityLevel):
|
|||||||
if x["id"].value == "LocalPlayer":
|
if x["id"].value == "LocalPlayer":
|
||||||
x["Rotation"] = TAG_List([TAG_Float(p) for p in yp])
|
x["Rotation"] = TAG_List([TAG_Float(p) for p in yp])
|
||||||
|
|
||||||
def playerOrientation(self, player="Ignored"):
|
def getPlayerOrientation(self, player="Ignored"):
|
||||||
""" returns (yaw, pitch) """
|
""" returns (yaw, pitch) """
|
||||||
for x in self.root_tag["Entities"]:
|
for x in self.root_tag["Entities"]:
|
||||||
if x["id"].value == "LocalPlayer":
|
if x["id"].value == "LocalPlayer":
|
||||||
|
@ -2989,7 +2989,7 @@ class MCInfdevOldLevel(ChunkedLevelMixin, EntityLevel):
|
|||||||
def setPlayerOrientation(self, yp, player="Player"):
|
def setPlayerOrientation(self, yp, player="Player"):
|
||||||
self.getPlayerTag(player)["Rotation"] = nbt.TAG_List([nbt.TAG_Float(p) for p in yp])
|
self.getPlayerTag(player)["Rotation"] = nbt.TAG_List([nbt.TAG_Float(p) for p in yp])
|
||||||
|
|
||||||
def playerOrientation(self, player="Player"):
|
def getPlayerOrientation(self, player="Player"):
|
||||||
""" returns (yaw, pitch) """
|
""" returns (yaw, pitch) """
|
||||||
yp = map(lambda x:x.value, self.getPlayerTag(player)["Rotation"]);
|
yp = map(lambda x:x.value, self.getPlayerTag(player)["Rotation"]);
|
||||||
y, p = yp;
|
y, p = yp;
|
||||||
|
2
level.py
2
level.py
@ -556,7 +556,7 @@ class MCLevel(object):
|
|||||||
def setPlayerOrientation(self, yp, player="Player"):
|
def setPlayerOrientation(self, yp, player="Player"):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def playerOrientation(self, player="Player"):
|
def getPlayerOrientation(self, player="Player"):
|
||||||
return (-45., 0.)
|
return (-45., 0.)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user