Merge pull request #1022 from ludovic111/fix/carry-rs-structure-void

🤖 Agent: merged after verify and CI parity passed (modpacks-11).
This commit is contained in:
Ludovic Marie
2026-10-19 17:23:00 +02:00
committed by GitHub
2 changed files with 30 additions and 0 deletions
@@ -453,6 +453,11 @@ fn referenced(lists: &Value, data: &ProcessorData) -> Option<Vec<Value>> {
fn as_data(kind: &str, p: &Value, data: &ProcessorData) -> Option<Vec<Value>> {
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();
+6
View File
@@ -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