Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize Dev #97

Merged
merged 852 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
852 commits
Select commit Hold shift + click to select a range
47141c0
[packet] sub_chunk.rs
OmniacDev Dec 5, 2024
883ca94
[packet] sub_chunk_request.rs
OmniacDev Dec 5, 2024
416ffc6
[packet] sync_actor_property.rs
OmniacDev Dec 5, 2024
25d8ff0
[packet] ticking_area_load_status.rs
OmniacDev Dec 5, 2024
d309ae8
[packet] toast_request.rs
OmniacDev Dec 5, 2024
e2a733a
[packet] trim_data.rs
OmniacDev Dec 5, 2024
fa7769e
[packet] unlocked_recipes.rs
OmniacDev Dec 5, 2024
d3ce33c
[packet] update_abilities.rs
OmniacDev Dec 5, 2024
6db69a0
[packet] update_adventure_settings.rs
OmniacDev Dec 5, 2024
68e3dbb
[packet] update_client_input_locks.rs
OmniacDev Dec 5, 2024
045c305
[packet] update_player_game_type.rs
OmniacDev Dec 5, 2024
912f55e
[packet] update_sub_chunk_blocks.rs
OmniacDev Dec 5, 2024
c86717c
Merge remote-tracking branch 'origin/proto_rework' into proto_rework
OmniacDev Dec 5, 2024
0ca8c70
Merge pull request #77 from OmniacDev/proto_rework
theaddonn Dec 5, 2024
83d41dd
Cleanup before main PR
akashic-records-of-the-abyss Dec 6, 2024
60f493f
Merge branch 'bedrock-crustaceans:proto_rework' into proto_rework
akashic-records-of-the-abyss Dec 6, 2024
82d4143
rem vec_2.rs
OmniacDev Dec 8, 2024
e1a6230
rem vec_3.rs
OmniacDev Dec 8, 2024
08bb515
rem compound_tag.rs
OmniacDev Dec 8, 2024
188c72c
rem
OmniacDev Dec 8, 2024
4038b5a
replace Vec3 & Vec2
OmniacDev Dec 8, 2024
6292649
fix doc comment
OmniacDev Dec 8, 2024
223b89b
move AudioListener enum into packet
OmniacDev Dec 8, 2024
6840d09
use Enchant::Type enum
OmniacDev Dec 8, 2024
4b6f7c6
replace CompoundTag with nbtx:Value
OmniacDev Dec 8, 2024
1fb6c4b
rem enums from packets
OmniacDev Dec 8, 2024
9aa536e
rem enums
OmniacDev Dec 8, 2024
334522d
rem
OmniacDev Dec 8, 2024
78c113e
Enchant::Type repr
OmniacDev Dec 8, 2024
2a881af
nbtx::Value & Vec3<f32>
OmniacDev Dec 8, 2024
fe945f3
CommandBlockMode repr
OmniacDev Dec 8, 2024
3d99d86
repl Vec3 & Vec2, TODO -> VERIFY
OmniacDev Dec 8, 2024
5e03def
repl Vec3, TODO -> VERIFY
OmniacDev Dec 8, 2024
f8311bb
repl Vec3
OmniacDev Dec 8, 2024
541924c
repl Vec3 & Vec2, TODO -> VERIFY
OmniacDev Dec 8, 2024
de1fb67
repl CompoundTag
OmniacDev Dec 8, 2024
23b019a
impl ProtoCodec, VERIFY
OmniacDev Dec 8, 2024
b5539ed
repl CompoundTag
OmniacDev Dec 8, 2024
fb6e3c3
impl ProtoCodec, VERIFY
OmniacDev Dec 8, 2024
58a6165
repl CompoundTag
OmniacDev Dec 8, 2024
33e0ad6
repl CompoundTag
OmniacDev Dec 8, 2024
c57d81f
impl ProtoCodec, VERIFY
OmniacDev Dec 8, 2024
a9ca1d7
repl Vec3
OmniacDev Dec 8, 2024
1b20436
impl ProtoCodec, VERIFY
OmniacDev Dec 8, 2024
177e1c4
repl Vec3
OmniacDev Dec 8, 2024
aa10652
impl ProtoCodec, VERIFY
OmniacDev Dec 8, 2024
cc48960
impl ProtoCodec, VERIFY
OmniacDev Dec 8, 2024
225654a
impl ProtoCodec, VERIFY
OmniacDev Dec 8, 2024
3abc9f1
rem unused import
OmniacDev Dec 8, 2024
8d80536
repl Vec3
OmniacDev Dec 9, 2024
e98ca54
repl CompoundTag
OmniacDev Dec 9, 2024
b82aea2
impl ProtoCodec, VERIFY
OmniacDev Dec 9, 2024
b927287
repl CompoundTag
OmniacDev Dec 9, 2024
9233cf4
impl ProtoCodec, VERIFY
OmniacDev Dec 9, 2024
fdbf57d
repl Vec3
OmniacDev Dec 9, 2024
6c551bd
repl CompoundTag
OmniacDev Dec 9, 2024
b8dfb36
repl Vec3
OmniacDev Dec 9, 2024
1d4d376
impl ProtoCodec, VERIFY
OmniacDev Dec 9, 2024
1e98902
impl ProtoCodec, VERIFY
OmniacDev Dec 9, 2024
ce099a4
repl Vec3
OmniacDev Dec 9, 2024
26387d7
impl ProtoCodec, VERIFY
OmniacDev Dec 9, 2024
6ba4e02
impl ProtoCodec, VERIFY
OmniacDev Dec 9, 2024
164d350
repl Vec3
OmniacDev Dec 9, 2024
df72344
repl CompoundTag
OmniacDev Dec 9, 2024
5779278
TODO -> VERIFY
OmniacDev Dec 9, 2024
d01747d
repl Vec3
OmniacDev Dec 9, 2024
357128d
repl Vec3
OmniacDev Dec 9, 2024
75d53b7
TODO -> VERIFY
OmniacDev Dec 9, 2024
b85d4c0
repl Vec3
OmniacDev Dec 9, 2024
d198844
repl Vec3
OmniacDev Dec 9, 2024
aa04602
repl Vec3
OmniacDev Dec 9, 2024
44e652a
repl Vec3 & Vec2 & CompoundTag
OmniacDev Dec 9, 2024
a9d0e20
repl CompoundTag, TODO -> VERIFY
OmniacDev Dec 9, 2024
3769e66
impl ProtoCodec, VERIFY
OmniacDev Dec 9, 2024
b35ab96
repl CompoundTag
OmniacDev Dec 9, 2024
ca3db49
impl ProtoCodec, VERIFY
OmniacDev Dec 9, 2024
4ed3d51
repl Vec3
OmniacDev Dec 9, 2024
b5f66d2
repl CompoundTag
OmniacDev Dec 9, 2024
82faea2
impl ProtoCodec, VERIFY
OmniacDev Dec 9, 2024
1aaa41c
repl CompoundTag
OmniacDev Dec 9, 2024
69d3b50
impl ProtoCodec, VERIFY
OmniacDev Dec 9, 2024
88abe69
impl ProtoCodec, VERIFY
OmniacDev Dec 9, 2024
87c6ae4
Merge remote-tracking branch 'origin/proto_rework' into proto_rework
OmniacDev Dec 9, 2024
aeedf2a
optimise imports
OmniacDev Dec 9, 2024
b3a7663
optimise imports
OmniacDev Dec 9, 2024
6577883
fix errors
OmniacDev Dec 9, 2024
2f1270b
fix errors
OmniacDev Dec 9, 2024
dabb9f1
fix errors
OmniacDev Dec 9, 2024
a5050d3
fix bitshift amounts
OmniacDev Dec 9, 2024
877172f
fix errors
OmniacDev Dec 9, 2024
0c284d7
fix errors
OmniacDev Dec 9, 2024
e23ec74
Update ci.yml
theaddonn Dec 9, 2024
6e2d515
format
OmniacDev Dec 9, 2024
bbc8996
gamepackets.rs
OmniacDev Dec 9, 2024
b647c13
rem extra mods
OmniacDev Dec 10, 2024
6ad7ad1
rem mod comments
OmniacDev Dec 10, 2024
79469ae
fix proto warnings
OmniacDev Dec 10, 2024
d0ad3f4
Merge pull request #78 from OmniacDev/proto_rework
theaddonn Dec 10, 2024
7013487
init v671
OmniacDev Dec 11, 2024
72c2559
Merge remote-tracking branch 'origin/proto_rework' into proto_rework
OmniacDev Dec 11, 2024
9e942b4
Fixed issues that were raised
akashic-records-of-the-abyss Dec 15, 2024
21b0028
Merge branch 'proto_rework' of https://github.com/akashic-records-of-…
akashic-records-of-the-abyss Dec 15, 2024
ced958b
init v766
OmniacDev Dec 17, 2024
c47d839
update v671
OmniacDev Dec 17, 2024
66e4aa4
(v766): [type] actor_link.rs
OmniacDev Dec 17, 2024
981a46f
(v766): [packet] boss_event.rs
OmniacDev Dec 17, 2024
e24a8d6
(v766): [packet] award_achievement.rs
OmniacDev Dec 17, 2024
8a44814
(v766): [type] base_description.rs
OmniacDev Dec 17, 2024
09d4b45
(v766): [packet] camera_aim_assist.rs
OmniacDev Dec 17, 2024
06751dc
(v766): [packet] camera_aim_assist_presets.rs
OmniacDev Dec 17, 2024
f9e22a1
(v766): [type] camera_instruction.rs
OmniacDev Dec 17, 2024
aa7733c
(v766): [type] camera_preset.rs
OmniacDev Dec 17, 2024
ef2229f
(v766): [packet] change_dimension.rs
OmniacDev Dec 17, 2024
4493f84
(v766): [packet] clientbound_close_form.rs
OmniacDev Dec 17, 2024
215b4dc
(v766): [packet] clientbound_debug_renderer.rs
OmniacDev Dec 17, 2024
9b1bb0f
(v766): [packet] clientbound_map_item_data.rs
OmniacDev Dec 17, 2024
2c27ca8
format
OmniacDev Dec 17, 2024
9a3d751
Fixed raised issues
akashic-records-of-the-abyss Dec 21, 2024
d37d1ab
fixes
OmniacDev Dec 24, 2024
0c54af8
(v766): [enum] code_builder_execution_state.rs
OmniacDev Dec 24, 2024
38fe93d
(v766): [enum] crafting_data_entry_type.rs
OmniacDev Dec 24, 2024
eb4e29c
(v766): [enum] data_item_type.rs
OmniacDev Dec 24, 2024
666f044
(v766): [enum] recipe_unlocking_context.rs
OmniacDev Dec 24, 2024
bffc736
(v766): [packet] code_builder_source.rs
OmniacDev Dec 24, 2024
97be471
(v766): [packet] container_close.rs
OmniacDev Dec 24, 2024
d7aa6ec
(v766): [packet] container_registry_cleanup.rs
OmniacDev Dec 24, 2024
4aab874
(v766): [packet] correct_player_move_prediction.rs
OmniacDev Dec 24, 2024
4a66996
(v766): [packet] current_structure_feature.rs
OmniacDev Dec 24, 2024
59b768e
(v766): [type] crafting_data_entry.rs
OmniacDev Dec 24, 2024
1db7bb6
(v766): [type] data_item.rs
OmniacDev Dec 24, 2024
c065574
(v766): [type] full_container_name.rs
OmniacDev Dec 24, 2024
5374aaa
(v766): [type] recipe_unlocking_requirement.rs
OmniacDev Dec 24, 2024
4d88e13
(v766): [type] user_data_shapeless_recipe.rs
OmniacDev Dec 24, 2024
0b0f39f
format
OmniacDev Dec 24, 2024
cc65432
fix
OmniacDev Dec 24, 2024
41163f1
reorder proto deps
theaddonn Dec 25, 2024
be0321b
use references for Encryption and Compression inside Options
theaddonn Dec 25, 2024
900da60
rename RakNet
theaddonn Dec 25, 2024
263718f
correct gamepackets enum for v662
theaddonn Dec 25, 2024
f5f9ea7
cargo fmt
theaddonn Dec 25, 2024
5b248c3
rename transport layer to transport
theaddonn Dec 25, 2024
ae70137
reorder imports
theaddonn Dec 25, 2024
1ad5dcf
fix server example
theaddonn Dec 25, 2024
fc287ba
use vek
theaddonn Dec 25, 2024
d71f833
cargo fmt
theaddonn Dec 25, 2024
964f680
cargo fmt
theaddonn Dec 25, 2024
83d2029
fix incorrect gamepackets imports
OmniacDev Dec 25, 2024
53854d3
Merge branch 'bedrock-crustaceans:proto_rework' into proto_rework
OmniacDev Dec 25, 2024
c13cd38
use vek
OmniacDev Dec 25, 2024
859163a
use vek
OmniacDev Dec 25, 2024
2260a0c
Merge pull request #85 from OmniacDev/proto_rework
theaddonn Dec 25, 2024
6c5041f
gamepackets
OmniacDev Dec 25, 2024
ccf5cfa
fmt
OmniacDev Dec 25, 2024
6d84da4
sort main dependencies
theaddonn Dec 25, 2024
4356691
add traces to gamepacket encoding
theaddonn Dec 25, 2024
dee496a
reexport bedrockrs protocol codec in main lib.rs
theaddonn Dec 25, 2024
ab892a0
setup common examples for bedrockrs
theaddonn Dec 25, 2024
1844441
(v766): [packet] disconnect.rs
OmniacDev Dec 26, 2024
ad74b80
(v766): [packet] editor_network.rs
OmniacDev Dec 26, 2024
b3b2fa1
(v766): [packet] emote.rs
OmniacDev Dec 26, 2024
c98b5e4
(v766): [packet] inventory_content.rs
OmniacDev Dec 26, 2024
6e7bc5a
(v766): [packet] inventory_slot.rs
OmniacDev Dec 26, 2024
c82448a
(v766): [packet] jigsaw_structure_data.rs
OmniacDev Dec 26, 2024
4955314
(v766): [packet] legacy_telemetry_event.rs
OmniacDev Dec 26, 2024
803c9be
(v766): [packet] mob_armor_equipment.rs
OmniacDev Dec 26, 2024
45f6d40
(v766): [packet] movement_effect.rs
OmniacDev Dec 26, 2024
46aa53e
(v766): [type] item_stack_request_slot_info.rs
OmniacDev Dec 26, 2024
e50f6d1
(v766): [type] item_stack_response_container_info.rs
OmniacDev Dec 26, 2024
ed00270
(v766): [type] item_stack_response_slot_info.rs
OmniacDev Dec 26, 2024
05b6148
(v766): [type] level_settings.rs
OmniacDev Dec 26, 2024
e013106
(v662): [enum] item_use_method.rs
OmniacDev Dec 26, 2024
9e7937e
(v662): [enum] lesson_action.rs
OmniacDev Dec 26, 2024
0b27bc8
(v662): [type] inventory_action.rs
OmniacDev Dec 26, 2024
43832f4
(v662): [type] item_instance_user_data.rs
OmniacDev Dec 26, 2024
c0d224c
(v662): [type] item_stack_response_info.rs
OmniacDev Dec 26, 2024
56d26c1
mod files
OmniacDev Dec 26, 2024
5729c97
add remaining bytes error
theaddonn Dec 26, 2024
099a0c0
Merge
akashic-records-of-the-abyss Dec 26, 2024
1910f7d
current examples
theaddonn Dec 26, 2024
ae62fd4
Merge pull request #92 from bedrock-crustaceans/server
theaddonn Dec 26, 2024
6d30c66
implement invalid enum id error and use static string instead
theaddonn Dec 26, 2024
8052549
Merge pull request #93 from bedrock-crustaceans/proto_rework
theaddonn Dec 26, 2024
1c8fde9
(v766): [packet] player_armor_damage.rs
OmniacDev Dec 26, 2024
4079992
(v766): [packet] player_auth_input.rs
OmniacDev Dec 26, 2024
cc7b53e
(v766): [type] packed_item_use_legacy_inventory_transaction.rs
OmniacDev Dec 26, 2024
861bb78
(v662): [type] item_stack_net_id_variant.rs
OmniacDev Dec 26, 2024
9230e62
(v662): [type] network_item_stack_descriptor.rs
OmniacDev Dec 26, 2024
72a76ad
(v662): [type] packed_item_use_legacy_inventory_transaction.rs
OmniacDev Dec 26, 2024
17820f1
(v662): [packet] player_armor_damage.rs
OmniacDev Dec 26, 2024
05bac75
(v662): [enum] new_interaction_model.rs
OmniacDev Dec 26, 2024
b6b290a
mod files
OmniacDev Dec 26, 2024
9c738dc
(v662): [enum] abilities_index.rs
OmniacDev Dec 27, 2024
456c139
(v662): [enum] actor_block_sync_message_id.rs
OmniacDev Dec 27, 2024
27ed91e
(v662): [enum] objective_sort_order.rs
OmniacDev Dec 27, 2024
d85a719
(v662): [enum] player_permission_level.rs
OmniacDev Dec 27, 2024
8775a44
(v662): [enum] server_auth_movement_mode.rs
OmniacDev Dec 27, 2024
0e7a741
(v662): [packet] sub_chunk.rs
OmniacDev Dec 27, 2024
26baff8
(v662): [packet] update_block_synced.rs
OmniacDev Dec 27, 2024
c0b2ed4
(v766): [enum] player_action_type.rs
OmniacDev Dec 27, 2024
dc8d2ec
(v766): [enum] player_list_packet_type.rs
OmniacDev Dec 27, 2024
bbad0f1
(v766): [enum] soft_enum_update_type.rs
OmniacDev Dec 27, 2024
00bbdf2
(v766): [packet] player_list.rs
OmniacDev Dec 27, 2024
b8fb1c2
(v766): [packet] resource_pack_stack.rs
OmniacDev Dec 27, 2024
ae8b618
(v766): [packet] resource_packs_info.rs
OmniacDev Dec 27, 2024
f26f94d
(v766): [packet] server_bound_diagnostics.rs
OmniacDev Dec 27, 2024
5a9bd27
(v766): [packet] server_bound_loading_screen.rs
OmniacDev Dec 27, 2024
84e90cc
(v766): [packet] set_movement_authority.rs
OmniacDev Dec 27, 2024
5a460f7
(v766): [packet] set_title.rs
OmniacDev Dec 27, 2024
fba2e6b
(v766): [packet] stop_sound.rs
OmniacDev Dec 27, 2024
898ddc3
(v766): [packet] text.rs
OmniacDev Dec 27, 2024
9877c04
(v766): [packet] transfer_player.rs
OmniacDev Dec 27, 2024
7a232e3
(v766): [packet] update_attributes.rs
OmniacDev Dec 27, 2024
bbbdce5
(v766): [packet] update_player_game_type.rs
OmniacDev Dec 27, 2024
a6cebef
(v766): [packet] update_soft_enum.rs
OmniacDev Dec 27, 2024
5707ad2
(v766): [type] player_block_action_data.rs
OmniacDev Dec 27, 2024
012ead6
(v766): [type] player_input_tick.rs
OmniacDev Dec 27, 2024
72951b1
(v766): [type] shaped_chemistry_recipe.rs
OmniacDev Dec 27, 2024
4e6887a
(v766): [type] shaped_recipe.rs
OmniacDev Dec 27, 2024
c1df607
(v766): [type] shapeless_recipe.rs
OmniacDev Dec 27, 2024
fdbfba1
mod files
OmniacDev Dec 27, 2024
e0210b9
format
OmniacDev Dec 27, 2024
7ffb0ed
Merge branch 'bedrock-crustaceans:dev' into dev
OmniacDev Dec 27, 2024
8674c65
format again cause ya'll don't do it
OmniacDev Dec 27, 2024
3752a70
fix errors
OmniacDev Dec 27, 2024
098baca
fix errors
OmniacDev Dec 27, 2024
9b7ac36
fix errors
OmniacDev Dec 27, 2024
6cd8f06
fix more errors
OmniacDev Dec 27, 2024
24bf658
fix errors & warnings
OmniacDev Dec 27, 2024
1870a7e
Merge pull request #94 from OmniacDev/dev
theaddonn Dec 27, 2024
77aaaad
cargo fmt
theaddonn Dec 27, 2024
d676609
fix too many super errors
theaddonn Dec 27, 2024
1267d3e
cargo fmt
theaddonn Dec 27, 2024
cf28cee
Moved away from custom binary type
akashic-records-of-the-abyss Dec 28, 2024
3d226d2
Fixed missing path
akashic-records-of-the-abyss Dec 28, 2024
7709010
Merge remote-tracking branch 'upstream/dev' into proto_rework
akashic-records-of-the-abyss Dec 28, 2024
63222f0
Fixed missing level
akashic-records-of-the-abyss Dec 28, 2024
71d85ce
Fixed some formatting issues
akashic-records-of-the-abyss Dec 28, 2024
306a5f1
Merge pull request #69 from akashic-records-of-the-abyss/proto_rework
theaddonn Dec 28, 2024
e93d344
(v766): use updated types
OmniacDev Dec 29, 2024
84b7c43
clientbound --> client_bound
OmniacDev Dec 29, 2024
16c76ce
(v766): use updated packets
OmniacDev Dec 29, 2024
013f968
format
OmniacDev Dec 29, 2024
e39003a
fix
OmniacDev Dec 29, 2024
e2ebba5
Merge branch 'bedrock-crustaceans-dev' into dev
OmniacDev Dec 29, 2024
db09156
packet ids
OmniacDev Dec 29, 2024
a631b9e
item component NBT
OmniacDev Dec 29, 2024
89e33c0
Merge pull request #96 from OmniacDev/dev
theaddonn Dec 29, 2024
0b4d5ce
Update README.md
theaddonn Dec 30, 2024
e975f0f
Add contribs to README.md
theaddonn Dec 30, 2024
04ead93
Merge branch 'main' into dev
theaddonn Dec 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
on: [push, pull_request]
on: [ push, pull_request ]

