Skip to content

Commit c9c0738

Browse files
fixed sodium compability
1 parent 6489bb3 commit c9c0738

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
[package]
22
name = "minecraft-protocol"
3-
version = "0.1.0"
3+
version = "1.0.1"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

8+
[profile.release]
9+
opt-level = 3
10+
811
[dependencies]
912
bytebuffer = "2.2.0"
1013
fastnbt = "2.5.0"

src/main.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,8 @@ async fn main() -> io::Result<()> {
559559
Err(ref e) => if e.kind() == io::ErrorKind::WouldBlock {
560560
usize::MAX
561561
} else {
562-
panic!("{e}");
562+
println!("{e}");
563+
return;
563564
}
564565
};
565566
if n == usize::MAX {
@@ -694,8 +695,8 @@ async fn main() -> io::Result<()> {
694695

695696
// send chunk
696697

697-
for x in -1..=1 {
698-
for y in -1..=1 {
698+
for x in -15..=15 {
699+
for y in -15..=15 {
699700
let mut content_write_buffer: ByteBuffer = prepare_packet_buffer(0x25);
700701
content_write_buffer.write_i32(x);
701702
content_write_buffer.write_i32(y);
@@ -756,8 +757,8 @@ async fn main() -> io::Result<()> {
756757
if !write_block(&mut socket, 0, 1, 0, 1).await {
757758
return;
758759
};
759-
for x in -2..=2 {
760-
for z in -2..=2 {
760+
for x in -4..=4 {
761+
for z in -4..=4 {
761762
if !write_block(&mut socket, x, 3, z, 7406).await {
762763
return;
763764
};

0 commit comments

Comments
 (0)