Remote mining test fixture: the held-item key and the attack strength reset

This commit is contained in:
Kacpherek
2026-10-27 06:24:05 +01:00
parent 29ab66935e
commit 6d69bba15e
+3 -1
View File
@@ -26,7 +26,7 @@ class RemoteMiningTests(unittest.TestCase):
struct Hit { pos: [i32; 3], face: u8 }
struct Mining { pos: [i32; 3], progress: f32, ticks: u32 }
#[derive(Default)]
struct Remote { destroy_delay: u32, destroying: Option<([i32; 3], u8, f32)> }
struct Remote { destroy_delay: u32, destroying: Option<([i32; 3], u8, f32)>, destroying_item: String }
struct Ground { on_ground: bool }
struct Player { ground: Ground }
#[derive(Clone)]
@@ -70,6 +70,8 @@ struct Game {
hit: Hit, sequence: i32, packets: Vec<play::PlayerAction>,
}
impl Game {
fn main_hand_key(&self) -> String { String::new() }
fn reset_attack_strength(&mut self) {}
fn new(hardness: f32, speed: f32, creative: bool) -> Self {
Self {
remote: Some(Remote::default()), mining: None, creative,