Skip to content

Commit

Permalink
Move server & client logic to interactions/
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsDrike committed May 18, 2024
1 parent 1f651ae commit 037d6bf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Empty file added mcproto/interaction/__init__.py
Empty file.
4 changes: 2 additions & 2 deletions mcproto/client.py → mcproto/interaction/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from mcproto.auth.account import Account
from mcproto.connection import TCPAsyncConnection
from mcproto.encryption import encrypt_token_and_secret, generate_shared_secret
from mcproto.exceptions import InvalidGameStateError, UnexpectedPacketError
from mcproto.interaction.exceptions import InvalidGameStateError, UnexpectedPacketError
from mcproto.multiplayer import compute_server_hash, join_request
from mcproto.packets.handshaking.handshake import Handshake, NextState
from mcproto.packets.interactions import async_read_packet, async_write_packet
Expand Down Expand Up @@ -41,7 +41,7 @@ class Client:
"packet_compression_threshold",
)

def __init__( # noqa: PLR0913
def __init__(
self,
host: str,
port: int,
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions mcproto/server.py → mcproto/interaction/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from mcproto.connection import TCPAsyncConnection
from mcproto.encryption import decrypt_token_and_secret, generate_rsa_key, generate_verify_token
from mcproto.exceptions import InvalidVerifyTokenError, UnexpectedPacketError
from mcproto.interaction.exceptions import InvalidVerifyTokenError, UnexpectedPacketError
from mcproto.multiplayer import compute_server_hash, join_check
from mcproto.packets.handshaking.handshake import Handshake, NextState
from mcproto.packets.interactions import async_read_packet, async_write_packet
Expand Down Expand Up @@ -107,7 +107,7 @@ class Server:
"prevent_proxy_connections",
)

def __init__( # noqa: PLR0913
def __init__(
self,
host: str,
port: int,
Expand Down

0 comments on commit 037d6bf

Please sign in to comment.