name: Continuous integration

Expand Down Expand Up @@ -63,4 +63,3 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ target/
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# Profiler logs
*.opt

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
*.pdb

*.bin

# This is a little hack to allow the tests to be ran and not have a merge conflict
crates/level/test_level/
43 changes: 34 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,51 @@ version = "0.1.0"
edition = "2021"

[workspace]
members = [ "crates/*" ]
members = ["crates/*"]

[dependencies]
bedrockrs_core = { path = "crates/core" }
bedrockrs_shared = { path = "crates/shared" }

bedrockrs_macros = { path = "crates/macros", optional = true }

bedrockrs_addon = { path = "crates/addon", optional = true }

bedrockrs_form = { path = "crates/form", optional = true }

bedrockrs_proto = { path = "crates/proto", optional = true }
bedrockrs_proto_core = { path = "crates/proto_core", optional = true }
bedrockrs_proto_macros = { path = "crates/proto_macros", optional = true }

bedrockrs_addon = { path = "crates/addon", optional = true }
bedrockrs_server = { path = "crates/server", optional = true }

bedrockrs_level = {path = "crates/level", optional = true}

[dev-dependencies]
tokio = { version = "1.40", features = ["full"] }

nbtx = { git = "https://github.com/bedrock-crustaceans/nbtx" }
uuid = { version = "1.11.0", features = ["v4"] }

