Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgazelka committed Dec 20, 2024
1 parent a33b4cf commit 799b358
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/hyperion/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ pub mod egress;
pub mod ingress;
pub mod net;
pub mod simulation;
pub mod storage;
pub mod spatial;
pub mod storage;

/// Relationship for previous values
#[derive(Component)]
Expand Down
3 changes: 1 addition & 2 deletions crates/hyperion/src/simulation/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ use valence_generated::block::BlockState;
use valence_protocol::Hand;
use valence_server::{ItemKind, entity::item_frame::ItemStack};

use crate::simulation::skin::PlayerSkin;

use super::blocks::RayCollision;
use crate::simulation::skin::PlayerSkin;

#[derive(Component, Default, Debug)]
pub struct ItemDropEvent {
Expand Down
4 changes: 2 additions & 2 deletions crates/hyperion/src/simulation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,8 @@ impl Module for SimModule {

world.component::<hyperion_inventory::PlayerInventory>();

/* world.component::<BowCharging>();
component!(world, BowCharging).opaque_func(meta_ser_stringify_type_display::<BowCharging>); */
// world.component::<BowCharging>();
// component!(world, BowCharging).opaque_func(meta_ser_stringify_type_display::<BowCharging>);

observer!(
world,
Expand Down
5 changes: 3 additions & 2 deletions crates/hyperion/src/spatial/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ use flecs_ecs::{
prelude::Module,
};
use geometry::{aabb::Aabb, ray::Ray};
use ordered_float::NotNan;
use rayon::iter::Either;

use super::{
egress::player_join::RayonWorldStages,
glam::Vec3,
Expand All @@ -15,8 +18,6 @@ use super::{
blocks::{Blocks, RayCollision},
},
};
use ordered_float::NotNan;
use rayon::iter::Either;

#[derive(Component)]
pub struct SpatialModule;
Expand Down
4 changes: 3 additions & 1 deletion crates/hyperion/tests/spatial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ use flecs_ecs::core::{QueryBuilderImpl, SystemAPI, World, WorldGet, flecs};
use geometry::{aabb::Aabb, ray::Ray};
use glam::Vec3;
use hyperion::{
simulation::{entity_kind::EntityKind, EntitySize, Position}, spatial, HyperionCore
HyperionCore,
simulation::{EntitySize, Position, entity_kind::EntityKind},
spatial,
};
use spatial::{Spatial, SpatialIndex, SpatialModule};

Expand Down
2 changes: 1 addition & 1 deletion events/tag/src/command/raycast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use clap::Parser;
use flecs_ecs::core::{Entity, EntityView, EntityViewGet, WorldProvider};
use hyperion::{
glam::Vec3,
spatial::get_first_collision,
simulation::{Pitch, Position, Yaw, entity_kind::EntityKind},
spatial::get_first_collision,
};
use hyperion_clap::{CommandPermission, MinecraftCommand};
use rayon::iter::Either;
Expand Down
4 changes: 2 additions & 2 deletions events/tag/src/module/bow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ impl Module for BowModule {
world,
&mut EventQueue<event::ReleaseUseItem>($),
)
.multi_threaded()
.kind::<flecs::pipeline::PreUpdate>()
.each_iter(move |it, _, event_queue| {
let _system = it.system();
Expand Down Expand Up @@ -196,7 +195,8 @@ impl Module for BowModule {

debug!("Arrow spawn position: {:?}", spawn_pos);

world.entity()
world
.entity()
.add_enum(EntityKind::Arrow)
.set(Uuid::new_v4())
.set(Position::new(spawn_pos.x, spawn_pos.y, spawn_pos.z))
Expand Down

0 comments on commit 799b358

Please sign in to comment.