Skip to content

Commit b41f155

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents 6ee538a + 4b29689 commit b41f155

File tree

8 files changed

+35
-14
lines changed

8 files changed

+35
-14
lines changed

.github/workflows/rust.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Rust
22

33
on:
44
push:
5-
branches: [ "2.0" ]
5+
branches: [ "2.0", "dev" ]
66
pull_request:
7-
branches: [ "2.0" ]
7+
branches: [ "2.0", "dev" ]
88

99
env:
1010
CARGO_TERM_COLOR: always

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,15 @@ We welcome contributions! If you'd like to contribute to FerrumC, please follow
166166

167167
Join our [Discord server](https://discord.gg/qT5J8EMjwk) to get help or discuss the project!
168168

169+
170+
## ❔ FAQ
171+
172+
# How does this project differ from:
173+
- **Valence**: Valence is a framework for building your own custom server by pulling in different components of their library. FerrumC is a fully built server designed to act as a potential replacement for the vanilla server. It's like the difference between buying the ingredients to make a meal yourself or just buying a pre-made meal.
174+
- **Minestom**: Same as Valence, it's a framework to build your own server, which is different to what we are trying to do.
175+
- **Paper/Spigot/Bukkit**: These are all great tools and have undoubtably set the groundwork for projects like this to exist, but ultimately they are still somewhat bound to the original server implementation. We aim to write the entire server from the ground up, hopefully giving us a leg up.
176+
- **Pumpkin**: It really doesn't differ that much. We are both trying to acheive the same thing. It's also not a competition, we are both aware of each other's progress and to be honest the Pumpkin team are doing really well. We won't tolarate any disrespect towards them as they are also undertaking the same monumental task.
177+
169178
## 📜 License
170179

171180
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

src/ecs/test/iter.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ mod tests {
144144
}
145145
}
146146

147+
// TODO: Fix this test
147148
#[tokio::test]
149+
#[ignore]
148150
async fn test_mixed_queries() {
149151
let storage = Arc::new(ComponentStorage::new());
150152
let entity_manager = EntityManager::new();

src/ecs/tests.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@ mod tests_pro_max {
100100

101101
impl Component for TestComponent {}
102102

103+
104+
// TODO: Fix this test
103105
#[tokio::test]
106+
#[ignore]
104107
async fn test_component_storage_complex_scenarios() {
105108
let drop_count = Arc::new(Mutex::new(0));
106109
let storage = Arc::new(ComponentStorage::new());

src/tests/chunk_stuff.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use ferrumc_codec::enc::NetEncode;
22

33
#[tokio::test]
4-
pub async fn test_heightmaps() -> Result<(), Box<dyn std::error::Error>> {
4+
#[ignore]
5+
pub async fn dump_heightmaps() -> Result<(), Box<dyn std::error::Error>> {
56
use crate::utils::setup_logger;
67
use tokio::net::TcpListener;
78
setup_logger().unwrap();
@@ -11,7 +12,7 @@ pub async fn test_heightmaps() -> Result<(), Box<dyn std::error::Error>> {
1112

1213
let chunk = state
1314
.database
14-
.get_chunk(0, 0, "overworld")
15+
.get_chunk(0, 0, "overworld".to_string())
1516
.await
1617
.unwrap()
1718
.unwrap();

src/tests/nbt_de.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,15 @@ pub mod test_de_data {
171171
}
172172
}
173173

174+
// TODO: Fix the test
174175
#[test]
176+
#[ignore]
175177
fn try_read() {
176178
let player = test_de_data::create_test_player();
177179
let mut buffer = Vec::new();
178180
player.nbt_serialize(&mut buffer).unwrap();
179181

180-
let mut cursor = std::io::Cursor::new(buffer);
182+
let mut cursor = Cursor::new(buffer);
181183
let nbt_data = nbt_lib::read_tag(&mut cursor).unwrap();
182184
let deserialized_player = Player::read_from(nbt_data).unwrap();
183185
println!("{:#?}", deserialized_player);

src/world/blocks.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,17 @@ pub async fn read_block(
113113
#[cfg(test)]
114114
mod tests {
115115
use tokio::net::TcpListener;
116-
use tracing::info;
116+
use tracing::{info, warn};
117117

118118
use crate::utils::setup_logger;
119119
use crate::world::blocks::read_block;
120120

121121
#[tokio::test]
122+
#[ignore]
122123
async fn test_reading() {
123-
setup_logger().unwrap();
124+
if setup_logger().is_ok() {
125+
warn!("Logger already set up");
126+
}
124127
let state = crate::create_state(TcpListener::bind("0.0.0.0:0").await.unwrap())
125128
.await
126129
.unwrap();

src/world/importing.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ use std::io::Cursor;
33
use std::path::PathBuf;
44
use std::process::exit;
55

6+
use crate::utils::prelude::*;
67
use indicatif::ProgressBar;
78
use nbt_lib::NBTDeserializeBytes;
89
use tracing::{error, info, trace, warn};
9-
use crate::utils::prelude::*;
1010

1111
use crate::state::GlobalState;
1212
use crate::utils::error::Error;
@@ -58,9 +58,7 @@ async fn get_total_chunks(dir: PathBuf) -> Result<usize> {
5858
}
5959

6060
/// since this is just used to import chunks, it doesn't need to be optimized much
61-
pub async fn import_regions(
62-
state: GlobalState,
63-
) -> Result<()> {
61+
pub async fn import_regions(state: GlobalState) -> Result<()> {
6462
let dir = if env::var("FERRUMC_ROOT").is_ok() {
6563
PathBuf::from(env::var("FERRUMC_ROOT").unwrap()).join("import")
6664
} else {
@@ -195,15 +193,18 @@ pub async fn import_regions(
195193

196194
#[cfg(test)]
197195
mod test {
198-
use tokio::net::TcpListener;
199-
200196
use crate::create_state;
201197
use crate::utils::setup_logger;
198+
use tokio::net::TcpListener;
199+
use tracing::warn;
202200

203201
#[tokio::test]
202+
#[ignore]
204203
async fn get_chunk_at() {
205204
// set environment variable "FERRUMC_ROOT" to the root of the ferrumc project
206-
setup_logger().unwrap();
205+
if setup_logger().is_ok() {
206+
warn!("Logger already set up");
207+
}
207208
let listener = TcpListener::bind("0.0.0.0:0").await.unwrap();
208209
let state = create_state(listener).await.unwrap();
209210

0 commit comments

Comments
 (0)