Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyncraft/minecraft.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def setTilePos(self, ID, x:int, y:int, z:int) -> None:

def getDirection(self, ID) -> Vec3:
"""Get direction of the entity"""
s = self.conn.sendReceive(self.pkg + b".getDirection", id)
s = self.conn.sendReceive(self.pkg + b".getDirection", ID)
return Vec3(*list(s.split(",")))

def setDirection(self, ID, x:float, y:float, z:float) -> None:
Expand Down Expand Up @@ -132,7 +132,7 @@ def setHealth(self, health:float) -> None:
self.conn.send(self.pkg + b".setHealth", self.playerId, health)

def sendTitle(self, title:str, subTitle:str="", fadeIn:int=10, stay:int=70, fadeOut:int=20) -> None:
self.conn.send(self.pkg + b".sendTitle", id, title, subTitle, fadeIn, stay, fadeOut)
self.conn.send(self.pkg + b".sendTitle", self.playerId, title, subTitle, fadeIn, stay, fadeOut)

class CmdPlayerEntity(CmdPlayer):
""" use entity to build a player """
Expand Down