Skip to content

Commit

Permalink
fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
MrlnHi committed Mar 5, 2023
1 parent c901ec4 commit dddc967
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion crates/valence_schem/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ valence_nbt = { version = "0.5.0", path = "../valence_nbt" }
valence_protocol = { version = "0.1.0", path = "../valence_protocol" }

[dev-dependencies]
bevy_ecs = "0.9.1"
bevy_ecs = { git = "https://github.com/bevyengine/bevy/", rev = "2ea00610188dce1eba1172a3ded8244570189230" }
clap = { version = "4.1.6", features = ["derive"] }
tracing = "0.1.37"
tracing-subscriber = "0.3.16"
Expand Down
10 changes: 6 additions & 4 deletions crates/valence_schem/examples/schem_loading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ pub fn main() {
App::new()
.add_plugin(ServerPlugin::new(()))
.add_startup_system(setup)
.add_system_to_stage(EventLoop, default_event_handler)
.add_system_set(PlayerList::default_system_set())
.add_system(init_clients)
.add_system(despawn_disconnected_clients)
.add_systems((
default_event_handler.in_schedule(EventLoopSchedule),
init_clients,
despawn_disconnected_clients,
))
.add_systems(PlayerList::default_systems())
.run();
}

Expand Down
36 changes: 19 additions & 17 deletions crates/valence_schem/examples/schem_saving.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,20 @@ pub fn main() {
App::new()
.add_plugin(ServerPlugin::new(()))
.add_startup_system(setup)
.add_system_to_stage(EventLoop, default_event_handler)
.add_system_to_stage(EventLoop, first_pos)
.add_system_to_stage(EventLoop, second_pos)
.add_system_to_stage(EventLoop, origin)
.add_system_to_stage(EventLoop, copy_schem)
.add_system_to_stage(EventLoop, paste_schem)
.add_system_to_stage(EventLoop, save_schem)
.add_system_to_stage(EventLoop, place_blocks)
.add_system_to_stage(EventLoop, break_blocks)
.add_system_set(PlayerList::default_system_set())
.add_system(init_clients)
.add_system(despawn_disconnected_clients)
.add_systems((
default_event_handler.in_schedule(EventLoopSchedule),
first_pos.in_schedule(EventLoopSchedule),
second_pos.in_schedule(EventLoopSchedule),
origin.in_schedule(EventLoopSchedule),
copy_schem.in_schedule(EventLoopSchedule),
paste_schem.in_schedule(EventLoopSchedule),
save_schem.in_schedule(EventLoopSchedule),
place_blocks.in_schedule(EventLoopSchedule),
break_blocks.in_schedule(EventLoopSchedule),
init_clients,
despawn_disconnected_clients,
))
.add_systems(PlayerList::default_systems())
.run();
}

Expand Down Expand Up @@ -332,39 +334,39 @@ fn init_clients(
client.set_position(SPAWN_POS);
client.set_instance(instance);

inv.replace_slot(
inv.set_slot(
36,
Some(ItemStack::new(
ItemKind::WoodenAxe,
1,
Some(compound! {"display" => compound! {"Name" => "Position Setter".not_italic()}}),
)),
);
inv.replace_slot(
inv.set_slot(
37,
Some(ItemStack::new(
ItemKind::Stick,
1,
Some(compound! {"display" => compound! {"Name" => "Origin Setter".not_italic()}}),
)),
);
inv.replace_slot(
inv.set_slot(
38,
Some(ItemStack::new(
ItemKind::Paper,
1,
Some(compound! {"display" => compound! {"Name" => "Copy Schematic".not_italic()}}),
)),
);
inv.replace_slot(
inv.set_slot(
39,
Some(ItemStack::new(
ItemKind::Feather,
1,
Some(compound! {"display" => compound! {"Name" => "Paste Schematic".not_italic()}}),
)),
);
inv.replace_slot(
inv.set_slot(
40,
Some(ItemStack::new(
ItemKind::MusicDiscStal,
Expand Down

0 comments on commit dddc967

Please sign in to comment.