Tymon 1 year ago
commit 5f0eef482f

@ -50,21 +50,23 @@ pub fn fall_damage(
if *gamemode == GameMode::Survival {
// hack that potentially makes water not apply fall damage?
if current_block.state().to_kind() == BlockKind::Vine
|| current_block.state().to_kind() == BlockKind::SlimeBlock
|| current_block.state().is_liquid()
{
hashmap.insert(id.get(), position.0.y);
}
if on_ground.0 {
let old_position = hashmap.get(&id.get()).unwrap_or(&-1.0);
let delta_y = old_position - position.0.y;
let old_position = hashmap.get(&id.get()).unwrap_or(&-1.0);
let delta_y = old_position - position.0.y;
if on_ground.0 {
if delta_y > 3.0 {
health.0 -= (delta_y - 3.0) as f32;
}
hashmap.insert(id.get(), position.0.y);
} else if delta_y < 0.0 {
hashmap.insert(id.get(), position.0.y);
}
}
}
@ -118,7 +120,7 @@ pub fn init_clients(
chunk_x: VarInt(-14),
chunk_z: VarInt(17),
});
// send block tags packet
client.write_packet(&SynchronizeTagsS2c {
tags: vec![

Loading…
Cancel
Save