aboutsummaryrefslogtreecommitdiff
path: root/codegen/lib/utils.py
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-06-21 21:20:09 -0500
committermat <github@matdoes.dev>2022-06-21 21:20:09 -0500
commit0d1e17197bf603d14241f89e9eb3572cf79766cb (patch)
tree1d23e133fedbc6a26b482b0305fb02f02598fd45 /codegen/lib/utils.py
parentefd874957331d8bff1cefa0f43d81685690391bf (diff)
parent317567b77a9e339b5dc9a4832b1ce4c6b045dfe7 (diff)
downloadazalea-drasl-0d1e17197bf603d14241f89e9eb3572cf79766cb.tar.xz
Merge branch 'main' into azalea-entity
Diffstat (limited to 'codegen/lib/utils.py')
-rw-r--r--codegen/lib/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/codegen/lib/utils.py b/codegen/lib/utils.py
index 3887bb35..c3d293c0 100644
--- a/codegen/lib/utils.py
+++ b/codegen/lib/utils.py
@@ -18,9 +18,11 @@ def to_camel_case(name: str):
s = f'_{s}'
return s
+
def upper_first_letter(name: str):
return name[0].upper() + name[1:]
+
def padded_hex(n: int):
return f'0x{n:02x}'
@@ -55,4 +57,4 @@ def group_packets(packets: list[PacketIdentifier]):
def get_dir_location(name: str):
- return os.path.join(os.path.dirname(__file__), '..', name)
+ return os.path.join(os.path.dirname(os.path.dirname(__file__)), name)