feat: added clone method to BlockPos
This commit is contained in:
parent
7327d4764d
commit
eb934a5a06
2 changed files with 4 additions and 0 deletions
|
@ -71,6 +71,7 @@ class MinecraftClient:
|
|||
return self.dispatcher.connected
|
||||
|
||||
async def write(self, packet:Packet, wait:bool=False):
|
||||
# TODO get rid of this, too many ways to do one thing...
|
||||
await self.dispatcher.write(packet, wait)
|
||||
|
||||
async def authenticate(self):
|
||||
|
|
|
@ -97,6 +97,9 @@ class BlockPos:
|
|||
and (self.y - other.y) < threshold \
|
||||
and (self.z - other.z) < threshold
|
||||
|
||||
def clone(self) -> 'BlockPos':
|
||||
return BlockPos(self.x, self.y, self.z)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"{self.__class__.__name__}(x={self.x},y={self.y},z={self.z})"
|
||||
|
||||
|
|
Loading…
Reference in a new issue