cargo fix momento

master
Drake 1 year ago
parent a40bd84c5b
commit 23d5b42863

@ -19,7 +19,6 @@ use valence_protocol::packet::s2c::play::ChunkRenderDistanceCenterS2c;
use valence_protocol::var_int::VarInt;
use valence_protocol::Encode;
const STATIC_SPAWN_POS: DVec3 = DVec3::new(-221.0, 64.0, 299.0);
static PLAYER_COUNT: AtomicI32 = AtomicI32::new(0);
struct MyCallbacks;

@ -2,15 +2,10 @@ use std::{collections::HashMap, sync::Mutex};
use once_cell::sync::Lazy;
use valence::{
entity::{axolotl::PlayingDead, living::Health, EntityId},
packet::WritePacket,
entity::{living::Health, EntityId},
prelude::{event::PlayerMove, *},
};
use valence_protocol::{
item::FoodComponent,
packet::s2c::play::{DamageTiltS2c, EntityAnimationS2c, EntityDamageS2c, HealthUpdateS2c},
var_int::VarInt,
};
static PLAYER_HEIGHT_HISTORY: Lazy<Mutex<HashMap<i32, f64>>> =
Lazy::new(|| Mutex::new(HashMap::new()));
@ -20,7 +15,7 @@ pub fn fall_damage(
mut events: EventReader<PlayerMove>,
) {
for event in events.iter() {
let (mut client, id, mut health, gamemode) = clients.get_mut(event.client).unwrap();
let (_client, id, mut health, gamemode) = clients.get_mut(event.client).unwrap();
if event.on_ground && *gamemode == GameMode::Survival {
let fall_distance = PLAYER_HEIGHT_HISTORY

@ -1,8 +1,5 @@
use valence::{
entity::tnt::TntEntityBundle,
prelude::{event::PlayerInteractBlock, *},
};
use valence_protocol::types::Hand;
/* pub fn tnt(
mut commands: Commands,

Loading…
Cancel
Save