diff options
| -rw-r--r-- | azalea-core/src/identifier.rs | 6 | ||||
| -rw-r--r-- | azalea-registry/src/lib.rs | 2 | ||||
| -rw-r--r-- | codegen/lib/code/packet.py | 4 | ||||
| -rw-r--r-- | codegen/lib/code/utils.py | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/azalea-core/src/identifier.rs b/azalea-core/src/identifier.rs index d1e46aef..117bf26d 100644 --- a/azalea-core/src/identifier.rs +++ b/azalea-core/src/identifier.rs @@ -1,4 +1,4 @@ -//! An arbitrary string identifier. +//! An arbitrary identifier or resource location. use std::{ fmt, @@ -123,7 +123,7 @@ mod tests { use super::*; #[test] - fn basic_resource_location() { + fn basic_identifier() { let r = Identifier::new("abcdef:ghijkl"); assert_eq!(r.namespace, "abcdef"); assert_eq!(r.path, "ghijkl"); @@ -148,7 +148,7 @@ mod tests { } #[test] - fn azbuf_resource_location() { + fn azbuf_identifier() { let mut buf = Vec::new(); Identifier::new("minecraft:dirt") .azalea_write(&mut buf) diff --git a/azalea-registry/src/lib.rs b/azalea-registry/src/lib.rs index a3145b15..b16e572b 100644 --- a/azalea-registry/src/lib.rs +++ b/azalea-registry/src/lib.rs @@ -1638,7 +1638,7 @@ enum CommandArgumentKind { Team => "minecraft:team", ItemSlot => "minecraft:item_slot", ItemSlots => "minecraft:item_slots", - Identifier => "minecraft:resource_location", + ResourceLocation => "minecraft:resource_location", Function => "minecraft:function", EntityAnchor => "minecraft:entity_anchor", IntRange => "minecraft:int_range", diff --git a/codegen/lib/code/packet.py b/codegen/lib/code/packet.py index 1337ac2e..50d01ce2 100644 --- a/codegen/lib/code/packet.py +++ b/codegen/lib/code/packet.py @@ -118,9 +118,9 @@ def set_packets(packets_report): def packet_direction_report_to_packet_names(report): name_to_id = {} - for resource_location, packet in report.items(): + for identifier, packet in report.items(): packet_id = packet["protocol_id"] - name_to_id[resource_location.split(":")[-1]] = packet_id + name_to_id[identifier.split(":")[-1]] = packet_id names_sorted = [name for name in sorted(name_to_id, key=lambda x: name_to_id[x])] return names_sorted diff --git a/codegen/lib/code/utils.py b/codegen/lib/code/utils.py index bbb8f647..62b4627b 100644 --- a/codegen/lib/code/utils.py +++ b/codegen/lib/code/utils.py @@ -58,7 +58,7 @@ def burger_type_to_rust_type( uses.add("azalea_chat::FormattedText") elif burger_type == "identifier": field_type_rs = "Identifier" - uses.add("azalea_core::resource_location::Identifier") + uses.add("azalea_core::identifier::Identifier") elif burger_type == "uuid": field_type_rs = "Uuid" uses.add("uuid::Uuid") |
