aboutsummaryrefslogtreecommitdiff
path: root/codegen
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2023-03-23 13:55:33 +0000
committermat <github@matdoes.dev>2023-03-23 13:55:33 +0000
commitecb3f2ffd7dd4aa26213844a023e37fab4057ed0 (patch)
tree0cd0ea7eec8c05cdc8fae0a3ab15ef7c1402383c /codegen
parent2a07962af9a318114f38d3afe748a05212cfbd59 (diff)
downloadazalea-drasl-ecb3f2ffd7dd4aa26213844a023e37fab4057ed0.tar.xz
rename Tag to Nbt
Diffstat (limited to 'codegen')
-rw-r--r--codegen/lib/code/entity.py4
-rwxr-xr-xcodegen/lib/code/utils.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/codegen/lib/code/entity.py b/codegen/lib/code/entity.py
index 23a94c52..c787ffd4 100644
--- a/codegen/lib/code/entity.py
+++ b/codegen/lib/code/entity.py
@@ -399,7 +399,7 @@ impl From<EntityDataValue> for UpdateMetadataError {
if default is None:
# some types don't have Default implemented
if type_name == 'CompoundTag':
- default = 'azalea_nbt::Tag::Compound(Default::default())'
+ default = 'azalea_nbt::Nbt::Compound(Default::default())'
elif type_name == 'CatVariant':
default = 'azalea_registry::CatVariant::Tabby'
elif type_name == 'PaintingVariant':
@@ -433,7 +433,7 @@ impl From<EntityDataValue> for UpdateMetadataError {
elif type_name == 'OptionalFormattedText':
default = f'Some({default})' if default != 'Empty' else 'None'
elif type_name == 'CompoundTag':
- default = f'azalea_nbt::Tag::Compound({default})' if default != 'Empty' else 'azalea_nbt::Tag::Compound(Default::default())'
+ default = f'azalea_nbt::Nbt::Compound({default})' if default != 'Empty' else 'azalea_nbt::Nbt::Compound(Default::default())'
elif type_name == 'Quaternion':
default = f'Quaternion {{ x: {float(default["x"])}, y: {float(default["y"])}, z: {float(default["z"])}, w: {float(default["w"])} }}'
elif type_name == 'Vector3':
diff --git a/codegen/lib/code/utils.py b/codegen/lib/code/utils.py
index aaa166ff..3f9b6edb 100755
--- a/codegen/lib/code/utils.py
+++ b/codegen/lib/code/utils.py
@@ -56,7 +56,7 @@ def burger_type_to_rust_type(burger_type, field_name: Optional[str] = None, inst
field_type_rs = 'BlockPos'
uses.add('azalea_core::BlockPos')
elif burger_type == 'nbtcompound':
- field_type_rs = 'azalea_nbt::Tag'
+ field_type_rs = 'azalea_nbt::Nbt'
elif burger_type == 'itemstack':
field_type_rs = 'Slot'
uses.add('azalea_core::Slot')