Skip to content

Commit 30e2691

Browse files
authored
Merge branch 'main' into bloom
2 parents 63365bc + b352f82 commit 30e2691

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1289
-254
lines changed

Cargo.lock

Lines changed: 151 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ serde_json = "1.0.140"
1212
serde = { version = "1.0.219", features = ["derive"] }
1313
uuid = { version = "1.17.0", features = ["v4"] }
1414
rand = "0.9.1"
15-
indexmap = "2.9.0"
1615
indoc = "2.0.6"
1716
include_dir = "0.7.4"
1817
blocks = { path = "crates/macros" }
18+
chrono = "0.4.41"
19+
base64 = "0.22.1"
20+
once_cell = "1.21.3"

src/assets/favicon.png

1.09 KB
Loading

src/dungeon/door.rs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::server::block::block_parameter::Axis;
55
use crate::server::block::block_pos::BlockPos;
66
use crate::server::block::blocks::Blocks;
77
use crate::server::entity::entity::{Entity, EntityImpl};
8-
use crate::server::entity::entity_metadata::EntityVariant;
8+
use crate::server::entity::entity_metadata::{EntityMetadata, EntityVariant};
99
use crate::server::utils::dvec3::DVec3;
1010
use crate::server::world;
1111
use crate::server::world::World;
@@ -124,7 +124,10 @@ impl Door {
124124

125125
let id = world.spawn_entity(
126126
DVec3::new(x as f64 + 0.5, y as f64 - DOOR_ENTITY_OFFSET, z as f64 + 0.5),
127-
EntityVariant::Bat { hanging: false },
127+
EntityMetadata {
128+
variant: EntityVariant::Bat { hanging: false },
129+
is_invisible: true
130+
},
128131
DoorEntityImpl::new(self.door_type.get_block(), 5.0, 20),
129132
).unwrap();
130133
entities.push(id);
@@ -202,17 +205,19 @@ impl EntityImpl for DoorEntityImpl {
202205
entity.position.y -= self.distance_per_tick;
203206
self.ticks_left -= 1;
204207
if self.ticks_left == 0 {
205-
entity.world_mut().despawn_entity(entity.id).unwrap();
208+
entity.world_mut().despawn_entity(entity.id);
206209
}
207210
}
208211

209212
fn despawn(&mut self, entity: &mut Entity) {
213+
// // next entity id is always the one riding on top of it
214+
// let destroy_packet = DestroyEntities {
215+
// entity_ids: vec![entity.id + 1],
216+
// };
210217
// next entity id is always the one riding on top of it
211-
let destroy_packet = DestroyEntities {
212-
entity_ids: vec![entity.id + 1],
213-
};
214-
for player in entity.world_mut().players.values() {
215-
player.send_packet(destroy_packet.clone()).unwrap();
216-
}
218+
entity.world_mut().despawn_entity(entity.id + 1);
219+
// for player in entity.world_mut().players.values() {
220+
// player.send_packet(destroy_packet.clone()).unwrap();
221+
// }
217222
}
218223
}

src/dungeon/room/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
pub mod room;
2-
pub mod room_data;
2+
pub mod room_data;
3+
pub mod secrets;

0 commit comments

Comments
 (0)