bedrockrs_form = { path = "crates/form" }

bedrockrs_world = { path = "crates/world", optional = true }
bedrockrs_paletted_storage = { path = "crates/paletted_storage", optional = true }
fern = { version = "0.7", features = ["colored"] }
log = "0.4"
chrono = "0.4"

[features]
full = ["addon", "proto", "world"]

addon = ["dep:bedrockrs_addon"]
proto = ["dep:bedrockrs_proto", "dep:bedrockrs_proto_core", "dep:bedrockrs_proto_macros"]
world = ["dep:bedrockrs_world", "dep:bedrockrs_paletted_storage"]
proto = ["dep:bedrockrs_proto","dep:bedrockrs_proto_core","dep:bedrockrs_macros",]
level = ["dep:bedrockrs_level"]
full = ["addon", "level", "proto", "server"]
form = ["dep:bedrockrs_form"]
server = ["dep:bedrockrs_server", "proto", "level", "form"]

[[example]]
name = "proto_server"
path = "examples/proto/server.rs"
required-features = ["proto"]

[[example]]
name = "proto_parsing"
path = "examples/proto_parsing.rs"
required-features = ["proto"]
113 changes: 86 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,101 @@
# bedrock-rs

_Universal toolkit for MCBE in Rust_
**_Universal Toolkit for Minecraft Bedrock Edition in Rust_**

