Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d071582
Start on refactoring to using Specs
caelunshun Jul 18, 2019
6d67c65
Merge branch 'develop' into refactor
caelunshun Jul 18, 2019
391920e
Put more work into Specs refactor
caelunshun Jul 21, 2019
c4d971d
Further work on converting InitialHandler to Specs
caelunshun Jul 22, 2019
00a6533
Complete InitialHandler conversion
caelunshun Jul 22, 2019
082ba75
Reimplement network system using Specs
caelunshun Jul 22, 2019
7528df8
Start reimplementing block update logic
caelunshun Jul 22, 2019
8e0367f
Complete world update code
caelunshun Jul 22, 2019
d96bda7
Implement player movement broadcasting
caelunshun Jul 23, 2019
d124259
Fix a ton of compiler errors with Specs refactor
caelunshun Jul 23, 2019
2567e31
Fix compiler errors
caelunshun Jul 23, 2019
9df1045
Fix compiler warnings
caelunshun Jul 23, 2019
fbdd2bf
Bump version number
caelunshun Jul 23, 2019
d0c10db
Fix panic on join
caelunshun Jul 23, 2019
5428b0e
Add basic testing framework
caelunshun Jul 23, 2019
fd4b732
Complete worldupdate test suite
caelunshun Jul 23, 2019
c44c14c
Move PlayerMovementUpdate system to player.rs
caelunshun Jul 24, 2019
105becd
Add send_chunk_to_player function
caelunshun Jul 24, 2019
7aaad10
Start moving initial handler to IO worker thread
caelunshun Jul 25, 2019
9652e9a
Implement handle_encryption_response()
caelunshun Jul 26, 2019
13f4581
Complete rewrite of initial handler
caelunshun Jul 26, 2019
6bc228b
Get tests to compile and pass
caelunshun Jul 26, 2019
5fdb174
Fix panic on join caused by components not being initialized
caelunshun Jul 26, 2019
7752e9e
Get intial handler to work completely
caelunshun Jul 26, 2019
372f107
Get Specs refactor to allow player joining
caelunshun Jul 26, 2019
953119c
Send Player Info and Spawn Player when a player joins
caelunshun Jul 26, 2019
2e1eb45
Send existing players to joining players
caelunshun Jul 26, 2019
519f12b
Fix player count not being decremented
caelunshun Jul 26, 2019
60aad63
Broadcast when a player disconnects
caelunshun Jul 27, 2019
bc75836
Use bitwise and in chunk_relative_pos() - fixes #21
caelunshun Jul 27, 2019
b5dfb33
Fix compiler warnings
caelunshun Jul 27, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
codecov:
notify:
require_ci_to_pass: no
require_ci_to_pass: yes

ignore:
- "blocks"
17 changes: 10 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "feather_core"
version = "0.1.0"
version = "0.3.0"
authors = ["caelunshun <caelum12321@gmail.com>"]
edition = "2018"

Expand Down
8 changes: 4 additions & 4 deletions core/src/network/mctypes.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::bytebuf::{BufMutAlloc, ByteBuf};
use crate::bytebuf::{BufMutAlloc, BufResulted, ByteBuf};
use crate::prelude::*;
use crate::world::BlockPosition;
use bytes::Buf;
Expand Down Expand Up @@ -110,7 +110,7 @@ impl<T: Buf + Read> McTypeRead for T {
if self.remaining() == 0 {
return Err(());
}
let read = self.get_u8();
let read = self.read_u8()?;
let value = read & 0b01111111;
result |= (value as i32) << (7 * num_read);

Expand Down Expand Up @@ -149,7 +149,7 @@ impl<T: Buf + Read> McTypeRead for T {
if self.remaining() < 8 {
return Err(());
}
let val = self.get_u64_be();
let val = self.read_i64_be()?;
let x = val >> 38;
let y = (val >> 26) & 0xFFF;
let z = val << 38 >> 38;
Expand All @@ -158,7 +158,7 @@ impl<T: Buf + Read> McTypeRead for T {
}

fn read_bool(&mut self) -> Result<bool, ()> {
let byte = self.get_u8();
let byte = self.read_u8()?;
match byte {
0 => Ok(false),
1 => Ok(true),
Expand Down
6 changes: 2 additions & 4 deletions core/src/network/packet/implementation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,7 @@ pub struct DisconnectLogin {
#[derive(Default, AsAny, new, Clone)]
pub struct EncryptionRequest {
pub server_id: String,
pub public_key_len: VarInt,
pub public_key: Vec<u8>,
pub verify_token_len: VarInt,
pub verify_token: Vec<u8>,
}

Expand All @@ -567,10 +565,10 @@ impl Packet for EncryptionRequest {
fn write_to(&self, mut buf: &mut ByteBuf) {
buf.write_string(self.server_id.as_str());

buf.write_var_int(self.public_key_len);
buf.write_var_int(self.public_key.len() as i32);
buf.write(&self.public_key);

buf.write_var_int(self.verify_token_len);
buf.write_var_int(self.verify_token.len() as i32);
buf.write(&self.verify_token);
}

Expand Down
Loading