From bd327c86f33eca1c4e30fcc632ed0f260086ccee Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Mon, 20 Nov 2023 23:21:50 +0100 Subject: [PATCH] change stuff :3 (will break android builds) --- .cargo/config.toml | 9 --------- kubi/Cargo.toml | 1 + kubi/src/block_placement.rs | 2 +- kubi/src/main.rs | 2 +- kubi/src/player.rs | 6 +++--- rust-toolchain.toml | 2 ++ 6 files changed, 8 insertions(+), 14 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/.cargo/config.toml b/.cargo/config.toml index 8ad770e..583413a 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,3 @@ -#link crt statically on msvc - [target.x86_64-pc-windows-msvc] rustflags = ["-Ctarget-feature=+crt-static"] @@ -9,12 +7,5 @@ rustflags = ["-Ctarget-feature=+crt-static"] [target.i586-pc-windows-msvc] rustflags = ["-Ctarget-feature=+crt-static"] -# enable sse,sse2,avx - [target.'cfg(target_arch = "x86_64")'] rustflags = "-Ctarget-feature=+sse,+sse2,+avx" - -# use sparse crates.io protocol - -[registries.crates-io] -protocol = "sparse" diff --git a/kubi/Cargo.toml b/kubi/Cargo.toml index b0c64a4..5bc6738 100644 --- a/kubi/Cargo.toml +++ b/kubi/Cargo.toml @@ -5,6 +5,7 @@ edition = "2021" publish = false [lib] +name = "kubilib" crate-type = ["lib", "cdylib"] [dependencies] diff --git a/kubi/src/block_placement.rs b/kubi/src/block_placement.rs index 18eb313..93810b5 100644 --- a/kubi/src/block_placement.rs +++ b/kubi/src/block_placement.rs @@ -6,7 +6,7 @@ use kubi_shared::{ player::PlayerHolding, }; use crate::{ - player::MainPlayer, + player::MainPlayer, world::{raycast::{LookingAtBlock, RAYCAST_STEP}, queue::BlockUpdateQueue}, input::{Inputs, PrevInputs, RawKbmInputState}, events::{EventComponent, player_actions::PlayerActionEvent}, diff --git a/kubi/src/main.rs b/kubi/src/main.rs index f4a01c7..8cb1164 100644 --- a/kubi/src/main.rs +++ b/kubi/src/main.rs @@ -4,5 +4,5 @@ )] fn main() { - kubi::kubi_main(); + kubilib::kubi_main(); } diff --git a/kubi/src/player.rs b/kubi/src/player.rs index d42ae7b..f6aaaea 100644 --- a/kubi/src/player.rs +++ b/kubi/src/player.rs @@ -2,7 +2,8 @@ use glam::Mat4; use shipyard::{Component, AllStoragesViewMut, UniqueViewMut}; use kubi_shared::{ entity::{Entity, Health}, - player::{PLAYER_HEALTH, PlayerHolding}, + player::{Player, PLAYER_HEALTH, PlayerHolding}, + block::Block, networking::{ client::{Username, Client, ClientIdMap}, messages::ClientInitData @@ -14,7 +15,6 @@ use crate::{ fly_controller::FlyController, world::raycast::LookingAtBlock, }; -pub use kubi_shared::player::Player; #[derive(Component)] pub struct MainPlayer; @@ -32,7 +32,7 @@ pub fn spawn_player ( Camera::default(), FlyController, LookingAtBlock::default(), - PlayerHolding::default(), + PlayerHolding(Some(Block::Cobblestone)), Username("LocalPlayer".into()) )); } diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..5d56faf --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "nightly"