An easy-to-use universal library for Minecraft Bedrock written in Rust, that aims to provide:
**bedrock-rs** is a comprehensive and user-friendly library written in Rust, designed to provide a universal solution for working with Minecraft Bedrock Edition. This project offers:

- [X] Standards
- [X] Common implementations
- [X] An easy-to-use api
- **Standards:** Adhering to best practices and conventions.
- **Common Implementations:** Reusable components for various Minecraft Bedrock needs.
- **Easy-to-Use API:** Streamlined interfaces to make development efficient and enjoyable.

We also have a community discord, feel free to join it to learn more about our future and get help when needed: https://discord.com/invite/VCVcrvt3JC
Join our growing community on Discord to learn more about the project’s future, seek support, or collaborate with others:
**[Join our Discord](https://discord.com/invite/VCVcrvt3JC)**

## Crates:
---

- [Core](https://github.com/Adrian8115/bedrock-rs/tree/main/crates/core):
- Provides common base datatypes.
## Crates

- [Shared](https://github.com/Adrian8115/bedrock-rs/tree/main/crates/shared):
- Shared datatypes that can use derive macros defined in other crates.
To maintain modularity and scalability, **bedrock-rs** is divided into multiple crates. Each crate focuses on a specific functionality, making it easier to use and manage. All crates are accessible through the primary `bedrockrs` crate. Additionally, the library offers a variety of optional features you can enable to suit your needs.

- [Proto](https://github.com/Adrian8115/bedrock-rs/tree/main/crates/proto):
- Full implementation of the Bedrock protocol.
- Support for both Server and Client side intended.
- Built-in login procedure.
### Crate Breakdown:

- [World](https://github.com/Adrian8115/bedrock-rs/tree/main/crates/world):
- Implementation of the Bedrock level format using our own `leveldb` bindings for mojangs leveldb fork.
- [`bedrockrs::shared`](crates/shared)
- [X] Shared data types used across other crates.
- [X] Support for deriving macros defined in other modules.

- [Addons](https://github.com/Adrian8115/bedrock-rs/tree/main/crates/addon):
- Datatypes defining the structure of Addons.
- Serialization and Deserialization of addons.
- [`bedrockrs::form`](crates/form)
- [X] Implementation of the JSON form format used by Minecraft Bedrock Edition.

- [Form](https://github.com/Adrian8115/bedrock-rs/tree/main/crates/form):
- Implementation of the JSON form format used in Minecraft Bedrock.
- [`bedrockrs::addon`](crates/addon)
- [X] Datatypes for defining Minecraft Addon structures.
- [X] Serialization and deserialization support for Addons.
- [X] A programmatic approach to creating Addons easily.

## Contributing:
- [`bedrockrs::proto`](crates/proto)
- [X] Complete implementation of the Minecraft Bedrock protocol.
- [X] Support for both server-side and client-side operations.
- [X] Multi-protocol compatibility for handling multiple versions seamlessly.

Feel free to join in at any time. Your contributions are highly valued, and a big thank you to all who participate. We
recommend getting acquainted with the bedrock-rs codebase. Whether it's tackling existing issues, adding new features,
or even introducing entirely fresh modules, your creativity is welcome.
- [`bedrockrs::level`](crates/level)
- [X] Data structures for managing Minecraft Bedrock levels.
- [X] Implementation of Bedrock’s level format using Rust’s LevelDB.

(If you like this library, remember to give bedrockrs a Star!)
- [`bedrockrs::server`](/crates/server)
- [X] A lightweight foundation for Minecraft Bedrock server software.
- [X] Built-in support for multi-protocol handling.
- [X] Asynchronous architecture powered by Tokio.

---

## Features

- **Modular Architecture:** Enable only the features you need for your project.
- **Multi-Protocol Support:** Work with different protocol versions effortlessly.
- **Cross-Platform Compatibility:** Designed to work seamlessly across platforms.
- **Lightweight and Efficient:** Built with Rust’s performance and safety features.

---

## Getting Started

To use **bedrock-rs** in your Rust project, add the following to your `Cargo.toml`:
```toml
[dependencies]
bedrockrs = { git = "https://github.com/bedrock-crustaceans/bedrock-rs.git", features = ["full"] }
```

Refer to the individual crate documentation for details on specific modules and features.

We also plan to release bedrock-rs on [crates.io](https://crates.io) in the future.

---

## Contributors

A huge thank you to all the amazing individuals who have contributed to **bedrock-rs**! Your time, effort, and expertise are what make this project possible.

[![Contributors](https://contrib.rocks/image?repo=bedrock-crustaceans/bedrock-rs)](https://github.com/bedrock-crustaceans/bedrock-rs/graphs/contributors)

Whether it’s fixing bugs, implementing features, or providing feedback, every contribution helps shape the future of this library. We appreciate each and every one of you!

Want to join this incredible group? Check out our Contributing Guide and make your mark on the project.

---

## Contributing

We welcome contributions of all kinds! Whether you're fixing bugs, adding new features, or proposing entirely new modules, your efforts are highly appreciated. Here’s how you can get involved:

1. **Get Familiar with the Codebase:** Explore the existing modules and documentation.
2. **Pick an Issue:** Check out the repository’s issue tracker for tasks you can work on.
3. **Add Your Touch:** Feel free to innovate and bring new ideas to the table.

For guidance or collaboration, feel free to connect with the community on Discord.

If you find **bedrock-rs** helpful, don’t forget to give the repository a ⭐ on GitHub.

---

## License

**bedrock-rs** is open-source software licensed under the [Apache-2.0 License](LICENSE).
9 changes: 6 additions & 3 deletions crates/addon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ version = "0.1.0"
edition = "2021"

[dependencies]
bedrockrs_core = { path = "../core" }

uuid = { version = "1.8", features = ["serde"] }
semver = { version = "1.0", features = ["serde"] }

image = "0.25"
thiserror = "1.0"

vek = "0.17"
thiserror = "2.0"

serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
json_comments = "0.2"

walkdir = "2.5"
8 changes: 4 additions & 4 deletions crates/addon/src/behavior/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl Addon for BehaviorPack {
let blocks_path = path.join("blocks");
let mut blocks = HashMap::new();

// If dir exists read all blocks
// If dir exists, read all blocks
if blocks_path.is_dir() {
'blocks_walk: for blocks_entry in WalkDir::new(&blocks_path).into_iter().filter(|v| {
if let Ok(v) = v {
Expand Down Expand Up @@ -88,7 +88,7 @@ impl Addon for BehaviorPack {
let items_path = path.join("items");
let mut items = HashMap::new();

// If dir exists read all items
// If dir exists, read all items
if items_path.is_dir() {
'items_walk: for items_entry in WalkDir::new(&items_path).into_iter().filter(|v| {
if let Ok(v) = v {
Expand Down Expand Up @@ -177,14 +177,14 @@ impl Addon for BehaviorPack {
})
}

fn export(path: impl AsRef<Path>) -> Result<Self, AddonError>
fn export(_path: impl AsRef<Path>) -> Result<Self, AddonError>
where
Self: Sized,
{
unimplemented!()
}

fn merge(addons: Vec<Self>) -> Self
fn merge(_addons: Vec<Self>) -> Self
where
Self: Sized,
{
Expand Down
20 changes: 3 additions & 17 deletions crates/addon/src/language/code.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
use std::fmt::{Debug, Formatter};
use std::fmt::Debug;

use bedrockrs_core::Vec2;
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Clone)]
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(untagged)]
pub enum LanguageCode {
VanillaCode(String),
CustomCode(Vec2<String>),
}

impl Debug for LanguageCode {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
LanguageCode::VanillaCode(v) => {
write!(f, "VanillaCode({v})")
}
LanguageCode::CustomCode(v) => {
write!(f, "CustomCode([{}, {}])", v.x, v.y)
}
}
}
CustomCode((String, String)),
}
2 changes: 1 addition & 1 deletion crates/addon/src/language/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Languages {
for language in languages_file {
let language_code = match language {
LanguageCode::VanillaCode(v) => v,
LanguageCode::CustomCode(v) => v.x,
LanguageCode::CustomCode(v) => v.1,
};

let language_path = languages_path.join(format!("{language_code}.lang"));
Expand Down
7 changes: 3 additions & 4 deletions crates/addon/src/manifest.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use bedrockrs_core::Vec3;
use serde::{Deserialize, Serialize};
use uuid::Uuid;

Expand Down Expand Up @@ -40,9 +39,9 @@ pub struct AddonManifestHeader {
/// For resource packs, an optional string that specifies whether this resource pack can be used across the game or at an individual world level. Valid values are "world", which specifies that a pack is only addable in the context of a world "global", which means that a pack is only addable across the game, and "any" which indicates that a pack can apply either across the game or to a specific world. If not specified, this is interpreted as "any".
pub pack_scope: Option<String>,
/// This is the version of the base game your world template requires, specified as [majorVersion, minorVersion, revision]. We use this to determine what version of the base game resource and behavior packs to apply when your content is used. (world template manifest JSON only)
pub base_game_version: Option<Vec3<u32>>,
pub base_game_version: Option<[u32; 3]>,
/// This is the minimum version of the game that this pack was written for. This is a required field for resource and behavior packs. This helps the game identify whether any backwards compatibility is needed for your pack. You should always use the highest version currently available when creating packs.
pub min_engine_version: Option<Vec3<u32>>,
pub min_engine_version: Option<[u32; 3]>,
}

/// Section containing information regarding the type of content that is being brought in.
Expand Down Expand Up @@ -76,7 +75,7 @@ pub struct AddonManifestDependency {
/// Section containing the metadata about the file such as authors and licensing information.
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct AddonManifestMetadata {
/// Name of the author(s) of the pack.
/// Name of the pack authors.
pub authors: Option<Vec<String>>,
/// The license of the pack.
pub license: Option<String>,
Expand Down
4 changes: 2 additions & 2 deletions crates/addon/src/resource/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ impl Addon for ResourcePack {
})
}

fn export(path: impl AsRef<Path>) -> Result<Self, AddonError>
fn export(_path: impl AsRef<Path>) -> Result<Self, AddonError>
where
Self: Sized,
{
unimplemented!()
}

fn merge(addons: Vec<Self>) -> Self
fn merge(_addons: Vec<Self>) -> Self
where
Self: Sized,
{
Expand Down
16 changes: 3 additions & 13 deletions crates/addon/src/version.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
use std::fmt::{Debug, Formatter};
use std::fmt::Debug;

use bedrockrs_core::Vec3;
use serde::{Deserialize, Serialize};

/// A version used in Addons that is either a Vector [a, b, c] or SemVer String.
#[derive(Serialize, Deserialize, Clone)]
#[derive(Serialize, Deserialize, Clone, Debug)]
#[serde(untagged)]
pub enum AddonSemanticVersion {
Vector(Vec3<u32>),
Vector([u32; 3]),
SemVer(semver::Version),
}

impl Debug for AddonSemanticVersion {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
AddonSemanticVersion::Vector(v) => f.debug_list().entries([v.x, v.y, v.z]).finish(),
AddonSemanticVersion::SemVer(v) => v.fmt(f),
}
}
}
7 changes: 0 additions & 7 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,3 @@ version = "0.1.0"
edition = "2021"

[dependencies]
uuid = { version = "1.8", features = ["v4"] }

bytes = "1.6"
byteorder = "1.5"
varint-rs = "2.2"

serde = "1.0"
Loading
Loading