11use azalea_client:: { InConfigState , InGameState , test_utils:: prelude:: * } ;
2- use azalea_core:: { position:: ChunkPos , resource_location:: ResourceLocation } ;
2+ use azalea_core:: { position:: ChunkPos , resource_location:: Identifier } ;
33use azalea_entity:: LocalEntity ;
44use azalea_protocol:: packets:: {
55 ConnectionProtocol , Packet ,
@@ -19,11 +19,11 @@ fn test_change_dimension_to_nether_and_back() {
1919
2020fn generic_test_change_dimension_to_nether_and_back ( using_respawn : bool ) {
2121 let make_basic_login_or_respawn_packet = if using_respawn {
22- |dimension : DimensionType , instance_name : ResourceLocation | {
22+ |dimension : DimensionType , instance_name : Identifier | {
2323 make_basic_respawn_packet ( dimension, instance_name) . into_variant ( )
2424 }
2525 } else {
26- |dimension : DimensionType , instance_name : ResourceLocation | {
26+ |dimension : DimensionType , instance_name : Identifier | {
2727 make_basic_login_packet ( dimension, instance_name) . into_variant ( )
2828 }
2929 } ;
@@ -33,26 +33,26 @@ fn generic_test_change_dimension_to_nether_and_back(using_respawn: bool) {
3333 assert ! ( !simulation. has_component:: <InGameState >( ) ) ;
3434
3535 simulation. receive_packet ( ClientboundRegistryData {
36- registry_id : ResourceLocation :: new ( "minecraft:dimension_type" ) ,
36+ registry_id : Identifier :: new ( "minecraft:dimension_type" ) ,
3737 entries : vec ! [
3838 (
3939 // this dimension should never be created. it just exists to make sure we're not
4040 // hard-coding the dimension type id anywhere.
41- ResourceLocation :: new( "azalea:fakedimension" ) ,
41+ Identifier :: new( "azalea:fakedimension" ) ,
4242 Some ( NbtCompound :: from_values( vec![
4343 ( "height" . into( ) , NbtTag :: Int ( 16 ) ) ,
4444 ( "min_y" . into( ) , NbtTag :: Int ( 0 ) ) ,
4545 ] ) ) ,
4646 ) ,
4747 (
48- ResourceLocation :: new( "minecraft:overworld" ) ,
48+ Identifier :: new( "minecraft:overworld" ) ,
4949 Some ( NbtCompound :: from_values( vec![
5050 ( "height" . into( ) , NbtTag :: Int ( 384 ) ) ,
5151 ( "min_y" . into( ) , NbtTag :: Int ( -64 ) ) ,
5252 ] ) ) ,
5353 ) ,
5454 (
55- ResourceLocation :: new( "minecraft:nether" ) ,
55+ Identifier :: new( "minecraft:nether" ) ,
5656 Some ( NbtCompound :: from_values( vec![
5757 ( "height" . into( ) , NbtTag :: Int ( 256 ) ) ,
5858 ( "min_y" . into( ) , NbtTag :: Int ( 0 ) ) ,
@@ -76,13 +76,13 @@ fn generic_test_change_dimension_to_nether_and_back(using_respawn: bool) {
7676
7777 simulation. receive_packet ( make_basic_login_packet (
7878 DimensionType :: new_raw ( 1 ) , // overworld
79- ResourceLocation :: new ( "azalea:a" ) ,
79+ Identifier :: new ( "azalea:a" ) ,
8080 ) ) ;
8181 simulation. tick ( ) ;
8282
8383 assert_eq ! (
8484 * simulation. component:: <InstanceName >( ) ,
85- ResourceLocation :: new( "azalea:a" ) ,
85+ Identifier :: new( "azalea:a" ) ,
8686 "InstanceName should be azalea:a after setting dimension to that"
8787 ) ;
8888
@@ -99,7 +99,7 @@ fn generic_test_change_dimension_to_nether_and_back(using_respawn: bool) {
9999
100100 simulation. receive_packet ( make_basic_login_or_respawn_packet (
101101 DimensionType :: new_raw ( 2 ) , // nether
102- ResourceLocation :: new ( "azalea:b" ) ,
102+ Identifier :: new ( "azalea:b" ) ,
103103 ) ) ;
104104 simulation. tick ( ) ;
105105
@@ -109,7 +109,7 @@ fn generic_test_change_dimension_to_nether_and_back(using_respawn: bool) {
109109 ) ;
110110 assert_eq ! (
111111 * simulation. component:: <InstanceName >( ) ,
112- ResourceLocation :: new( "azalea:b" ) ,
112+ Identifier :: new( "azalea:b" ) ,
113113 "InstanceName should be azalea:b after changing dimensions to that"
114114 ) ;
115115
@@ -121,7 +121,7 @@ fn generic_test_change_dimension_to_nether_and_back(using_respawn: bool) {
121121 . expect ( "chunk should exist" ) ;
122122 simulation. receive_packet ( make_basic_login_or_respawn_packet (
123123 DimensionType :: new_raw ( 2 ) , // nether
124- ResourceLocation :: new ( "minecraft:nether" ) ,
124+ Identifier :: new ( "minecraft:nether" ) ,
125125 ) ) ;
126126 simulation. tick ( ) ;
127127
@@ -131,13 +131,13 @@ fn generic_test_change_dimension_to_nether_and_back(using_respawn: bool) {
131131
132132 simulation. receive_packet ( make_basic_login_packet (
133133 DimensionType :: new_raw ( 1 ) , // overworld
134- ResourceLocation :: new ( "azalea:a" ) ,
134+ Identifier :: new ( "azalea:a" ) ,
135135 ) ) ;
136136 simulation. tick ( ) ;
137137
138138 assert_eq ! (
139139 * simulation. component:: <InstanceName >( ) ,
140- ResourceLocation :: new( "azalea:a" ) ,
140+ Identifier :: new( "azalea:a" ) ,
141141 "InstanceName should be azalea:a after setting dimension back to that"
142142 ) ;
143143 assert ! (
0 commit comments