Skip to content

Commit 144f9f1

Browse files
authored
Merge branch 'feather-rs:main' into blockbreak
2 parents bc78067 + 4e47484 commit 144f9f1

File tree

12 files changed

+621
-455
lines changed

12 files changed

+621
-455
lines changed

Cargo.lock

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

feather/base/src/anvil/level.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl LevelData {
164164
match self.generator_name.to_lowercase().as_str() {
165165
"default" => LevelGeneratorType::Default,
166166
"flat" => LevelGeneratorType::Flat,
167-
"largeBiomes" => LevelGeneratorType::LargeBiomes,
167+
"largebiomes" => LevelGeneratorType::LargeBiomes,
168168
"amplified" => LevelGeneratorType::Amplified,
169169
"buffet" => LevelGeneratorType::Buffet,
170170
"debug_all_block_states" => LevelGeneratorType::Debug,

feather/datapacks/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ serde_json = "1"
1313
smartstring = { version = "0.2", features = [ "serde" ] }
1414
thiserror = "1"
1515
ureq = { version = "2", default-features = false, features = [ "tls" ] }
16-
zip = "0.5"
16+
zip = { version = "0.5", default-features = false, features = [ "deflate", "bzip2" ] }

feather/plugin-host/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ serde = "1"
2424
tempfile = "3"
2525
vec-arena = "1"
2626
wasmer = { version = "2", default-features = false, features = [ "jit" ] }
27-
wasmer-wasi = { version = "2", default-features = false }
27+
wasmer-wasi = { version = "2", default-features = false, features = [ "host-fs", "sys" ] }
2828

2929
[features]
3030
llvm = [ "wasmer/llvm" ]

feather/protocol/src/packets/client/play.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ def_enum! {
106106
0 = Interact,
107107
1 = Attack,
108108
2 = InteractAt {
109-
target_x f64;
110-
target_y f64;
111-
target_z f64;
109+
target_x f32;
110+
target_y f32;
111+
target_z f32;
112112
hand VarInt;
113113
},
114114
}

feather/server/Cargo.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ahash = "0.7"
1717
anyhow = "1"
1818
base = { path = "../base", package = "feather-base" }
1919
base64 = "0.13"
20-
chrono = "0.4"
20+
time = { version = "0.3", features = ["local-offset", "formatting", "macros"] }
2121
colored = "2"
2222
common = { path = "../common", package = "feather-common" }
2323
crossbeam-utils = "0.8"
@@ -36,10 +36,14 @@ parking_lot = "0.11"
3636
plugin-host = { path = "../plugin-host", package = "feather-plugin-host" }
3737
protocol = { path = "../protocol", package = "feather-protocol" }
3838
quill-common = { path = "../../quill/common" }
39-
rand = "0.7"
39+
40+
rand = "0.8"
4041
ring = "0.16"
41-
rsa = "0.3"
42-
rsa-der = "0.2"
42+
43+
rsa = "0.5"
44+
rsa-der = "0.3"
45+
base64ct = "1"
46+
4347
serde = { version = "1", features = [ "derive" ] }
4448
serde_json = "1"
4549
sha-1 = "0.9"

feather/server/src/initial_handler.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use protocol::{
1919
ServerLoginPacket, ServerPlayPacket, ServerStatusPacket,
2020
};
2121
use rand::rngs::OsRng;
22-
use rsa::{PaddingScheme, PublicKeyParts, RSAPrivateKey};
22+
use rsa::{PaddingScheme, PublicKeyParts, RsaPrivateKey};
2323
use serde::{Deserialize, Serialize};
2424
use sha1::Sha1;
2525
use std::convert::TryInto;
@@ -205,8 +205,8 @@ fn offline_mode_uuid(username: &str) -> Uuid {
205205
const RSA_BITS: usize = 1024;
206206

207207
/// Cached RSA key used by this server instance.
208-
static RSA_KEY: Lazy<RSAPrivateKey> =
209-
Lazy::new(|| RSAPrivateKey::new(&mut OsRng, RSA_BITS).expect("failed to create RSA key"));
208+
static RSA_KEY: Lazy<RsaPrivateKey> =
209+
Lazy::new(|| RsaPrivateKey::new(&mut OsRng, RSA_BITS).expect("failed to create RSA key"));
210210
static RSA_KEY_ENCODED: Lazy<Vec<u8>> = Lazy::new(|| {
211211
rsa_der::public_key_to_der(&RSA_KEY.n().to_bytes_be(), &RSA_KEY.e().to_bytes_be())
212212
});

feather/server/src/logging.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use colored::Colorize;
22
use log::{Level, LevelFilter};
3+
use time::macros::format_description;
4+
use time::OffsetDateTime;
35

46
pub fn init(level: LevelFilter) {
57
fern::Dispatch::new()
@@ -16,9 +18,18 @@ pub fn init(level: LevelFilter) {
1618
} else {
1719
record.module_path().unwrap_or_default()
1820
};
21+
22+
let datetime: OffsetDateTime = match OffsetDateTime::now_local() {
23+
Ok(x) => x,
24+
Err(_) => OffsetDateTime::now_utc(),
25+
};
1926
out.finish(format_args!(
2027
"{} {:<5} [{}] {}",
21-
chrono::Local::now().format("%Y-%m-%d %H:%M:%S,%3f"),
28+
datetime
29+
.format(format_description!(
30+
"[year]-[month]-[day] [hour]:[minute]:[second],[subsecond digits:3]"
31+
))
32+
.unwrap(),
2233
level_string,
2334
target,
2435
message,

feather/utils/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ edition = "2018"
77
[dependencies]
88

99
[dev-dependencies]
10-
simple_logger = "1"

tools/proxy/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@ futures-lite = "1"
1212
argh = "0.1"
1313
anyhow = "1"
1414
log = "0.4"
15-
simple_logger = "1"
1615
either = "1"
16+
colored = "2"
17+
fern = "0.6"
18+
time = { version = "0.3", features = ["local-offset", "formatting", "macros"] }
19+

0 commit comments

Comments
 (0)