From 9861a1ba04834aeacb40fb617bebef59cf7a0994 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 27 Oct 2026 19:59:32 +0100 Subject: [PATCH] refactor: cut vault, command_block, sculk and brewing loose from gameplay Move-only step B6 of the horizon-client crate split. These four modules only reached gameplay modules for small helpers, so after this they depend only on the render/world layer and can move into its crate whole, impls included. - save::float moves to horizon_client_core::nbt_value (save re-exports it). - mobs::spawner::normalize_id moves to horizon_client_core::identifier (spawner re-exports it). - containers::Providers moves to its own module, providers.rs (containers re-exports it). - vault, command_block and sculk import number/text/float, item_nbt, Who and scoreboard from their real homes instead of through save and mobs; brewing imports Providers from providers. - The vault, spawner and trial_spawner harnesses record the client-core files the moved helpers now live in. - villager_brain's `impl Poi` (max_tickets, valid_range) moves next to the type in poi_sections, and its two methods become pub. No behaviour change. Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client-core/src/identifier.rs | 17 +++ crates/horizon-client-core/src/nbt_value.rs | 8 ++ crates/horizon-client/src/brewing.rs | 2 +- crates/horizon-client/src/command_block.rs | 9 +- crates/horizon-client/src/containers.rs | 120 +---------------- crates/horizon-client/src/lib.rs | 1 + crates/horizon-client/src/mobs/spawner.rs | 17 +-- .../horizon-client/src/mobs/villager_brain.rs | 14 -- crates/horizon-client/src/poi_sections.rs | 16 +++ crates/horizon-client/src/providers.rs | 122 ++++++++++++++++++ crates/horizon-client/src/save.rs | 9 +- crates/horizon-client/src/sculk.rs | 6 +- crates/horizon-client/src/vault.rs | 28 ++-- tools/test_spawner_parity.py | 1 + tools/test_trial_spawner_parity.py | 1 + tools/test_vault_parity.py | 4 +- 16 files changed, 201 insertions(+), 174 deletions(-) create mode 100644 crates/horizon-client/src/providers.rs diff --git a/crates/horizon-client-core/src/identifier.rs b/crates/horizon-client-core/src/identifier.rs index 1e76f7731..a2fe1cd13 100644 --- a/crates/horizon-client-core/src/identifier.rs +++ b/crates/horizon-client-core/src/identifier.rs @@ -16,3 +16,20 @@ pub fn parse_identifier(raw: &str) -> Option { }); (ns_ok && path_ok).then(|| format!("{ns}:{path}")) } + +/// `Identifier.CODEC` parsing an entity id: lowercase namespace and path +/// characters, `minecraft` when the namespace is left out. +pub fn normalize_id(s: &str) -> Option { + let (ns, path) = match s.split_once(':') { + Some((ns, path)) => (if ns.is_empty() { "minecraft" } else { ns }, path), + None => ("minecraft", s), + }; + let ok = |c: char, slash: bool| { + c.is_ascii_lowercase() + || c.is_ascii_digit() + || matches!(c, '_' | '-' | '.') + || slash && c == '/' + }; + (ns.chars().all(|c| ok(c, false)) && path.chars().all(|c| ok(c, true))) + .then(|| format!("{ns}:{path}")) +} diff --git a/crates/horizon-client-core/src/nbt_value.rs b/crates/horizon-client-core/src/nbt_value.rs index 7f7d728b0..ff78ad1db 100644 --- a/crates/horizon-client-core/src/nbt_value.rs +++ b/crates/horizon-client-core/src/nbt_value.rs @@ -22,3 +22,11 @@ pub fn number(tag: Option<&Tag>) -> Option { _ => return None, }) } +/// Any numeric tag as f64, keeping a float's or double's fraction. +pub fn float(tag: Option<&Tag>) -> Option { + Some(match tag? { + Tag::Float(b) => f64::from(f32::from_bits(*b)), + Tag::Double(b) => f64::from_bits(*b), + other => number(Some(other))? as f64, + }) +} diff --git a/crates/horizon-client/src/brewing.rs b/crates/horizon-client/src/brewing.rs index e058f0fe7..7fc044642 100644 --- a/crates/horizon-client/src/brewing.rs +++ b/crates/horizon-client/src/brewing.rs @@ -4,8 +4,8 @@ //! `BrewingStandBlockEntity.serverTick`. pub use crate::chunk::block_entity::BrewingStand; use crate::{ - containers::Providers, items::{ItemStack, Items}, + providers::Providers, }; use serde_json::Value; use std::{collections::HashSet, fs, path::Path}; diff --git a/crates/horizon-client/src/command_block.rs b/crates/horizon-client/src/command_block.rs index 1d3fe16ec..1f62d20f6 100644 --- a/crates/horizon-client/src/command_block.rs +++ b/crates/horizon-client/src/command_block.rs @@ -2,8 +2,9 @@ //! count comparators read, the output it keeps, and the powered, automatic //! and condition flags `CommandBlock.tick` runs on. pub use crate::chunk::block_entity::CommandBlock; -use crate::{ - save::{number, text}, +use horizon_client_core::{ + nbt_value::{number, text}, + scoreboard, text::Text, }; use horizon_world::nbt::Tag; @@ -108,7 +109,7 @@ impl CommandBlock { last_output: track_output .then(|| tag.get("LastOutput")) .flatten() - .map(|t| crate::scoreboard::comp_text(&crate::scoreboard::tag_to_json(t))), + .map(|t| scoreboard::comp_text(&scoreboard::tag_to_json(t))), update_last_execution, last_execution: if update_last_execution { number(tag.get("LastExecution")).unwrap_or(-1) @@ -164,7 +165,7 @@ impl CommandBlock { pub fn name(&self) -> Text { self.custom_name.as_ref().map_or_else( || Text::literal("@"), - |t| crate::scoreboard::comp_text(&crate::scoreboard::tag_to_json(t)), + |t| scoreboard::comp_text(&scoreboard::tag_to_json(t)), ) } } diff --git a/crates/horizon-client/src/containers.rs b/crates/horizon-client/src/containers.rs index cd232ca94..6210d2f7e 100644 --- a/crates/horizon-client/src/containers.rs +++ b/crates/horizon-client/src/containers.rs @@ -9,8 +9,7 @@ use crate::{ crafting::Recipes, items::{ItemStack, Items}, }; -use serde_json::Value; -use std::{collections::HashMap, fs, path::Path, sync::Arc}; +use std::{collections::HashMap, sync::Arc}; impl FurnaceKind { pub fn recipe_type(self) -> &'static str { @@ -380,122 +379,7 @@ impl BlockEntity { } } } -/// Evaluator for `context_int_provider` / `context_float_provider` values. -pub struct Providers { - ints: HashMap, - floats: HashMap, -} -fn load_dir(dir: &Path, prefix: &str, out: &mut HashMap) { - let Ok(entries) = fs::read_dir(dir) else { - return; - }; - for e in entries.flatten() { - let p = e.path(); - let name = p - .file_stem() - .and_then(|s| s.to_str()) - .unwrap_or("") - .to_owned(); - if p.is_dir() { - load_dir(&p, &format!("{prefix}{name}/"), out); - } else if let Ok(bytes) = fs::read(&p) - && let Ok(v) = serde_json::from_slice(&bytes) - { - out.insert(format!("minecraft:{prefix}{name}"), v); - } - } -} -impl Providers { - pub fn load(root: &Path) -> Self { - let mut ints = HashMap::new(); - let mut floats = HashMap::new(); - load_dir( - &root.join("data/minecraft/context_int_provider"), - "", - &mut ints, - ); - load_dir( - &root.join("data/minecraft/context_float_provider"), - "", - &mut floats, - ); - Self { ints, floats } - } - fn eval(v: &Value, fast: bool, table: &HashMap, depth: u32) -> f64 { - if depth > 16 { - return 0.0; - } - match v { - Value::Number(n) => n.as_f64().unwrap_or(0.0), - Value::String(name) => table - .get(name) - .map_or(0.0, |v| Self::eval(v, fast, table, depth + 1)), - Value::Object(o) => { - let f = - |k: &str| Self::eval(o.get(k).unwrap_or(&Value::Null), fast, table, depth + 1); - match o.get("type").and_then(Value::as_str).unwrap_or("") { - "minecraft:div" => { - let r = f("right"); - if r == 0.0 { - 0.0 - } else { - (f("left") / r).trunc() - } - } - "minecraft:mul" => f("left") * f("right"), - "minecraft:add" | "minecraft:sum" => f("left") + f("right"), - "minecraft:sub" => f("left") - f("right"), - "minecraft:constant" => f("value"), - "minecraft:conditional" => { - // The only condition in the pinned data: block/fast_cooking. - let condition = o.get("condition").and_then(Value::as_str) - == Some("minecraft:block/fast_cooking"); - if condition && fast { - f("on_true") - } else { - f("on_false") - } - } - _ => 0.0, - } - } - _ => 0.0, - } - } - /// A plain `context_int_provider` value or reference (no context conditions). - pub fn int_value(&self, v: &Value) -> i32 { - Self::eval(v, false, &self.ints, 0) as i32 - } - /// A plain `context_float_provider` value or reference; `default` when absent. - pub fn float_value(&self, v: &Value, default: f32) -> f32 { - if v.is_null() { - default - } else { - Self::eval(v, false, &self.floats, 0) as f32 - } - } - #[cfg(test)] - pub fn empty() -> Self { - Self { - ints: HashMap::new(), - floats: HashMap::new(), - } - } - pub fn burn_time(&self, items: &Items, stack: &ItemStack, fast: bool) -> i32 { - items - .get(&stack.item) - .and_then(|i| i.fuel.as_ref()) - .map_or(0, |(time, _)| Self::eval(time, fast, &self.ints, 0) as i32) - } - pub fn speed(&self, items: &Items, stack: &ItemStack, fast: bool) -> f32 { - items - .get(&stack.item) - .and_then(|i| i.fuel.as_ref()) - .map_or(1.0, |(_, speed)| { - Self::eval(speed, fast, &self.floats, 0) as f32 - }) - } -} +pub use crate::providers::Providers; fn remainder(item: &str) -> Option<&'static str> { match item { "minecraft:lava_bucket" | "minecraft:water_bucket" | "minecraft:milk_bucket" => { diff --git a/crates/horizon-client/src/lib.rs b/crates/horizon-client/src/lib.rs index 312cec37f..f66431332 100644 --- a/crates/horizon-client/src/lib.rs +++ b/crates/horizon-client/src/lib.rs @@ -141,6 +141,7 @@ pub mod portal_sections; pub mod pose; pub mod pregen; pub mod projectiles; +pub mod providers; pub mod raid; pub mod random_tick_sections; pub mod recipe_book; diff --git a/crates/horizon-client/src/mobs/spawner.rs b/crates/horizon-client/src/mobs/spawner.rs index dbb990090..7f8c707e0 100644 --- a/crates/horizon-client/src/mobs/spawner.rs +++ b/crates/horizon-client/src/mobs/spawner.rs @@ -111,22 +111,7 @@ impl SpawnData { } } -/// `Identifier.CODEC` parsing an entity id: lowercase namespace and path -/// characters, `minecraft` when the namespace is left out. -pub fn normalize_id(s: &str) -> Option { - let (ns, path) = match s.split_once(':') { - Some((ns, path)) => (if ns.is_empty() { "minecraft" } else { ns }, path), - None => ("minecraft", s), - }; - let ok = |c: char, slash: bool| { - c.is_ascii_lowercase() - || c.is_ascii_digit() - || matches!(c, '_' | '-' | '.') - || slash && c == '/' - }; - (ns.chars().all(|c| ok(c, false)) && path.chars().all(|c| ok(c, true))) - .then(|| format!("{ns}:{path}")) -} +pub use horizon_client_core::identifier::normalize_id; /// How much a slime's or magma cube's box is scaled by the size its data /// loads (`Slime.readAdditionalSaveData`: Size + 1, kept in 1..=127), which diff --git a/crates/horizon-client/src/mobs/villager_brain.rs b/crates/horizon-client/src/mobs/villager_brain.rs index 676d9b713..5be6ac935 100644 --- a/crates/horizon-client/src/mobs/villager_brain.rs +++ b/crates/horizon-client/src/mobs/villager_brain.rs @@ -790,20 +790,6 @@ pub fn golem_detected(m: &mut Mob, now: i64) { // ---- Behaviours --------------------------------------------------------- pub use crate::poi_sections::Poi; -impl Poi { - fn max_tickets(self) -> usize { - match self { - Poi::Meeting => 32, - _ => 1, - } - } - fn valid_range(self) -> i32 { - match self { - Poi::Meeting => 6, - _ => 1, - } - } -} /// The POI a block state is (`PoiTypes`): job site blocks, bed heads, bells. pub fn poi_at(w: &MobWorld, x: i32, y: i32, z: i32) -> Option { poi_of_state(w, w.world.block(x, y, z)) diff --git a/crates/horizon-client/src/poi_sections.rs b/crates/horizon-client/src/poi_sections.rs index a806706a1..46fe1ca0d 100644 --- a/crates/horizon-client/src/poi_sections.rs +++ b/crates/horizon-client/src/poi_sections.rs @@ -87,6 +87,22 @@ pub enum Poi { Home, Meeting, } +impl Poi { + /// `PoiType.maxTickets`. + pub fn max_tickets(self) -> usize { + match self { + Poi::Meeting => 32, + _ => 1, + } + } + /// `PoiType.validRange`. + pub fn valid_range(self) -> i32 { + match self { + Poi::Meeting => 6, + _ => 1, + } + } +} #[cfg(test)] mod tests { diff --git a/crates/horizon-client/src/providers.rs b/crates/horizon-client/src/providers.rs new file mode 100644 index 000000000..6dccea678 --- /dev/null +++ b/crates/horizon-client/src/providers.rs @@ -0,0 +1,122 @@ +//! Vanilla's `context_int_provider` and `context_float_provider` values (furnace +//! fuel times, brewing times), evaluated from the data pack's JSON. +use crate::items::{ItemStack, Items}; +use serde_json::Value; +use std::{collections::HashMap, fs, path::Path}; + +/// Evaluator for `context_int_provider` / `context_float_provider` values. +pub struct Providers { + ints: HashMap, + floats: HashMap, +} +fn load_dir(dir: &Path, prefix: &str, out: &mut HashMap) { + let Ok(entries) = fs::read_dir(dir) else { + return; + }; + for e in entries.flatten() { + let p = e.path(); + let name = p + .file_stem() + .and_then(|s| s.to_str()) + .unwrap_or("") + .to_owned(); + if p.is_dir() { + load_dir(&p, &format!("{prefix}{name}/"), out); + } else if let Ok(bytes) = fs::read(&p) + && let Ok(v) = serde_json::from_slice(&bytes) + { + out.insert(format!("minecraft:{prefix}{name}"), v); + } + } +} +impl Providers { + pub fn load(root: &Path) -> Self { + let mut ints = HashMap::new(); + let mut floats = HashMap::new(); + load_dir( + &root.join("data/minecraft/context_int_provider"), + "", + &mut ints, + ); + load_dir( + &root.join("data/minecraft/context_float_provider"), + "", + &mut floats, + ); + Self { ints, floats } + } + fn eval(v: &Value, fast: bool, table: &HashMap, depth: u32) -> f64 { + if depth > 16 { + return 0.0; + } + match v { + Value::Number(n) => n.as_f64().unwrap_or(0.0), + Value::String(name) => table + .get(name) + .map_or(0.0, |v| Self::eval(v, fast, table, depth + 1)), + Value::Object(o) => { + let f = + |k: &str| Self::eval(o.get(k).unwrap_or(&Value::Null), fast, table, depth + 1); + match o.get("type").and_then(Value::as_str).unwrap_or("") { + "minecraft:div" => { + let r = f("right"); + if r == 0.0 { + 0.0 + } else { + (f("left") / r).trunc() + } + } + "minecraft:mul" => f("left") * f("right"), + "minecraft:add" | "minecraft:sum" => f("left") + f("right"), + "minecraft:sub" => f("left") - f("right"), + "minecraft:constant" => f("value"), + "minecraft:conditional" => { + // The only condition in the pinned data: block/fast_cooking. + let condition = o.get("condition").and_then(Value::as_str) + == Some("minecraft:block/fast_cooking"); + if condition && fast { + f("on_true") + } else { + f("on_false") + } + } + _ => 0.0, + } + } + _ => 0.0, + } + } + /// A plain `context_int_provider` value or reference (no context conditions). + pub fn int_value(&self, v: &Value) -> i32 { + Self::eval(v, false, &self.ints, 0) as i32 + } + /// A plain `context_float_provider` value or reference; `default` when absent. + pub fn float_value(&self, v: &Value, default: f32) -> f32 { + if v.is_null() { + default + } else { + Self::eval(v, false, &self.floats, 0) as f32 + } + } + #[cfg(test)] + pub fn empty() -> Self { + Self { + ints: HashMap::new(), + floats: HashMap::new(), + } + } + pub fn burn_time(&self, items: &Items, stack: &ItemStack, fast: bool) -> i32 { + items + .get(&stack.item) + .and_then(|i| i.fuel.as_ref()) + .map_or(0, |(time, _)| Self::eval(time, fast, &self.ints, 0) as i32) + } + pub fn speed(&self, items: &Items, stack: &ItemStack, fast: bool) -> f32 { + items + .get(&stack.item) + .and_then(|i| i.fuel.as_ref()) + .map_or(1.0, |(_, speed)| { + Self::eval(speed, fast, &self.floats, 0) as f32 + }) + } +} diff --git a/crates/horizon-client/src/save.rs b/crates/horizon-client/src/save.rs index 3734da606..f07fc0801 100644 --- a/crates/horizon-client/src/save.rs +++ b/crates/horizon-client/src/save.rs @@ -105,14 +105,7 @@ pub fn chunks_with_block_entities<'a>( } use horizon_client_core::nbt_value::string; -pub use horizon_client_core::nbt_value::{number, text}; -pub(crate) fn float(tag: Option<&Tag>) -> Option { - Some(match tag? { - Tag::Float(b) => f64::from(f32::from_bits(*b)), - Tag::Double(b) => f64::from_bits(*b), - other => number(Some(other))? as f64, - }) -} +pub use horizon_client_core::nbt_value::{float, number, text}; /// Insert or replace a key of a compound tag. pub(crate) fn put(tag: &mut Tag, key: &str, value: Tag) { if let Tag::Compound(map) = tag { diff --git a/crates/horizon-client/src/sculk.rs b/crates/horizon-client/src/sculk.rs index 97a2187cb..071f6827a 100644 --- a/crates/horizon-client/src/sculk.rs +++ b/crates/horizon-client/src/sculk.rs @@ -2,7 +2,7 @@ //! `VibrationSelector`) shared by sculk sensors, shriekers and wardens, the //! sculk block entities and the per-player warden spawn tracker. pub use crate::chunk::block_entity::{Data, Info, SculkEntity, SculkKind, Selector}; -use crate::mobs::Who; +use horizon_client_core::who::Who; use horizon_core::{ geometry::{Direction, Vec3, traverse_blocks}, position::BlockPos, @@ -315,7 +315,9 @@ fn info_to_nbt(info: &Info) -> Tag { ]) } fn info_from_nbt(tag: &Tag) -> Option { - let event = intern(&crate::save::text(tag.get("game_event"))?)?; + let event = intern(&horizon_client_core::nbt_value::text( + tag.get("game_event"), + )?)?; let distance = match tag.get("distance") { Some(Tag::Float(f)) => f32::from_bits(*f), _ => 0.0, diff --git a/crates/horizon-client/src/vault.rs b/crates/horizon-client/src/vault.rs index 919ba8e56..ca5c08a7f 100644 --- a/crates/horizon-client/src/vault.rs +++ b/crates/horizon-client/src/vault.rs @@ -48,7 +48,9 @@ impl VaultConfig { let Tag::Compound(_) = tag else { return None; }; - let range = |k: &str, default: f64| crate::save::float(tag.get(k)).unwrap_or(default); + let range = |k: &str, default: f64| { + horizon_client_core::nbt_value::float(tag.get(k)).unwrap_or(default) + }; let config = Self { loot_table: identifier(tag.get("loot_table")) .unwrap_or_else(|| DEFAULT_LOOT_TABLE.into()), @@ -81,7 +83,7 @@ impl VaultConfig { ); } if let Some(key) = &self.key_item { - out.insert("key_item".into(), crate::save::item_to_nbt(key)); + out.insert("key_item".into(), horizon_items::item_nbt::item_to_nbt(key)); } if let Some(table) = &self.override_loot_table_to_display { out.insert( @@ -181,7 +183,7 @@ impl Default for Vault { /// An `Identifier` (`minecraft` when the namespace is left out). fn identifier(t: Option<&Tag>) -> Option { match t? { - Tag::String(s) => crate::mobs::spawner::normalize_id(&s.to_string_lossy()), + Tag::String(s) => horizon_client_core::identifier::normalize_id(&s.to_string_lossy()), _ => None, } } @@ -189,11 +191,12 @@ fn identifier(t: Option<&Tag>) -> Option { fn stack(tag: &Tag) -> Option { let id = identifier(tag.get("id"))?; if let Some(count) = tag.get("count") - && !crate::save::number(Some(count)).is_some_and(|c| (1..=99).contains(&c)) + && !horizon_client_core::nbt_value::number(Some(count)) + .is_some_and(|c| (1..=99).contains(&c)) { return None; } - let mut item = crate::save::item_from_nbt(tag)?; + let mut item = horizon_items::item_nbt::item_from_nbt(tag)?; item.item = id.as_str().into(); (&*item.item != "minecraft:air").then_some(item) } @@ -266,7 +269,8 @@ impl Vault { let get = |k: &str| server.and_then(|s| s.get(k)); v.rewarded_players = uuids(get("rewarded_players")).unwrap_or_default(); v.state_updating_resumes_at = - crate::save::number(get("state_updating_resumes_at")).unwrap_or(0); + horizon_client_core::nbt_value::number(get("state_updating_resumes_at")) + .unwrap_or(0); v.items_to_eject = match get("items_to_eject") { Some(Tag::List(list)) => list .iter() @@ -281,8 +285,9 @@ impl Vault { let get = |k: &str| shared.and_then(|s| s.get(k)); v.display_item = get("display_item").and_then(stack); v.connected_players = uuids(get("connected_players")).unwrap_or_default(); - v.connected_particles_range = crate::save::float(get("connected_particles_range")) - .unwrap_or(DEFAULT_DEACTIVATION_RANGE); + v.connected_particles_range = + horizon_client_core::nbt_value::float(get("connected_particles_range")) + .unwrap_or(DEFAULT_DEACTIVATION_RANGE); } v } @@ -305,7 +310,7 @@ impl Vault { let items = self .items_to_eject .iter() - .map(crate::save::item_to_nbt) + .map(horizon_items::item_nbt::item_to_nbt) .collect(); server.insert("items_to_eject".into(), Tag::List(items)); } @@ -325,7 +330,10 @@ impl Vault { fn update_shared(&self) -> Tag { let mut out = Compound::new(); if let Some(item) = &self.display_item { - out.insert("display_item".into(), crate::save::item_to_nbt(item)); + out.insert( + "display_item".into(), + horizon_items::item_nbt::item_to_nbt(item), + ); } if !self.connected_players.is_empty() { out.insert( diff --git a/tools/test_spawner_parity.py b/tools/test_spawner_parity.py index f94324cc9..7b08b408e 100644 --- a/tools/test_spawner_parity.py +++ b/tools/test_spawner_parity.py @@ -233,6 +233,7 @@ def main(): sources = [oracle, Path(__file__), lab.ROOT / 'crates/horizon-client/examples/probe/natural_spawn_fixture.rs', lab.ROOT / 'crates/horizon-client/src/mobs/spawner.rs', lab.ROOT / 'crates/horizon-client/src/chunk/block_entity.rs', + lab.ROOT / 'crates/horizon-client-core/src/identifier.rs', lab.ROOT / 'crates/horizon-client/src/mobs/spawn_selection.rs', lab.ROOT / 'crates/horizon-client/src/mobs/spawn_rules.rs'] tested = base.source_hashes(sources) diff --git a/tools/test_trial_spawner_parity.py b/tools/test_trial_spawner_parity.py index 6f588b785..17d636c48 100644 --- a/tools/test_trial_spawner_parity.py +++ b/tools/test_trial_spawner_parity.py @@ -198,6 +198,7 @@ def main(): lab.ROOT / 'crates/horizon-client/src/mobs/trial_spawner.rs', lab.ROOT / 'crates/horizon-client/src/mobs/spawner.rs', lab.ROOT / 'crates/horizon-client/src/chunk/block_entity.rs', + lab.ROOT / 'crates/horizon-client-core/src/identifier.rs', lab.ROOT / 'crates/horizon-client/src/mobs/spawn_selection.rs', lab.ROOT / 'crates/horizon-client/src/mobs/spawn_rules.rs'] tested = base.source_hashes(sources) diff --git a/tools/test_vault_parity.py b/tools/test_vault_parity.py index d3025623d..1f151c3a4 100644 --- a/tools/test_vault_parity.py +++ b/tools/test_vault_parity.py @@ -175,7 +175,9 @@ def main(): oracle = lab.ROOT / 'mods/horizon/src/test/java/dev/horizonlab/parity/VanillaNaturalSpawnOracle.java' sources = [oracle, Path(__file__), lab.ROOT / 'crates/horizon-client/examples/probe/natural_spawn_fixture.rs', lab.ROOT / 'crates/horizon-client/src/vault.rs', - lab.ROOT / 'crates/horizon-client/src/chunk/block_entity.rs'] + lab.ROOT / 'crates/horizon-client/src/chunk/block_entity.rs', + lab.ROOT / 'crates/horizon-client-core/src/identifier.rs', + lab.ROOT / 'crates/horizon-client-core/src/nbt_value.rs'] tested = base.source_hashes(sources) inputs = build / 'inputs.txt' cases = corpus()