From 2597e92b8fd529e65e680c721d042e1740d7061f Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Dec 2022 16:51:05 -0800 Subject: [PATCH] Reorganize Packages (#180) Moves all the packages to the `crates/` directory. --- .gitignore | 4 +- Cargo.toml | 80 +------------------ .../bench_players/Cargo.toml | 3 +- .../bench_players}/README.md | 0 .../bench_players/src/main.rs | 0 .../packet_inspector}/Cargo.toml | 0 .../packet_inspector}/README.md | 0 .../packet_inspector}/src/main.rs | 0 crates/valence/Cargo.toml | 67 ++++++++++++++++ {build => crates/valence/build}/entity.rs | 32 ++++---- .../valence/build}/entity_event.rs | 2 +- {build => crates/valence/build}/main.rs | 0 .../valence/examples}/biomes.rs | 6 +- .../valence/examples}/building.rs | 6 +- .../valence/examples}/chest.rs | 0 .../valence/examples}/combat.rs | 6 +- .../valence/examples}/conway.rs | 6 +- .../valence/examples}/cow_sphere.rs | 6 +- .../valence/examples}/death.rs | 6 +- .../valence/examples}/entity_raycast.rs | 6 +- .../valence/examples}/inventory_piano.rs | 6 +- .../valence/examples}/parkour.rs | 6 +- .../valence/examples}/particles.rs | 6 +- .../valence/examples}/resource_pack.rs | 6 +- .../valence/examples}/terrain.rs | 6 +- {examples => crates/valence/examples}/text.rs | 6 +- {src => crates/valence/src}/biome.rs | 0 {src => crates/valence/src}/chunk.rs | 0 .../valence/src}/chunk/entity_partition.rs | 0 .../valence/src}/chunk/paletted_container.rs | 0 {src => crates/valence/src}/chunk/pos.rs | 0 {src => crates/valence/src}/client.rs | 0 {src => crates/valence/src}/client/event.rs | 0 {src => crates/valence/src}/config.rs | 0 {src => crates/valence/src}/dimension.rs | 0 {src => crates/valence/src}/entity.rs | 0 {src => crates/valence/src}/entity/data.rs | 0 {src => crates/valence/src}/inventory.rs | 0 {src => crates/valence/src}/lib.rs | 0 {src => crates/valence/src}/packet.rs | 0 {src => crates/valence/src}/player_list.rs | 0 .../valence/src}/player_textures.rs | 0 {src => crates/valence/src}/server.rs | 0 .../valence/src}/server/byte_channel.rs | 0 {src => crates/valence/src}/server/login.rs | 0 .../valence/src}/server/packet_manager.rs | 0 {src => crates/valence/src}/slab.rs | 0 {src => crates/valence/src}/slab_rc.rs | 0 {src => crates/valence/src}/slab_versioned.rs | 0 {src => crates/valence/src}/util.rs | 0 {src => crates/valence/src}/world.rs | 0 .../valence_anvil}/Cargo.toml | 4 +- .../valence_anvil}/benches/world_parsing.rs | 0 .../examples/valence_loading.rs | 2 +- .../valence_anvil}/src/lib.rs | 0 .../valence_anvil}/src/to_valence.rs | 0 .../valence_derive}/Cargo.toml | 1 - .../valence_derive}/src/decode.rs | 0 .../valence_derive}/src/encode.rs | 0 .../valence_derive}/src/lib.rs | 0 .../valence_nbt}/Cargo.toml | 0 {valence_nbt => crates/valence_nbt}/README.md | 0 .../valence_nbt}/src/compound.rs | 0 .../valence_nbt}/src/error.rs | 0 .../valence_nbt}/src/from_binary_slice.rs | 0 .../valence_nbt}/src/lib.rs | 0 .../valence_nbt}/src/modified_utf8.rs | 0 .../valence_nbt}/src/tag.rs | 0 .../valence_nbt}/src/tests.rs | 0 .../valence_nbt}/src/to_binary_writer.rs | 0 .../valence_nbt}/src/value.rs | 0 .../valence_protocol}/Cargo.toml | 0 .../valence_protocol}/benches/benches.rs | 0 .../valence_protocol}/build/block.rs | 2 +- .../valence_protocol}/build/enchant.rs | 2 +- .../valence_protocol}/build/item.rs | 2 +- .../valence_protocol}/build/main.rs | 0 .../build/translation_key.rs | 2 +- .../valence_protocol}/src/array.rs | 0 .../valence_protocol}/src/block.rs | 0 .../valence_protocol}/src/block_pos.rs | 0 .../valence_protocol}/src/bounded.rs | 0 .../valence_protocol}/src/byte_angle.rs | 0 .../valence_protocol}/src/codec.rs | 0 .../valence_protocol}/src/enchant.rs | 0 .../valence_protocol}/src/entity_meta.rs | 0 .../valence_protocol}/src/ident.rs | 0 .../valence_protocol}/src/impls.rs | 0 .../valence_protocol}/src/inventory.rs | 0 .../valence_protocol}/src/item.rs | 0 .../valence_protocol}/src/lib.rs | 0 .../valence_protocol}/src/packets.rs | 0 .../valence_protocol}/src/packets/c2s.rs | 0 .../valence_protocol}/src/packets/s2c.rs | 0 .../valence_protocol}/src/particle.rs | 0 .../valence_protocol}/src/player_list.rs | 0 .../valence_protocol}/src/raw_bytes.rs | 0 .../valence_protocol}/src/text.rs | 0 .../valence_protocol}/src/translation_key.rs | 0 .../valence_protocol}/src/types.rs | 0 .../valence_protocol}/src/username.rs | 0 .../valence_protocol}/src/var_int.rs | 0 .../valence_protocol}/src/var_long.rs | 0 .../valence_spatial_index}/Cargo.toml | 0 .../valence_spatial_index}/src/bvh.rs | 0 .../valence_spatial_index}/src/lib.rs | 0 106 files changed, 162 insertions(+), 119 deletions(-) rename {benchmarks => crates}/bench_players/Cargo.toml (77%) rename {benchmarks => crates/bench_players}/README.md (100%) rename {benchmarks => crates}/bench_players/src/main.rs (100%) rename {packet_inspector => crates/packet_inspector}/Cargo.toml (100%) rename {packet_inspector => crates/packet_inspector}/README.md (100%) rename {packet_inspector => crates/packet_inspector}/src/main.rs (100%) create mode 100644 crates/valence/Cargo.toml rename {build => crates/valence/build}/entity.rs (96%) rename {build => crates/valence/build}/entity_event.rs (95%) rename {build => crates/valence/build}/main.rs (100%) rename {examples => crates/valence/examples}/biomes.rs (97%) rename {examples => crates/valence/examples}/building.rs (97%) rename {examples => crates/valence/examples}/chest.rs (100%) rename {examples => crates/valence/examples}/combat.rs (98%) rename {examples => crates/valence/examples}/conway.rs (98%) rename {examples => crates/valence/examples}/cow_sphere.rs (97%) rename {examples => crates/valence/examples}/death.rs (98%) rename {examples => crates/valence/examples}/entity_raycast.rs (98%) rename {examples => crates/valence/examples}/inventory_piano.rs (97%) rename {examples => crates/valence/examples}/parkour.rs (98%) rename {examples => crates/valence/examples}/particles.rs (98%) rename {examples => crates/valence/examples}/resource_pack.rs (97%) rename {examples => crates/valence/examples}/terrain.rs (98%) rename {examples => crates/valence/examples}/text.rs (97%) rename {src => crates/valence/src}/biome.rs (100%) rename {src => crates/valence/src}/chunk.rs (100%) rename {src => crates/valence/src}/chunk/entity_partition.rs (100%) rename {src => crates/valence/src}/chunk/paletted_container.rs (100%) rename {src => crates/valence/src}/chunk/pos.rs (100%) rename {src => crates/valence/src}/client.rs (100%) rename {src => crates/valence/src}/client/event.rs (100%) rename {src => crates/valence/src}/config.rs (100%) rename {src => crates/valence/src}/dimension.rs (100%) rename {src => crates/valence/src}/entity.rs (100%) rename {src => crates/valence/src}/entity/data.rs (100%) rename {src => crates/valence/src}/inventory.rs (100%) rename {src => crates/valence/src}/lib.rs (100%) rename {src => crates/valence/src}/packet.rs (100%) rename {src => crates/valence/src}/player_list.rs (100%) rename {src => crates/valence/src}/player_textures.rs (100%) rename {src => crates/valence/src}/server.rs (100%) rename {src => crates/valence/src}/server/byte_channel.rs (100%) rename {src => crates/valence/src}/server/login.rs (100%) rename {src => crates/valence/src}/server/packet_manager.rs (100%) rename {src => crates/valence/src}/slab.rs (100%) rename {src => crates/valence/src}/slab_rc.rs (100%) rename {src => crates/valence/src}/slab_versioned.rs (100%) rename {src => crates/valence/src}/util.rs (100%) rename {src => crates/valence/src}/world.rs (100%) rename {valence_anvil => crates/valence_anvil}/Cargo.toml (89%) rename {valence_anvil => crates/valence_anvil}/benches/world_parsing.rs (100%) rename {valence_anvil => crates/valence_anvil}/examples/valence_loading.rs (99%) rename {valence_anvil => crates/valence_anvil}/src/lib.rs (100%) rename {valence_anvil => crates/valence_anvil}/src/to_valence.rs (100%) rename {valence_derive => crates/valence_derive}/Cargo.toml (99%) rename {valence_derive => crates/valence_derive}/src/decode.rs (100%) rename {valence_derive => crates/valence_derive}/src/encode.rs (100%) rename {valence_derive => crates/valence_derive}/src/lib.rs (100%) rename {valence_nbt => crates/valence_nbt}/Cargo.toml (100%) rename {valence_nbt => crates/valence_nbt}/README.md (100%) rename {valence_nbt => crates/valence_nbt}/src/compound.rs (100%) rename {valence_nbt => crates/valence_nbt}/src/error.rs (100%) rename {valence_nbt => crates/valence_nbt}/src/from_binary_slice.rs (100%) rename {valence_nbt => crates/valence_nbt}/src/lib.rs (100%) rename {valence_nbt => crates/valence_nbt}/src/modified_utf8.rs (100%) rename {valence_nbt => crates/valence_nbt}/src/tag.rs (100%) rename {valence_nbt => crates/valence_nbt}/src/tests.rs (100%) rename {valence_nbt => crates/valence_nbt}/src/to_binary_writer.rs (100%) rename {valence_nbt => crates/valence_nbt}/src/value.rs (100%) rename {valence_protocol => crates/valence_protocol}/Cargo.toml (100%) rename {valence_protocol => crates/valence_protocol}/benches/benches.rs (100%) rename {valence_protocol => crates/valence_protocol}/build/block.rs (99%) rename {valence_protocol => crates/valence_protocol}/build/enchant.rs (98%) rename {valence_protocol => crates/valence_protocol}/build/item.rs (99%) rename {valence_protocol => crates/valence_protocol}/build/main.rs (100%) rename {valence_protocol => crates/valence_protocol}/build/translation_key.rs (95%) rename {valence_protocol => crates/valence_protocol}/src/array.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/block.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/block_pos.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/bounded.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/byte_angle.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/codec.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/enchant.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/entity_meta.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/ident.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/impls.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/inventory.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/item.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/lib.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/packets.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/packets/c2s.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/packets/s2c.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/particle.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/player_list.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/raw_bytes.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/text.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/translation_key.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/types.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/username.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/var_int.rs (100%) rename {valence_protocol => crates/valence_protocol}/src/var_long.rs (100%) rename {valence_spatial_index => crates/valence_spatial_index}/Cargo.toml (100%) rename {valence_spatial_index => crates/valence_spatial_index}/src/bvh.rs (100%) rename {valence_spatial_index => crates/valence_spatial_index}/src/lib.rs (100%) diff --git a/.gitignore b/.gitignore index 546f059..95163d9 100644 --- a/.gitignore +++ b/.gitignore @@ -8,9 +8,9 @@ Cargo.lock /extractor/out /extractor/classes /extractor/run -/benchmarks/rust-mc-bot +/crates/*/rust-mc-bot +.asset_cache/ /velocity flamegraph.svg perf.data perf.data.old -/valence_anvil/.asset_cache/ diff --git a/Cargo.toml b/Cargo.toml index c37d5a8..006314c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,82 +1,6 @@ -[package] -name = "valence" -version = "0.2.0+mc1.19.3" -edition = "2021" -description = "A framework for building Minecraft servers in Rust." -repository = "https://github.com/rj00a/valence" -readme = "README.md" -license = "MIT" -keywords = ["minecraft", "gamedev", "server"] -categories = ["game-engines"] -build = "build/main.rs" -authors = ["Ryan Johnson "] - -[dependencies] -anyhow = "1.0.65" -arrayvec = "0.7.2" -async-trait = "0.1.57" -base64 = "0.13.0" -bitfield-struct = "0.1.8" -bytes = "1.2.1" -flume = "0.10.14" -futures = "0.3.24" -hmac = "0.12.1" -num = "0.4.0" -paste = "1.0.9" -rand = "0.8.5" -rayon = "1.5.3" -rsa = "0.6.1" -rsa-der = "0.3.0" -rustc-hash = "1.1.0" -serde = { version = "1.0.145", features = ["derive"] } -serde_json = "1.0.85" -sha1 = "0.10.5" -sha2 = "0.10.6" -thiserror = "1.0.35" -tracing = "0.1.37" -url = { version = "2.2.2", features = ["serde"] } -uuid = { version = "1.1.2", features = ["serde"] } -valence_nbt = { version = "0.5.0", path = "valence_nbt" } -valence_protocol = { version = "0.1.0", path = "valence_protocol", features = ["encryption", "compression"] } -vek = "0.15.8" - -[dependencies.tokio] -version = "1.21.2" -features = ["macros", "rt-multi-thread", "net", "io-util", "sync", "time"] - -[dependencies.reqwest] -version = "0.11.12" -default-features = false -# Avoid OpenSSL dependency on Linux. -features = ["rustls-tls", "json"] - -[dev-dependencies] -approx = "0.5.1" -tracing-subscriber = "0.3.16" -noise = "0.8.2" -valence_spatial_index = { path = "valence_spatial_index", version = "0.1.0" } - -[build-dependencies] -anyhow = "1.0.65" -heck = "0.4.0" -proc-macro2 = "1.0.43" -quote = "1.0.21" -serde = { version = "1.0.145", features = ["derive"] } -serde_json = "1.0.85" -rayon = "1.5.3" -num = "0.4.0" - [workspace] -members = [ - "valence_derive", - "valence_nbt", - "valence_anvil", - "valence_protocol", - "valence_spatial_index", - "packet_inspector", - "benchmarks/bench_players" -] -exclude = ["benchmarks/rust-mc-bot"] +members = ["crates/*"] +exclude = ["crates/*/rust-mc-bot"] [profile.dev.package."*"] opt-level = 3 diff --git a/benchmarks/bench_players/Cargo.toml b/crates/bench_players/Cargo.toml similarity index 77% rename from benchmarks/bench_players/Cargo.toml rename to crates/bench_players/Cargo.toml index c81c194..00141e0 100644 --- a/benchmarks/bench_players/Cargo.toml +++ b/crates/bench_players/Cargo.toml @@ -5,5 +5,4 @@ edition = "2021" [dependencies] tracing-subscriber = "0.3.16" -valence = { path = "../.." } - +valence = { path = "../valence" } diff --git a/benchmarks/README.md b/crates/bench_players/README.md similarity index 100% rename from benchmarks/README.md rename to crates/bench_players/README.md diff --git a/benchmarks/bench_players/src/main.rs b/crates/bench_players/src/main.rs similarity index 100% rename from benchmarks/bench_players/src/main.rs rename to crates/bench_players/src/main.rs diff --git a/packet_inspector/Cargo.toml b/crates/packet_inspector/Cargo.toml similarity index 100% rename from packet_inspector/Cargo.toml rename to crates/packet_inspector/Cargo.toml diff --git a/packet_inspector/README.md b/crates/packet_inspector/README.md similarity index 100% rename from packet_inspector/README.md rename to crates/packet_inspector/README.md diff --git a/packet_inspector/src/main.rs b/crates/packet_inspector/src/main.rs similarity index 100% rename from packet_inspector/src/main.rs rename to crates/packet_inspector/src/main.rs diff --git a/crates/valence/Cargo.toml b/crates/valence/Cargo.toml new file mode 100644 index 0000000..5eb9d17 --- /dev/null +++ b/crates/valence/Cargo.toml @@ -0,0 +1,67 @@ +[package] +name = "valence" +version = "0.2.0+mc1.19.3" +edition = "2021" +description = "A framework for building Minecraft servers in Rust." +repository = "https://github.com/rj00a/valence" +readme = "README.md" +license = "MIT" +keywords = ["minecraft", "gamedev", "server"] +categories = ["game-engines"] +build = "build/main.rs" +authors = ["Ryan Johnson "] + +[dependencies] +anyhow = "1.0.65" +arrayvec = "0.7.2" +async-trait = "0.1.57" +base64 = "0.13.0" +bitfield-struct = "0.1.8" +bytes = "1.2.1" +flume = "0.10.14" +futures = "0.3.24" +hmac = "0.12.1" +num = "0.4.0" +paste = "1.0.9" +rand = "0.8.5" +rayon = "1.5.3" +rsa = "0.6.1" +rsa-der = "0.3.0" +rustc-hash = "1.1.0" +serde = { version = "1.0.145", features = ["derive"] } +serde_json = "1.0.85" +sha1 = "0.10.5" +sha2 = "0.10.6" +thiserror = "1.0.35" +tracing = "0.1.37" +url = { version = "2.2.2", features = ["serde"] } +uuid = { version = "1.1.2", features = ["serde"] } +valence_nbt = { version = "0.5.0", path = "../valence_nbt" } +valence_protocol = { version = "0.1.0", path = "../valence_protocol", features = ["encryption", "compression"] } +vek = "0.15.8" + +[dependencies.tokio] +version = "1.21.2" +features = ["macros", "rt-multi-thread", "net", "io-util", "sync", "time"] + +[dependencies.reqwest] +version = "0.11.12" +default-features = false +# Avoid OpenSSL dependency on Linux. +features = ["rustls-tls", "json"] + +[dev-dependencies] +approx = "0.5.1" +tracing-subscriber = "0.3.16" +noise = "0.8.2" +valence_spatial_index = { path = "../valence_spatial_index", version = "0.1.0" } + +[build-dependencies] +anyhow = "1.0.65" +heck = "0.4.0" +proc-macro2 = "1.0.43" +quote = "1.0.21" +serde = { version = "1.0.145", features = ["derive"] } +serde_json = "1.0.85" +rayon = "1.5.3" +num = "0.4.0" diff --git a/build/entity.rs b/crates/valence/build/entity.rs similarity index 96% rename from build/entity.rs rename to crates/valence/build/entity.rs index 3ae1647..7f8bd77 100644 --- a/build/entity.rs +++ b/crates/valence/build/entity.rs @@ -240,24 +240,26 @@ impl Value { type Entities = BTreeMap; pub fn build() -> anyhow::Result { - let entities = serde_json::from_str::(include_str!("../extracted/entities.json"))? - .into_iter() - .map(|(k, mut v)| { - let strip = |s: String| { - if let Some(stripped) = s.strip_suffix("Entity") { - if !stripped.is_empty() { - return stripped.to_owned(); + let entities = + serde_json::from_str::(include_str!("../../../extracted/entities.json"))? + .into_iter() + .map(|(k, mut v)| { + let strip = |s: String| { + if let Some(stripped) = s.strip_suffix("Entity") { + if !stripped.is_empty() { + return stripped.to_owned(); + } } - } - s - }; - v.parent = v.parent.map(strip); - (strip(k), v) - }) - .collect::(); + s + }; + v.parent = v.parent.map(strip); + (strip(k), v) + }) + .collect::(); let entity_types = - serde_json::from_str::(include_str!("../extracted/entity_data.json"))?.types; + serde_json::from_str::(include_str!("../../../extracted/entity_data.json"))? + .types; let concrete_entities = entities .clone() diff --git a/build/entity_event.rs b/crates/valence/build/entity_event.rs similarity index 95% rename from build/entity_event.rs rename to crates/valence/build/entity_event.rs index d4deae3..eeae2a6 100644 --- a/build/entity_event.rs +++ b/crates/valence/build/entity_event.rs @@ -15,7 +15,7 @@ struct EntityData { pub fn build() -> anyhow::Result { let entity_data: EntityData = - serde_json::from_str(include_str!("../extracted/entity_data.json"))?; + serde_json::from_str(include_str!("../../../extracted/entity_data.json"))?; let mut statuses: Vec<_> = entity_data.statuses.into_iter().collect(); statuses.sort_by_key(|(_, id)| *id); diff --git a/build/main.rs b/crates/valence/build/main.rs similarity index 100% rename from build/main.rs rename to crates/valence/build/main.rs diff --git a/examples/biomes.rs b/crates/valence/examples/biomes.rs similarity index 97% rename from examples/biomes.rs rename to crates/valence/examples/biomes.rs index 44f8f90..a8172c8 100644 --- a/examples/biomes.rs +++ b/crates/valence/examples/biomes.rs @@ -82,7 +82,11 @@ impl Config for Game { max_players: MAX_PLAYERS as i32, player_sample: Default::default(), description: "Hello Valence!".color(Color::AQUA), - favicon_png: Some(include_bytes!("../assets/logo-64x64.png").as_slice().into()), + favicon_png: Some( + include_bytes!("../../../assets/logo-64x64.png") + .as_slice() + .into(), + ), } } diff --git a/examples/building.rs b/crates/valence/examples/building.rs similarity index 97% rename from examples/building.rs rename to crates/valence/examples/building.rs index ead06df..3c1098f 100644 --- a/examples/building.rs +++ b/crates/valence/examples/building.rs @@ -60,7 +60,11 @@ impl Config for Game { max_players: MAX_PLAYERS as i32, player_sample: Default::default(), description: "Hello Valence!".color(Color::AQUA), - favicon_png: Some(include_bytes!("../assets/logo-64x64.png").as_slice().into()), + favicon_png: Some( + include_bytes!("../../../assets/logo-64x64.png") + .as_slice() + .into(), + ), } } diff --git a/examples/chest.rs b/crates/valence/examples/chest.rs similarity index 100% rename from examples/chest.rs rename to crates/valence/examples/chest.rs diff --git a/examples/combat.rs b/crates/valence/examples/combat.rs similarity index 98% rename from examples/combat.rs rename to crates/valence/examples/combat.rs index 7ba287f..77311ea 100644 --- a/examples/combat.rs +++ b/crates/valence/examples/combat.rs @@ -60,7 +60,11 @@ impl Config for Game { max_players: MAX_PLAYERS as i32, player_sample: Default::default(), description: "Hello Valence!".color(Color::AQUA), - favicon_png: Some(include_bytes!("../assets/logo-64x64.png").as_slice().into()), + favicon_png: Some( + include_bytes!("../../../assets/logo-64x64.png") + .as_slice() + .into(), + ), } } diff --git a/examples/conway.rs b/crates/valence/examples/conway.rs similarity index 98% rename from examples/conway.rs rename to crates/valence/examples/conway.rs index 2e13cb9..aae3263 100644 --- a/examples/conway.rs +++ b/crates/valence/examples/conway.rs @@ -80,7 +80,11 @@ impl Config for Game { max_players: MAX_PLAYERS as i32, player_sample: Default::default(), description: "Hello Valence!".color(Color::AQUA), - favicon_png: Some(include_bytes!("../assets/logo-64x64.png").as_slice().into()), + favicon_png: Some( + include_bytes!("../../../assets/logo-64x64.png") + .as_slice() + .into(), + ), } } diff --git a/examples/cow_sphere.rs b/crates/valence/examples/cow_sphere.rs similarity index 97% rename from examples/cow_sphere.rs rename to crates/valence/examples/cow_sphere.rs index ebf7128..df5a787 100644 --- a/examples/cow_sphere.rs +++ b/crates/valence/examples/cow_sphere.rs @@ -69,7 +69,11 @@ impl Config for Game { max_players: MAX_PLAYERS as i32, player_sample: SAMPLE.into(), description: "Hello Valence!".color(Color::AQUA), - favicon_png: Some(include_bytes!("../assets/logo-64x64.png").as_slice().into()), + favicon_png: Some( + include_bytes!("../../../assets/logo-64x64.png") + .as_slice() + .into(), + ), } } diff --git a/examples/death.rs b/crates/valence/examples/death.rs similarity index 98% rename from examples/death.rs rename to crates/valence/examples/death.rs index 933ef84..9f46bc0 100644 --- a/examples/death.rs +++ b/crates/valence/examples/death.rs @@ -96,7 +96,11 @@ impl Config for Game { online_players: self.player_count.load(Ordering::SeqCst) as i32, max_players: MAX_PLAYERS as i32, description: "Hello Valence!".color(Color::AQUA), - favicon_png: Some(include_bytes!("../assets/logo-64x64.png").as_slice().into()), + favicon_png: Some( + include_bytes!("../../../assets/logo-64x64.png") + .as_slice() + .into(), + ), player_sample: Default::default(), } } diff --git a/examples/entity_raycast.rs b/crates/valence/examples/entity_raycast.rs similarity index 98% rename from examples/entity_raycast.rs rename to crates/valence/examples/entity_raycast.rs index 52a5d61..ce53d09 100644 --- a/examples/entity_raycast.rs +++ b/crates/valence/examples/entity_raycast.rs @@ -67,7 +67,11 @@ impl Config for Game { max_players: MAX_PLAYERS as i32, player_sample: Default::default(), description: "Hello Valence!".color(Color::AQUA), - favicon_png: Some(include_bytes!("../assets/logo-64x64.png").as_slice().into()), + favicon_png: Some( + include_bytes!("../../../assets/logo-64x64.png") + .as_slice() + .into(), + ), } } diff --git a/examples/inventory_piano.rs b/crates/valence/examples/inventory_piano.rs similarity index 97% rename from examples/inventory_piano.rs rename to crates/valence/examples/inventory_piano.rs index 08e66fb..f8b6865 100644 --- a/examples/inventory_piano.rs +++ b/crates/valence/examples/inventory_piano.rs @@ -67,7 +67,11 @@ impl Config for Game { max_players: MAX_PLAYERS as i32, player_sample: Default::default(), description: "Hello Valence!".color(Color::AQUA), - favicon_png: Some(include_bytes!("../assets/logo-64x64.png").as_slice().into()), + favicon_png: Some( + include_bytes!("../../../assets/logo-64x64.png") + .as_slice() + .into(), + ), } } diff --git a/examples/parkour.rs b/crates/valence/examples/parkour.rs similarity index 98% rename from examples/parkour.rs rename to crates/valence/examples/parkour.rs index 9d342eb..fc58c7b 100644 --- a/examples/parkour.rs +++ b/crates/valence/examples/parkour.rs @@ -72,7 +72,11 @@ impl Config for Game { max_players: MAX_PLAYERS as i32, player_sample: Default::default(), description: "Hello Valence!".color(Color::AQUA), - favicon_png: Some(include_bytes!("../assets/logo-64x64.png").as_slice().into()), + favicon_png: Some( + include_bytes!("../../../assets/logo-64x64.png") + .as_slice() + .into(), + ), } } diff --git a/examples/particles.rs b/crates/valence/examples/particles.rs similarity index 98% rename from examples/particles.rs rename to crates/valence/examples/particles.rs index 0162c05..1100841 100644 --- a/examples/particles.rs +++ b/crates/valence/examples/particles.rs @@ -54,7 +54,11 @@ impl Config for Game { max_players: MAX_PLAYERS as i32, player_sample: Default::default(), description: "Hello Valence!".color(Color::AQUA), - favicon_png: Some(include_bytes!("../assets/logo-64x64.png").as_slice().into()), + favicon_png: Some( + include_bytes!("../../../assets/logo-64x64.png") + .as_slice() + .into(), + ), } } diff --git a/examples/resource_pack.rs b/crates/valence/examples/resource_pack.rs similarity index 97% rename from examples/resource_pack.rs rename to crates/valence/examples/resource_pack.rs index d4b8805..1c3f51c 100644 --- a/examples/resource_pack.rs +++ b/crates/valence/examples/resource_pack.rs @@ -57,7 +57,11 @@ impl Config for Game { max_players: MAX_PLAYERS as i32, player_sample: Default::default(), description: "Hello Valence!".color(Color::AQUA), - favicon_png: Some(include_bytes!("../assets/logo-64x64.png").as_slice().into()), + favicon_png: Some( + include_bytes!("../../../assets/logo-64x64.png") + .as_slice() + .into(), + ), } } diff --git a/examples/terrain.rs b/crates/valence/examples/terrain.rs similarity index 98% rename from examples/terrain.rs rename to crates/valence/examples/terrain.rs index 3b0e5fb..346688b 100644 --- a/examples/terrain.rs +++ b/crates/valence/examples/terrain.rs @@ -63,7 +63,11 @@ impl Config for Game { max_players: MAX_PLAYERS as i32, player_sample: Default::default(), description: "Hello Valence!".color(Color::AQUA), - favicon_png: Some(include_bytes!("../assets/logo-64x64.png").as_slice().into()), + favicon_png: Some( + include_bytes!("../../../assets/logo-64x64.png") + .as_slice() + .into(), + ), } } diff --git a/examples/text.rs b/crates/valence/examples/text.rs similarity index 97% rename from examples/text.rs rename to crates/valence/examples/text.rs index 3e3a593..a2de3cf 100644 --- a/examples/text.rs +++ b/crates/valence/examples/text.rs @@ -46,7 +46,11 @@ impl Config for Game { online_players: -1, max_players: -1, description: "Hello Valence! ".into_text() + "Text Example".color(Color::AQUA), - favicon_png: Some(include_bytes!("../assets/logo-64x64.png").as_slice().into()), + favicon_png: Some( + include_bytes!("../../../assets/logo-64x64.png") + .as_slice() + .into(), + ), player_sample: Default::default(), } } diff --git a/src/biome.rs b/crates/valence/src/biome.rs similarity index 100% rename from src/biome.rs rename to crates/valence/src/biome.rs diff --git a/src/chunk.rs b/crates/valence/src/chunk.rs similarity index 100% rename from src/chunk.rs rename to crates/valence/src/chunk.rs diff --git a/src/chunk/entity_partition.rs b/crates/valence/src/chunk/entity_partition.rs similarity index 100% rename from src/chunk/entity_partition.rs rename to crates/valence/src/chunk/entity_partition.rs diff --git a/src/chunk/paletted_container.rs b/crates/valence/src/chunk/paletted_container.rs similarity index 100% rename from src/chunk/paletted_container.rs rename to crates/valence/src/chunk/paletted_container.rs diff --git a/src/chunk/pos.rs b/crates/valence/src/chunk/pos.rs similarity index 100% rename from src/chunk/pos.rs rename to crates/valence/src/chunk/pos.rs diff --git a/src/client.rs b/crates/valence/src/client.rs similarity index 100% rename from src/client.rs rename to crates/valence/src/client.rs diff --git a/src/client/event.rs b/crates/valence/src/client/event.rs similarity index 100% rename from src/client/event.rs rename to crates/valence/src/client/event.rs diff --git a/src/config.rs b/crates/valence/src/config.rs similarity index 100% rename from src/config.rs rename to crates/valence/src/config.rs diff --git a/src/dimension.rs b/crates/valence/src/dimension.rs similarity index 100% rename from src/dimension.rs rename to crates/valence/src/dimension.rs diff --git a/src/entity.rs b/crates/valence/src/entity.rs similarity index 100% rename from src/entity.rs rename to crates/valence/src/entity.rs diff --git a/src/entity/data.rs b/crates/valence/src/entity/data.rs similarity index 100% rename from src/entity/data.rs rename to crates/valence/src/entity/data.rs diff --git a/src/inventory.rs b/crates/valence/src/inventory.rs similarity index 100% rename from src/inventory.rs rename to crates/valence/src/inventory.rs diff --git a/src/lib.rs b/crates/valence/src/lib.rs similarity index 100% rename from src/lib.rs rename to crates/valence/src/lib.rs diff --git a/src/packet.rs b/crates/valence/src/packet.rs similarity index 100% rename from src/packet.rs rename to crates/valence/src/packet.rs diff --git a/src/player_list.rs b/crates/valence/src/player_list.rs similarity index 100% rename from src/player_list.rs rename to crates/valence/src/player_list.rs diff --git a/src/player_textures.rs b/crates/valence/src/player_textures.rs similarity index 100% rename from src/player_textures.rs rename to crates/valence/src/player_textures.rs diff --git a/src/server.rs b/crates/valence/src/server.rs similarity index 100% rename from src/server.rs rename to crates/valence/src/server.rs diff --git a/src/server/byte_channel.rs b/crates/valence/src/server/byte_channel.rs similarity index 100% rename from src/server/byte_channel.rs rename to crates/valence/src/server/byte_channel.rs diff --git a/src/server/login.rs b/crates/valence/src/server/login.rs similarity index 100% rename from src/server/login.rs rename to crates/valence/src/server/login.rs diff --git a/src/server/packet_manager.rs b/crates/valence/src/server/packet_manager.rs similarity index 100% rename from src/server/packet_manager.rs rename to crates/valence/src/server/packet_manager.rs diff --git a/src/slab.rs b/crates/valence/src/slab.rs similarity index 100% rename from src/slab.rs rename to crates/valence/src/slab.rs diff --git a/src/slab_rc.rs b/crates/valence/src/slab_rc.rs similarity index 100% rename from src/slab_rc.rs rename to crates/valence/src/slab_rc.rs diff --git a/src/slab_versioned.rs b/crates/valence/src/slab_versioned.rs similarity index 100% rename from src/slab_versioned.rs rename to crates/valence/src/slab_versioned.rs diff --git a/src/util.rs b/crates/valence/src/util.rs similarity index 100% rename from src/util.rs rename to crates/valence/src/util.rs diff --git a/src/world.rs b/crates/valence/src/world.rs similarity index 100% rename from src/world.rs rename to crates/valence/src/world.rs diff --git a/valence_anvil/Cargo.toml b/crates/valence_anvil/Cargo.toml similarity index 89% rename from valence_anvil/Cargo.toml rename to crates/valence_anvil/Cargo.toml index 1361f8f..f3cfa1f 100644 --- a/valence_anvil/Cargo.toml +++ b/crates/valence_anvil/Cargo.toml @@ -15,7 +15,7 @@ byteorder = "1.4.3" flate2 = "1.0.25" thiserror = "1.0.37" num-integer = "0.1.45" # TODO: remove when div_ceil is stabilized. -valence = { version = "0.2.0", path = "..", optional = true } +valence = { version = "0.2.0", path = "../valence", optional = true } valence_nbt = { version = "0.5.0", path = "../valence_nbt" } [dev-dependencies] @@ -23,7 +23,7 @@ anyhow = "1.0.68" criterion = "0.4.0" fs_extra = "1.2.0" tempfile = "3.3.0" -valence = { version = "0.2.0", path = ".." } +valence = { version = "0.2.0", path = "../valence" } valence_anvil = { version = "0.1.0", path = ".", features = ["valence"] } zip = "0.6.3" diff --git a/valence_anvil/benches/world_parsing.rs b/crates/valence_anvil/benches/world_parsing.rs similarity index 100% rename from valence_anvil/benches/world_parsing.rs rename to crates/valence_anvil/benches/world_parsing.rs diff --git a/valence_anvil/examples/valence_loading.rs b/crates/valence_anvil/examples/valence_loading.rs similarity index 99% rename from valence_anvil/examples/valence_loading.rs rename to crates/valence_anvil/examples/valence_loading.rs index c0265e9..0de7135 100644 --- a/valence_anvil/examples/valence_loading.rs +++ b/crates/valence_anvil/examples/valence_loading.rs @@ -75,7 +75,7 @@ impl Config for Game { player_sample: Default::default(), description: "Hello Valence!".color(Color::AQUA), favicon_png: Some( - include_bytes!("../../assets/logo-64x64.png") + include_bytes!("../../../assets/logo-64x64.png") .as_slice() .into(), ), diff --git a/valence_anvil/src/lib.rs b/crates/valence_anvil/src/lib.rs similarity index 100% rename from valence_anvil/src/lib.rs rename to crates/valence_anvil/src/lib.rs diff --git a/valence_anvil/src/to_valence.rs b/crates/valence_anvil/src/to_valence.rs similarity index 100% rename from valence_anvil/src/to_valence.rs rename to crates/valence_anvil/src/to_valence.rs diff --git a/valence_derive/Cargo.toml b/crates/valence_derive/Cargo.toml similarity index 99% rename from valence_derive/Cargo.toml rename to crates/valence_derive/Cargo.toml index 463d3e2..968208c 100644 --- a/valence_derive/Cargo.toml +++ b/crates/valence_derive/Cargo.toml @@ -10,4 +10,3 @@ proc-macro = true syn = { version = "1.0.103", features = ["full"] } quote = "1.0.21" proc-macro2 = "1.0.47" - diff --git a/valence_derive/src/decode.rs b/crates/valence_derive/src/decode.rs similarity index 100% rename from valence_derive/src/decode.rs rename to crates/valence_derive/src/decode.rs diff --git a/valence_derive/src/encode.rs b/crates/valence_derive/src/encode.rs similarity index 100% rename from valence_derive/src/encode.rs rename to crates/valence_derive/src/encode.rs diff --git a/valence_derive/src/lib.rs b/crates/valence_derive/src/lib.rs similarity index 100% rename from valence_derive/src/lib.rs rename to crates/valence_derive/src/lib.rs diff --git a/valence_nbt/Cargo.toml b/crates/valence_nbt/Cargo.toml similarity index 100% rename from valence_nbt/Cargo.toml rename to crates/valence_nbt/Cargo.toml diff --git a/valence_nbt/README.md b/crates/valence_nbt/README.md similarity index 100% rename from valence_nbt/README.md rename to crates/valence_nbt/README.md diff --git a/valence_nbt/src/compound.rs b/crates/valence_nbt/src/compound.rs similarity index 100% rename from valence_nbt/src/compound.rs rename to crates/valence_nbt/src/compound.rs diff --git a/valence_nbt/src/error.rs b/crates/valence_nbt/src/error.rs similarity index 100% rename from valence_nbt/src/error.rs rename to crates/valence_nbt/src/error.rs diff --git a/valence_nbt/src/from_binary_slice.rs b/crates/valence_nbt/src/from_binary_slice.rs similarity index 100% rename from valence_nbt/src/from_binary_slice.rs rename to crates/valence_nbt/src/from_binary_slice.rs diff --git a/valence_nbt/src/lib.rs b/crates/valence_nbt/src/lib.rs similarity index 100% rename from valence_nbt/src/lib.rs rename to crates/valence_nbt/src/lib.rs diff --git a/valence_nbt/src/modified_utf8.rs b/crates/valence_nbt/src/modified_utf8.rs similarity index 100% rename from valence_nbt/src/modified_utf8.rs rename to crates/valence_nbt/src/modified_utf8.rs diff --git a/valence_nbt/src/tag.rs b/crates/valence_nbt/src/tag.rs similarity index 100% rename from valence_nbt/src/tag.rs rename to crates/valence_nbt/src/tag.rs diff --git a/valence_nbt/src/tests.rs b/crates/valence_nbt/src/tests.rs similarity index 100% rename from valence_nbt/src/tests.rs rename to crates/valence_nbt/src/tests.rs diff --git a/valence_nbt/src/to_binary_writer.rs b/crates/valence_nbt/src/to_binary_writer.rs similarity index 100% rename from valence_nbt/src/to_binary_writer.rs rename to crates/valence_nbt/src/to_binary_writer.rs diff --git a/valence_nbt/src/value.rs b/crates/valence_nbt/src/value.rs similarity index 100% rename from valence_nbt/src/value.rs rename to crates/valence_nbt/src/value.rs diff --git a/valence_protocol/Cargo.toml b/crates/valence_protocol/Cargo.toml similarity index 100% rename from valence_protocol/Cargo.toml rename to crates/valence_protocol/Cargo.toml diff --git a/valence_protocol/benches/benches.rs b/crates/valence_protocol/benches/benches.rs similarity index 100% rename from valence_protocol/benches/benches.rs rename to crates/valence_protocol/benches/benches.rs diff --git a/valence_protocol/build/block.rs b/crates/valence_protocol/build/block.rs similarity index 99% rename from valence_protocol/build/block.rs rename to crates/valence_protocol/build/block.rs index a134da2..e1815d4 100644 --- a/valence_protocol/build/block.rs +++ b/crates/valence_protocol/build/block.rs @@ -62,7 +62,7 @@ struct Shape { pub fn build() -> anyhow::Result { let TopLevel { blocks, shapes } = - serde_json::from_str(include_str!("../../extracted/blocks.json"))?; + serde_json::from_str(include_str!("../../../extracted/blocks.json"))?; let max_state_id = blocks.iter().map(|b| b.max_state_id()).max().unwrap(); diff --git a/valence_protocol/build/enchant.rs b/crates/valence_protocol/build/enchant.rs similarity index 98% rename from valence_protocol/build/enchant.rs rename to crates/valence_protocol/build/enchant.rs index fbfd6ea..c503a7c 100644 --- a/valence_protocol/build/enchant.rs +++ b/crates/valence_protocol/build/enchant.rs @@ -29,7 +29,7 @@ pub struct EnchantmentSources { pub fn build() -> anyhow::Result { let enchants: Vec = - serde_json::from_str(include_str!("../../extracted/enchants.json"))?; + serde_json::from_str(include_str!("../../../extracted/enchants.json"))?; let enchantmentkind_definitions = enchants .iter() diff --git a/valence_protocol/build/item.rs b/crates/valence_protocol/build/item.rs similarity index 99% rename from valence_protocol/build/item.rs rename to crates/valence_protocol/build/item.rs index 7e3e204..22c0a55 100644 --- a/valence_protocol/build/item.rs +++ b/crates/valence_protocol/build/item.rs @@ -29,7 +29,7 @@ struct FoodComponent { } pub fn build() -> anyhow::Result { - let items = serde_json::from_str::>(include_str!("../../extracted/items.json"))?; + let items = serde_json::from_str::>(include_str!("../../../extracted/items.json"))?; let item_kind_count = items.len(); diff --git a/valence_protocol/build/main.rs b/crates/valence_protocol/build/main.rs similarity index 100% rename from valence_protocol/build/main.rs rename to crates/valence_protocol/build/main.rs diff --git a/valence_protocol/build/translation_key.rs b/crates/valence_protocol/build/translation_key.rs similarity index 95% rename from valence_protocol/build/translation_key.rs rename to crates/valence_protocol/build/translation_key.rs index ac984a6..7b80144 100644 --- a/valence_protocol/build/translation_key.rs +++ b/crates/valence_protocol/build/translation_key.rs @@ -19,7 +19,7 @@ fn escape(text: &str) -> String { pub fn build() -> anyhow::Result { let translations = serde_json::from_str::>(include_str!( - "../../extracted/translation_keys.json" + "../../../extracted/translation_keys.json" ))?; let translation_key_consts = translations diff --git a/valence_protocol/src/array.rs b/crates/valence_protocol/src/array.rs similarity index 100% rename from valence_protocol/src/array.rs rename to crates/valence_protocol/src/array.rs diff --git a/valence_protocol/src/block.rs b/crates/valence_protocol/src/block.rs similarity index 100% rename from valence_protocol/src/block.rs rename to crates/valence_protocol/src/block.rs diff --git a/valence_protocol/src/block_pos.rs b/crates/valence_protocol/src/block_pos.rs similarity index 100% rename from valence_protocol/src/block_pos.rs rename to crates/valence_protocol/src/block_pos.rs diff --git a/valence_protocol/src/bounded.rs b/crates/valence_protocol/src/bounded.rs similarity index 100% rename from valence_protocol/src/bounded.rs rename to crates/valence_protocol/src/bounded.rs diff --git a/valence_protocol/src/byte_angle.rs b/crates/valence_protocol/src/byte_angle.rs similarity index 100% rename from valence_protocol/src/byte_angle.rs rename to crates/valence_protocol/src/byte_angle.rs diff --git a/valence_protocol/src/codec.rs b/crates/valence_protocol/src/codec.rs similarity index 100% rename from valence_protocol/src/codec.rs rename to crates/valence_protocol/src/codec.rs diff --git a/valence_protocol/src/enchant.rs b/crates/valence_protocol/src/enchant.rs similarity index 100% rename from valence_protocol/src/enchant.rs rename to crates/valence_protocol/src/enchant.rs diff --git a/valence_protocol/src/entity_meta.rs b/crates/valence_protocol/src/entity_meta.rs similarity index 100% rename from valence_protocol/src/entity_meta.rs rename to crates/valence_protocol/src/entity_meta.rs diff --git a/valence_protocol/src/ident.rs b/crates/valence_protocol/src/ident.rs similarity index 100% rename from valence_protocol/src/ident.rs rename to crates/valence_protocol/src/ident.rs diff --git a/valence_protocol/src/impls.rs b/crates/valence_protocol/src/impls.rs similarity index 100% rename from valence_protocol/src/impls.rs rename to crates/valence_protocol/src/impls.rs diff --git a/valence_protocol/src/inventory.rs b/crates/valence_protocol/src/inventory.rs similarity index 100% rename from valence_protocol/src/inventory.rs rename to crates/valence_protocol/src/inventory.rs diff --git a/valence_protocol/src/item.rs b/crates/valence_protocol/src/item.rs similarity index 100% rename from valence_protocol/src/item.rs rename to crates/valence_protocol/src/item.rs diff --git a/valence_protocol/src/lib.rs b/crates/valence_protocol/src/lib.rs similarity index 100% rename from valence_protocol/src/lib.rs rename to crates/valence_protocol/src/lib.rs diff --git a/valence_protocol/src/packets.rs b/crates/valence_protocol/src/packets.rs similarity index 100% rename from valence_protocol/src/packets.rs rename to crates/valence_protocol/src/packets.rs diff --git a/valence_protocol/src/packets/c2s.rs b/crates/valence_protocol/src/packets/c2s.rs similarity index 100% rename from valence_protocol/src/packets/c2s.rs rename to crates/valence_protocol/src/packets/c2s.rs diff --git a/valence_protocol/src/packets/s2c.rs b/crates/valence_protocol/src/packets/s2c.rs similarity index 100% rename from valence_protocol/src/packets/s2c.rs rename to crates/valence_protocol/src/packets/s2c.rs diff --git a/valence_protocol/src/particle.rs b/crates/valence_protocol/src/particle.rs similarity index 100% rename from valence_protocol/src/particle.rs rename to crates/valence_protocol/src/particle.rs diff --git a/valence_protocol/src/player_list.rs b/crates/valence_protocol/src/player_list.rs similarity index 100% rename from valence_protocol/src/player_list.rs rename to crates/valence_protocol/src/player_list.rs diff --git a/valence_protocol/src/raw_bytes.rs b/crates/valence_protocol/src/raw_bytes.rs similarity index 100% rename from valence_protocol/src/raw_bytes.rs rename to crates/valence_protocol/src/raw_bytes.rs diff --git a/valence_protocol/src/text.rs b/crates/valence_protocol/src/text.rs similarity index 100% rename from valence_protocol/src/text.rs rename to crates/valence_protocol/src/text.rs diff --git a/valence_protocol/src/translation_key.rs b/crates/valence_protocol/src/translation_key.rs similarity index 100% rename from valence_protocol/src/translation_key.rs rename to crates/valence_protocol/src/translation_key.rs diff --git a/valence_protocol/src/types.rs b/crates/valence_protocol/src/types.rs similarity index 100% rename from valence_protocol/src/types.rs rename to crates/valence_protocol/src/types.rs diff --git a/valence_protocol/src/username.rs b/crates/valence_protocol/src/username.rs similarity index 100% rename from valence_protocol/src/username.rs rename to crates/valence_protocol/src/username.rs diff --git a/valence_protocol/src/var_int.rs b/crates/valence_protocol/src/var_int.rs similarity index 100% rename from valence_protocol/src/var_int.rs rename to crates/valence_protocol/src/var_int.rs diff --git a/valence_protocol/src/var_long.rs b/crates/valence_protocol/src/var_long.rs similarity index 100% rename from valence_protocol/src/var_long.rs rename to crates/valence_protocol/src/var_long.rs diff --git a/valence_spatial_index/Cargo.toml b/crates/valence_spatial_index/Cargo.toml similarity index 100% rename from valence_spatial_index/Cargo.toml rename to crates/valence_spatial_index/Cargo.toml diff --git a/valence_spatial_index/src/bvh.rs b/crates/valence_spatial_index/src/bvh.rs similarity index 100% rename from valence_spatial_index/src/bvh.rs rename to crates/valence_spatial_index/src/bvh.rs diff --git a/valence_spatial_index/src/lib.rs b/crates/valence_spatial_index/src/lib.rs similarity index 100% rename from valence_spatial_index/src/lib.rs rename to crates/valence_spatial_index/src/lib.rs