diff --git a/crates/horizon-port-pack/src/processors.rs b/crates/horizon-port-pack/src/processors.rs index ca420b6ef..26a02ad31 100644 --- a/crates/horizon-port-pack/src/processors.rs +++ b/crates/horizon-port-pack/src/processors.rs @@ -453,6 +453,11 @@ fn referenced(lists: &Value, data: &ProcessorData) -> Option> { fn as_data(kind: &str, p: &Value, data: &ProcessorData) -> Option> { let (ns, _) = kind.split_once(':')?; Some(match kind { + // Its structure voids keep the world's block, as vanilla's + // block_ignore does (the templates hold them; vanilla places them). + "repurposed_structures:structure_void_processor" => vec![json!({ + "processor_type": "minecraft:block_ignore", + "blocks": ["minecraft:structure_void"]})], "moogs_structures:spawner_randomizing_processor" => { let mobs = p["weighted_entities"] .as_array()? @@ -1566,6 +1571,25 @@ mod tests { assert_eq!(p[13]["keep_properties"], true); } + #[test] + fn repurposed_structure_voids_keep_the_world() { + let mut list = json!({"processors": [ + {"processor_type": "repurposed_structures:structure_void_processor"}]}); + let mut carried = BTreeMap::new(); + assert!(carry( + "processor_list", + &mut list, + &ProcessorData::default(), + &mut carried + )); + assert_eq!( + list["processors"], + json!([{"processor_type": "minecraft:block_ignore", + "blocks": ["minecraft:structure_void"]}]) + ); + assert_eq!(carried["repurposed_structures:structure_void_processor"], 1); + } + #[test] fn pillars_become_the_games() { let mut d = ProcessorData::default(); diff --git a/docs/modpacks.md b/docs/modpacks.md index 369a36f2f..8ebd0fcea 100644 --- a/docs/modpacks.md +++ b/docs/modpacks.md @@ -518,6 +518,12 @@ Two cases the oracle fills in: integer field written as a float (`"rolls": {"min": 3.0, ...}`, as Towns and Towers writes them) counts as vanilla's int codecs count it. Of the 675 chest and other non-block tables in ATM10's carried mods, 534 now fill a chest (seed 1; none before). + Repurposed's structure voids keep the world's block, as vanilla's `minecraft:block_ignore` + does (its 82 lists: mineshafts, the ocean and swamp villages, the ocean and taiga temples, + the jungle pyramid's hidden room). Before, the game placed them like any template block: + around the ocean mineshaft at chunk (-18, -54), seed 1234, 974 structure voids took the + place of 464 prismarine blocks of its walls, 225 of water (dry holes in the sea), 279 of + air and cave air and 6 rails and walls. - **Rule tests** written in Java. Repurposed Structures' mineshafts and Nether monument test blocks with three of the mod's own rule tests inside vanilla `rule` processors: what a block is made of (solid, liquid, air, with rails and chains), a chance over the distance