aboutsummaryrefslogtreecommitdiff
path: root/codegen
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-05-25 20:28:46 -0500
committermat <github@matdoes.dev>2022-05-25 20:28:46 -0500
commit35511e83c3fc0d655686790ad662593f0406630a (patch)
tree9a29942402f2c31ed8bd325bd822451a1cbaf4ef /codegen
parent054c6e678bc015f674c2d15cb6432a46d81d5934 (diff)
downloadazalea-drasl-35511e83c3fc0d655686790ad662593f0406630a.tar.xz
more fix
Diffstat (limited to 'codegen')
-rw-r--r--codegen/lib/code/packet.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/codegen/lib/code/packet.py b/codegen/lib/code/packet.py
index 8563e5b9..427a2f3e 100644
--- a/codegen/lib/code/packet.py
+++ b/codegen/lib/code/packet.py
@@ -141,7 +141,7 @@ def set_packets(packet_ids: list[int], packet_class_names: list[str], direction:
continue
elif line.strip() == 'Clientbound => {':
new_mod_rs.append(line)
- if direction == 'serverbound':
+ if direction == 'clientbound':
ignore_lines = True
for packet_id, packet_class_name in zip(packet_ids, packet_class_names):
new_mod_rs.append(
@@ -211,7 +211,7 @@ def change_packet_ids(id_map: dict[int, int], direction: str, state: str):
set_packets(new_packet_ids, existing_packet_class_names, direction, state)
-def remove_packet_ids(packet_ids: list[int], direction: str, state: str):
+def remove_packet_ids(removing_packet_ids: list[int], direction: str, state: str):
existing_packet_ids, existing_packet_class_names = get_packets(
direction, state)
@@ -219,7 +219,7 @@ def remove_packet_ids(packet_ids: list[int], direction: str, state: str):
new_packet_class_names = []
for packet_id, packet_class_name in zip(existing_packet_ids, existing_packet_class_names):
- if packet_id not in packet_ids:
+ if packet_id not in removing_packet_ids:
new_packet_ids.append(packet_id)
new_packet_class_names.append(packet_class_name)