From 54b939e717c1c19d5ad329553a337543736ed435 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Mon, 12 Oct 2026 17:46:50 +0200 Subject: [PATCH 01/25] WIP: unfinished old-saves parity work, stopped by Ludovic Uncommitted changes the agent had in progress when it was stopped on 2026-10-12; may not build or pass its harnesses yet. Co-Authored-By: Claude Opus 5.5 --- .../horizon-world/src/datafix/fixes_cliffs.rs | 289 ++++++++++++++++++ tools/datafix_scene.py | 3 +- tools/datafix_worlds.py | 2 +- 3 files changed, 292 insertions(+), 2 deletions(-) diff --git a/crates/horizon-world/src/datafix/fixes_cliffs.rs b/crates/horizon-world/src/datafix/fixes_cliffs.rs index 0826433c8..796268093 100644 --- a/crates/horizon-world/src/datafix/fixes_cliffs.rs +++ b/crates/horizon-world/src/datafix/fixes_cliffs.rs @@ -4,12 +4,55 @@ use super::dynamic::{ as_bool, as_byte_buffer, as_int, as_int_stream, as_long_stream, as_number, as_str, ceillog2, empty_map, remove, rename, set, stream, string, }; +use super::fixes_a::block_rename; use super::fixes_b::advancements_rename; use super::schema::{Key, Ty, key}; use super::{Cx, FixFn, renamer}; use crate::nbt::{Compound, JavaString, Tag}; pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { + out.push((key(2679, 0), cauldron_rename)); + out.push((key(2680, 0), |cx| { + let t = &[("minecraft:grass_path", "minecraft:dirt_path")]; + cx.rename(Ty::ItemName, renamer(t)); + })); + out.push((key(2680, 0), |cx| { + block_rename(cx, &[("minecraft:grass_path", "minecraft:dirt_path")]) + })); + out.push((key(2690, 0), |cx| cx.rename(Ty::ItemName, renamer(COPPER)))); + out.push((key(2690, 0), |cx| block_rename(cx, COPPER))); + out.push((key(2691, 0), |cx| cx.rename(Ty::ItemName, renamer(WAXED_COPPER)))); + out.push((key(2691, 0), |cx| block_rename(cx, WAXED_COPPER))); + out.push((key(2693, 0), |cx| add_flag(cx, "has_increased_height_already", false))); + out.push((key(2696, 0), |cx| cx.rename(Ty::ItemName, renamer(GRIMSTONE)))); + out.push((key(2696, 0), |cx| block_rename(cx, GRIMSTONE))); + out.push((key(2700, 0), |cx| { + block_rename( + cx, + &[ + ("minecraft:cave_vines_head", "minecraft:cave_vines"), + ("minecraft:cave_vines_body", "minecraft:cave_vines_plant"), + ], + ) + })); + out.push((key(2701, 0), feature_pool_elements)); + out.push((key(2702, 0), arrow_pickup)); + out.push((key(2707, 0), |cx| add_flag(cx, "has_increased_height_already", true))); + out.push((key(2710, 0), |cx| { + stats_rename(cx, &[("minecraft:play_one_minute", "minecraft:play_time")]) + })); + out.push((key(2717, 0), |cx| { + cx.rename( + Ty::ItemName, + renamer(&[("minecraft:azalea_leaves_flowers", "minecraft:flowering_azalea_leaves")]), + ) + })); + out.push((key(2717, 0), |cx| { + block_rename( + cx, + &[("minecraft:azalea_leaves_flowers", "minecraft:flowering_azalea_leaves")], + ) + })); out.push((key(2825, 0), |cx| { add_flag(cx, "has_increased_height_already", false) })); @@ -308,6 +351,252 @@ fn structures_become_configured(cx: &mut Cx) { }); } +// ------------------------------------------------------------------ 2679 to 2717 + +/// `CauldronRenameFix`. +fn cauldron_rename(cx: &mut Cx) { + cx.each(Ty::BlockState, |v| { + if as_str(v.get("Name")).as_deref() != Some("minecraft:cauldron") { + return; + } + let level = v + .get("Properties") + .and_then(|p| as_str(p.get("level"))) + .unwrap_or_else(|| "0".into()); + if level == "0" { + remove(v, "Properties"); + } else { + set(v, "Name", string("minecraft:water_cauldron")); + } + }); +} + +const COPPER: &[(&str, &str)] = &[ + ("minecraft:weathered_copper_block", "minecraft:oxidized_copper_block"), + ("minecraft:semi_weathered_copper_block", "minecraft:weathered_copper_block"), + ("minecraft:lightly_weathered_copper_block", "minecraft:exposed_copper_block"), + ("minecraft:weathered_cut_copper", "minecraft:oxidized_cut_copper"), + ("minecraft:semi_weathered_cut_copper", "minecraft:weathered_cut_copper"), + ("minecraft:lightly_weathered_cut_copper", "minecraft:exposed_cut_copper"), + ("minecraft:weathered_cut_copper_stairs", "minecraft:oxidized_cut_copper_stairs"), + ("minecraft:semi_weathered_cut_copper_stairs", "minecraft:weathered_cut_copper_stairs"), + ("minecraft:lightly_weathered_cut_copper_stairs", "minecraft:exposed_cut_copper_stairs"), + ("minecraft:weathered_cut_copper_slab", "minecraft:oxidized_cut_copper_slab"), + ("minecraft:semi_weathered_cut_copper_slab", "minecraft:weathered_cut_copper_slab"), + ("minecraft:lightly_weathered_cut_copper_slab", "minecraft:exposed_cut_copper_slab"), + ("minecraft:waxed_semi_weathered_copper", "minecraft:waxed_weathered_copper"), + ("minecraft:waxed_lightly_weathered_copper", "minecraft:waxed_exposed_copper"), + ("minecraft:waxed_semi_weathered_cut_copper", "minecraft:waxed_weathered_cut_copper"), + ("minecraft:waxed_lightly_weathered_cut_copper", "minecraft:waxed_exposed_cut_copper"), + ("minecraft:waxed_semi_weathered_cut_copper_stairs", "minecraft:waxed_weathered_cut_copper_stairs"), + ("minecraft:waxed_lightly_weathered_cut_copper_stairs", "minecraft:waxed_exposed_cut_copper_stairs"), + ("minecraft:waxed_semi_weathered_cut_copper_slab", "minecraft:waxed_weathered_cut_copper_slab"), + ("minecraft:waxed_lightly_weathered_cut_copper_slab", "minecraft:waxed_exposed_cut_copper_slab"), +]; + +const WAXED_COPPER: &[(&str, &str)] = &[ + ("minecraft:waxed_copper", "minecraft:waxed_copper_block"), + ("minecraft:oxidized_copper_block", "minecraft:oxidized_copper"), + ("minecraft:weathered_copper_block", "minecraft:weathered_copper"), + ("minecraft:exposed_copper_block", "minecraft:exposed_copper"), +]; + +const GRIMSTONE: &[(&str, &str)] = &[ + ("minecraft:grimstone", "minecraft:deepslate"), + ("minecraft:grimstone_slab", "minecraft:cobbled_deepslate_slab"), + ("minecraft:grimstone_stairs", "minecraft:cobbled_deepslate_stairs"), + ("minecraft:grimstone_wall", "minecraft:cobbled_deepslate_wall"), + ("minecraft:polished_grimstone", "minecraft:polished_deepslate"), + ("minecraft:polished_grimstone_slab", "minecraft:polished_deepslate_slab"), + ("minecraft:polished_grimstone_stairs", "minecraft:polished_deepslate_stairs"), + ("minecraft:polished_grimstone_wall", "minecraft:polished_deepslate_wall"), + ("minecraft:grimstone_tiles", "minecraft:deepslate_tiles"), + ("minecraft:grimstone_tile_slab", "minecraft:deepslate_tile_slab"), + ("minecraft:grimstone_tile_stairs", "minecraft:deepslate_tile_stairs"), + ("minecraft:grimstone_tile_wall", "minecraft:deepslate_tile_wall"), + ("minecraft:grimstone_bricks", "minecraft:deepslate_bricks"), + ("minecraft:grimstone_brick_slab", "minecraft:deepslate_brick_slab"), + ("minecraft:grimstone_brick_stairs", "minecraft:deepslate_brick_stairs"), + ("minecraft:grimstone_brick_wall", "minecraft:deepslate_brick_wall"), + ("minecraft:chiseled_grimstone", "minecraft:chiseled_deepslate"), +]; + +/// `SavedDataFeaturePoolElementFix`: the feature of jigsaw pieces' feature pool +/// elements, from an inline configuration to a configured feature id. +fn feature_pool_elements(cx: &mut Cx) { + cx.each(Ty::StructureFeature, |v| { + let Some(children) = v.get("Children") else { + return; + }; + if !super::dynamic::is_list(Some(children)) { + return; + } + let fixed = stream(Some(children)) + .into_iter() + .map(|mut child| { + let id = as_str(child.get("id")).unwrap_or_default(); + if !matches!( + id.as_str(), + "minecraft:jigsaw" + | "minecraft:nvi" + | "minecraft:pcp" + | "minecraft:bastionremnant" + | "minecraft:runtime" + ) { + return child; + } + let element = child.get("pool_element"); + let is_feature = element.and_then(|e| as_str(e.get("element_type"))).as_deref() + == Some("minecraft:feature_pool_element"); + if is_feature + && let Some(f) = child + .get_mut("pool_element") + .and_then(|p| p.get_mut("feature")) + && let Some(new) = feature_replacement(f) + { + *f = string(new); + } + child + }) + .collect(); + set(v, "Children", Tag::List(fixed)); + }); +} + +fn path_str(v: &Tag, path: &[&str]) -> String { + let mut cur = Some(v.clone()); + for p in path { + cur = match (cur, p.strip_prefix('[').and_then(|s| s.strip_suffix(']'))) { + (Some(c), Some(index)) => { + let i: usize = index.parse().unwrap_or(usize::MAX); + stream(Some(&c)).into_iter().nth(i) + } + (Some(c), None) => c.get(p).cloned(), + (None, _) => None, + }; + } + as_str(cur.as_ref()).unwrap_or_default() +} + +/// `SavedDataFeaturePoolElementFix.getReplacement`. +fn feature_replacement(value: &Tag) -> Option<&'static str> { + let ty = path_str(value, &["type"]); + let name = path_str(value, &["name"]); + let provider = path_str(value, &["config", "state_provider", "type"]); + let state = path_str(value, &["config", "state_provider", "state", "Name"]); + let first = path_str( + value, + &["config", "state_provider", "entries", "[0]", "data", "Name"], + ); + let foliage = path_str(value, &["config", "foliage_placer", "type"]); + let leaves = path_str(value, &["config", "leaves_provider", "state", "Name"]); + let feature = if !ty.is_empty() { + ty + } else if name.is_empty() { + return None; + } else if name == "minecraft:normal_tree" { + "minecraft:tree".to_owned() + } else { + name + }; + match feature.as_str() { + "minecraft:random_patch" => { + if provider == "minecraft:simple_state_provider" { + match state.as_str() { + "minecraft:sweet_berry_bush" => return Some("minecraft:patch_berry_bush"), + "minecraft:cactus" => return Some("minecraft:patch_cactus"), + _ => {} + } + } else if provider == "minecraft:weighted_state_provider" + && (first == "minecraft:grass" || first == "minecraft:fern") + { + return Some("minecraft:patch_taiga_grass"); + } + } + "minecraft:block_pile" => { + if provider != "minecraft:simple_state_provider" + && provider != "minecraft:rotated_block_provider" + { + if provider == "minecraft:weighted_state_provider" { + match first.as_str() { + "minecraft:packed_ice" | "minecraft:blue_ice" => { + return Some("minecraft:pile_ice"); + } + "minecraft:jack_o_lantern" | "minecraft:pumpkin" => { + return Some("minecraft:pile_pumpkin"); + } + _ => {} + } + } + } else { + match state.as_str() { + "minecraft:hay_block" => return Some("minecraft:pile_hay"), + "minecraft:melon" => return Some("minecraft:pile_melon"), + "minecraft:snow" => return Some("minecraft:pile_snow"), + _ => {} + } + } + } + "minecraft:flower" => return Some("minecraft:flower_plain"), + "minecraft:tree" => match foliage.as_str() { + "minecraft:acacia_foliage_placer" => return Some("minecraft:acacia"), + "minecraft:blob_foliage_placer" if leaves == "minecraft:oak_leaves" => { + return Some("minecraft:oak"); + } + "minecraft:pine_foliage_placer" => return Some("minecraft:pine"), + "minecraft:spruce_foliage_placer" => return Some("minecraft:spruce"), + _ => {} + }, + _ => {} + } + None +} + +/// `AbstractArrowPickupFix`. +fn arrow_pickup(cx: &mut Cx) { + cx.each(Ty::Entity, |e| { + let id = as_str(e.get("id")).map(|s| super::dynamic::namespaced(&s)); + if !matches!( + id.as_deref(), + Some("minecraft:arrow" | "minecraft:spectral_arrow" | "minecraft:trident") + ) || e.get("pickup").is_some() + { + return; + } + let from_player = as_bool(e.get("player"), true); + set(e, "pickup", Tag::Byte(i8::from(from_player))); + remove(e, "player"); + }); +} + +/// `StatsRenameFix`: custom statistics and the objectives that count them. +pub(super) fn stats_rename(cx: &mut Cx, table: &[(&str, &'static str)]) { + let r = renamer(table); + cx.each(Ty::Stats, |v| { + if let Some(Tag::Compound(custom)) = v + .get_mut("stats") + .and_then(|s| s.get_mut("minecraft:custom")) + { + let old = std::mem::take(custom); + for (k, value) in old { + let name = super::dynamic::namespaced(&k.to_string_lossy()); + let name = r(&name).map_or(name, str::to_owned); + custom.insert(JavaString::from(name.as_str()), value); + } + } + }); + cx.each(Ty::Objective, |v| { + if let Some(ct) = v.get_mut("CriteriaType") + && as_str(ct.get("type")).as_deref() == Some("minecraft:custom") + && let Some(id) = as_str(ct.get("id")) + { + let id = super::dynamic::namespaced(&id); + let new = r(&id).map_or(id, str::to_owned); + set(ct, "id", string(&new)); + } + }); +} + // ------------------------------------------------------------------ 2825 to 2843 /// `AddFlagIfNotPresentFix` over the world generation settings. diff --git a/tools/datafix_scene.py b/tools/datafix_scene.py index 265f614ec..384c33ae5 100644 --- a/tools/datafix_scene.py +++ b/tools/datafix_scene.py @@ -147,6 +147,7 @@ def items(e, version=None): ITEM_SINCE = { 'minecraft:goat_horn': 3105, 'minecraft:decorated_pot': 3327, + 'minecraft:axolotl_bucket': 2686, } @@ -309,7 +310,7 @@ def entities(e, version): ('allay', 'Inventory:[{id:"minecraft:diamond",Count:1b}]'), ('goat', ''), ] - since = {'allay': 3105, 'chest_boat': 3105, 'text_display': 3325, 'item_display': 3325} + since = {'allay': 3105, 'chest_boat': 3105, 'text_display': 3325, 'item_display': 3325, 'goat': 2700} out = [(k, x) for k, x in out if version >= since.get(k, 0)] if version < 3086: # cats before 1.19 have a numeric CatType out = [(k, 'CatType:1' if k == 'cat' else x) for k, x in out] diff --git a/tools/datafix_worlds.py b/tools/datafix_worlds.py index 27d1b19ce..e390dbf9f 100644 --- a/tools/datafix_worlds.py +++ b/tools/datafix_worlds.py @@ -37,7 +37,7 @@ LOCAL = ROOT / '.local' / 'datafix' # Old server jars and their worlds are inputs, not outputs: keep them beside the # vanilla data, which parallel worktrees share (.local/minecraft links there). SHARED = (ROOT / '.local' / 'minecraft').resolve().parent / 'datafix' -VERSIONS = ['1.17.1', '1.18.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4', '1.20.5', '1.20.6', '1.21.1', +VERSIONS = ['1.16.5', '1.17.1', '1.18.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4', '1.20.5', '1.20.6', '1.21.1', '1.21.3', '1.21.4', '1.21.5', '1.21.6', '1.21.8', '1.21.9', '1.21.10', '1.21.11', '26.1', '26.1.2', '26.2'] MANIFEST = 'https://piston-meta.mojang.com/mc/game/version_manifest_v2.json' LOCK = json.loads((ROOT / 'research-lock.json').read_text())['java_runtimes'] From 19896fb6f122decc2a876fcc1b28108bbba7ef91 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Mon, 12 Oct 2026 23:59:20 +0200 Subject: [PATCH 02/25] Support saves from 1.16.5 (DataVersion 2571 on): replaceitem for pre-1.17 scenes --- crates/horizon-world/src/datafix/mod.rs | 2 +- tools/datafix_scene.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/horizon-world/src/datafix/mod.rs b/crates/horizon-world/src/datafix/mod.rs index b787a22c5..ab3cf4a7b 100644 --- a/crates/horizon-world/src/datafix/mod.rs +++ b/crates/horizon-world/src/datafix/mod.rs @@ -29,7 +29,7 @@ use schema::{Key, Ty, key, walk}; pub const CURRENT: i32 = crate::DATA_VERSION; /// Data saved before this DataVersion (1.17 is 2724) needs fixes that are not /// ported (2717 and everything before). -pub const OLDEST_SUPPORTED: i32 = 2724; +pub const OLDEST_SUPPORTED: i32 = 2571; /// `Identifier.tryParse` validity, as `NamespacedSchema.ensureNamespaced` uses it. pub fn identifier(id: &str) -> Option<(String, String)> { diff --git a/tools/datafix_scene.py b/tools/datafix_scene.py index 384c33ae5..0f1861487 100644 --- a/tools/datafix_scene.py +++ b/tools/datafix_scene.py @@ -367,10 +367,14 @@ def player_commands(e, name, version=None): """Give the joined bot a varied inventory and ender chest.""" out = [] stacks = items(e, version) + if version is not None and version < 2700: # `/item` arrived in 1.17 + replace = lambda slot, item: f'replaceitem entity {name} {slot} {item}' + else: + replace = lambda slot, item: f'item replace entity {name} {slot} with {item}' for i, stack in enumerate(stacks[:30]): - out.append(f'item replace entity {name} container.{i} with {give_form(e, stack)}') - out.append(f'item replace entity {name} enderchest.0 with {give_form(e, stacks[0])}') - out.append(f'item replace entity {name} armor.head with minecraft:iron_helmet') + out.append(replace(f'container.{i}', give_form(e, stack))) + out.append(replace('enderchest.0', give_form(e, stacks[0]))) + out.append(replace('armor.head', 'minecraft:iron_helmet')) out.append(f'xp set {name} 5 levels') return out From 93ac585c74768c616a2e03c52b238d5466126b49 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:02:25 +0200 Subject: [PATCH 03/25] Datafix worlds: list 1.12.2, 1.13.2 and 1.14.4 --- tools/datafix_worlds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/datafix_worlds.py b/tools/datafix_worlds.py index e390dbf9f..6cae508c0 100644 --- a/tools/datafix_worlds.py +++ b/tools/datafix_worlds.py @@ -37,7 +37,7 @@ LOCAL = ROOT / '.local' / 'datafix' # Old server jars and their worlds are inputs, not outputs: keep them beside the # vanilla data, which parallel worktrees share (.local/minecraft links there). SHARED = (ROOT / '.local' / 'minecraft').resolve().parent / 'datafix' -VERSIONS = ['1.16.5', '1.17.1', '1.18.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4', '1.20.5', '1.20.6', '1.21.1', +VERSIONS = ['1.12.2', '1.13.2', '1.14.4', '1.16.5', '1.17.1', '1.18.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4', '1.20.5', '1.20.6', '1.21.1', '1.21.3', '1.21.4', '1.21.5', '1.21.6', '1.21.8', '1.21.9', '1.21.10', '1.21.11', '26.1', '26.1.2', '26.2'] MANIFEST = 'https://piston-meta.mojang.com/mc/game/version_manifest_v2.json' LOCK = json.loads((ROOT / 'research-lock.json').read_text())['java_runtimes'] From d22932677989c46d4b8982793e2d468e5f44ee24 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:06:19 +0200 Subject: [PATCH 04/25] Datafix harness: --band TARGET checks the fixes up to a DataVersion on legacy-layout worlds; fixes sorted by key --- .../horizon-world/examples/datafix_world.rs | 19 +++++-- crates/horizon-world/src/datafix/files.rs | 56 ++++++++++++++++++- crates/horizon-world/src/datafix/mod.rs | 32 +++++++++-- .../parity/VanillaDataFixOracle.java | 51 +++++++++++++++++ tools/test_datafix_parity.py | 22 +++++--- 5 files changed, 159 insertions(+), 21 deletions(-) diff --git a/crates/horizon-world/examples/datafix_world.rs b/crates/horizon-world/examples/datafix_world.rs index f9e0a1725..d3e189d85 100644 --- a/crates/horizon-world/examples/datafix_world.rs +++ b/crates/horizon-world/examples/datafix_world.rs @@ -1,6 +1,8 @@ //! Upgrade a copy of a world saved by 1.20 to 26.2 to the 26.3 format, as //! vanilla 26.3 does when it opens it and reads every file: -//! `datafix_world IN_WORLD OUT_WORLD` (used by tools/test_datafix_parity.py). +//! `datafix_world IN_WORLD OUT_WORLD [TARGET]` (used by tools/test_datafix_parity.py). +//! With a TARGET DataVersion only the data fixes up to it run, on a world in the +//! layout of before 1.16. use horizon_world::datafix::files; use std::{env, fs, io, path::Path, process::ExitCode}; @@ -20,9 +22,13 @@ fn copy(from: &Path, to: &Path) -> io::Result<()> { fn main() -> ExitCode { let args: Vec = env::args().skip(1).collect(); - let [input, output] = args.as_slice() else { - eprintln!("usage: datafix_world IN_WORLD OUT_WORLD"); - return ExitCode::from(2); + let (input, output, target) = match args.as_slice() { + [input, output] => (input, output, None), + [input, output, target] => (input, output, target.parse::().ok()), + _ => { + eprintln!("usage: datafix_world IN_WORLD OUT_WORLD [TARGET]"); + return ExitCode::from(2); + } }; let output = Path::new(output); let result = (|| { @@ -30,7 +36,10 @@ fn main() -> ExitCode { fs::remove_dir_all(output)?; } copy(Path::new(input), output)?; - files::upgrade_world(output) + match target { + Some(target) => files::upgrade_band(output, target).map(|()| target), + None => files::upgrade_world(output), + } })(); match result { Ok(version) => { diff --git a/crates/horizon-world/src/datafix/files.rs b/crates/horizon-world/src/datafix/files.rs index 0ee3d385d..643cd4390 100644 --- a/crates/horizon-world/src/datafix/files.rs +++ b/crates/horizon-world/src/datafix/files.rs @@ -611,6 +611,10 @@ fn tag_to_json(t: &Tag) -> Json { } fn upgrade_json(path: &Path, ty: Ty) -> io::Result<()> { + upgrade_json_to(path, ty, CURRENT) +} + +fn upgrade_json_to(path: &Path, ty: Ty, to: i32) -> io::Result<()> { let text = fs::read_to_string(path)?; let units: Vec = text.encode_utf16().collect(); let parsed = json::parse_lenient(&units) @@ -621,8 +625,8 @@ fn upgrade_json(path: &Path, ty: Ty) -> io::Result<()> { // `PlayerAdvancements`: the version field is not part of the data. remove(&mut tag, "DataVersion"); } - update(ty, &mut tag, from, CURRENT); - set(&mut tag, "DataVersion", Tag::Int(CURRENT)); + update(ty, &mut tag, from, to); + set(&mut tag, "DataVersion", Tag::Int(to)); let out = json::to_stable_string(&tag_to_json(&tag)); fs::write(path, String::from_utf16_lossy(&out)) } @@ -672,6 +676,54 @@ pub fn upgrade_world_data(base: &Path) -> io::Result<()> { Ok(()) } +/// A world in the layout of before 1.16 (dimension folders in the world folder, +/// `playerdata`, `stats`, `advancements`) brought to DataVersion `target` and +/// no further, without the file fixes: the harness checks the data fixes of a +/// range of versions on their own (the vanilla oracle does the same given a +/// target). +pub fn upgrade_band(base: &Path, target: i32) -> io::Result<()> { + let level = base.join("level.dat"); + if let Some(mut root) = read_dat(&level)? { + let mut data = root + .get("Data") + .cloned() + .unwrap_or_else(|| Tag::Compound(Compound::new())); + let from = data_version(&data, -1); + update(Ty::Level, &mut data, from, target); + set(&mut data, "DataVersion", Tag::Int(target)); + set(&mut root, "Data", data); + write_dat(&level, &root)?; + } + for (folder, id) in [ + ("", "minecraft:overworld"), + ("DIM-1", "minecraft:the_nether"), + ("DIM1", "minecraft:the_end"), + ] { + let dim = base.join(folder); + upgrade_regions(&dim.join("region"), |tag| { + super::update_chunk_to(tag, id, None, target) + })?; + upgrade_regions(&dim.join("entities"), |tag| { + super::update_region_tag_to(Ty::EntityChunk, tag, target) + })?; + upgrade_regions(&dim.join("poi"), |tag| { + super::update_region_tag_to(Ty::PoiChunk, tag, target) + })?; + } + for file in files_with_suffix(&base.join("playerdata"), ".dat") { + if let Some(mut tag) = read_dat(&file)? { + super::update_player_to(&mut tag, target); + write_dat(&file, &tag)?; + } + } + for (folder, ty) in [("advancements", Ty::Advancements), ("stats", Ty::Stats)] { + for file in files_with_suffix(&base.join(folder), ".json") { + upgrade_json_to(&file, ty, target)?; + } + } + Ok(()) +} + /// Bring a whole world saved by 1.20 to 26.2 to the 26.3 format in place. pub fn upgrade_world(base: &Path) -> io::Result { let version = fix_world_files(base)?; diff --git a/crates/horizon-world/src/datafix/mod.rs b/crates/horizon-world/src/datafix/mod.rs index ab3cf4a7b..eecd9c268 100644 --- a/crates/horizon-world/src/datafix/mod.rs +++ b/crates/horizon-world/src/datafix/mod.rs @@ -182,6 +182,8 @@ fn fixes() -> Vec<(Key, FixFn)> { fixes_a::register(&mut out); fixes_b::register(&mut out); fixes_c::register(&mut out); + // DataFixerBuilder sorts the fixes of equal keys by registration, the rest by key. + out.sort_by_key(|(k, _)| *k); out } @@ -227,8 +229,14 @@ fn write_hooks(root: Ty, data: &mut Tag, k: Key) { /// `SimpleRegionStorage.upgradeChunkTag` for a region chunk (`ChunkMap`): /// the dimension and generator are passed to the fixes as `__context`. pub fn update_chunk(tag: &mut Tag, dimension: &str, generator: Option<&str>) { + update_chunk_to(tag, dimension, generator, CURRENT); +} + +/// [`update_chunk`] up to an older DataVersion than the current one (the +/// harness checks the fixes of a range of versions on their own). +pub fn update_chunk_to(tag: &mut Tag, dimension: &str, generator: Option<&str>, to: i32) { let version = dynamic::as_int(tag.get("DataVersion"), -1); - if version >= CURRENT { + if version >= to { return; } let mut context = Tag::compound([("dimension", string(dimension))]); @@ -236,21 +244,26 @@ pub fn update_chunk(tag: &mut Tag, dimension: &str, generator: Option<&str>) { dynamic::set(&mut context, "generator", string(g)); } dynamic::set(tag, "__context", context); - update(Ty::Chunk, tag, version, CURRENT); + update(Ty::Chunk, tag, version, to); dynamic::remove(tag, "__context"); - dynamic::set(tag, "DataVersion", Tag::Int(CURRENT)); + dynamic::set(tag, "DataVersion", Tag::Int(to)); } /// `SimpleRegionStorage.upgradeChunkTag` for entity chunks (default version -1) /// and POI chunks (default 1945). pub fn update_region_tag(root: Ty, tag: &mut Tag) { + update_region_tag_to(root, tag, CURRENT); +} + +/// [`update_region_tag`] up to an older DataVersion. +pub fn update_region_tag_to(root: Ty, tag: &mut Tag, to: i32) { let default = if root == Ty::PoiChunk { 1945 } else { -1 }; let version = dynamic::as_int(tag.get("DataVersion"), default); - if version >= CURRENT { + if version >= to { return; } - update(root, tag, version, CURRENT); - dynamic::set(tag, "DataVersion", Tag::Int(CURRENT)); + update(root, tag, version, to); + dynamic::set(tag, "DataVersion", Tag::Int(to)); } /// `PlayerDataStorage.load`: the DataVersion field stays as loaded. @@ -259,6 +272,13 @@ pub fn update_player(tag: &mut Tag) { update(Ty::Player, tag, version, CURRENT); } +/// [`update_player`] up to an older DataVersion. +pub fn update_player_to(tag: &mut Tag, to: i32) { + let version = dynamic::as_int(tag.get("DataVersion"), -1); + update(Ty::Player, tag, version, to); + dynamic::set(tag, "DataVersion", Tag::Int(to)); +} + /// The saved data type of a file below a `data` folder (`namespace/path.dat`). pub fn saved_data_type(relative: &str) -> Option { let name = relative.strip_suffix(".dat").unwrap_or(relative); diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java index 462da8388..f1c5f92e9 100644 --- a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java @@ -55,6 +55,10 @@ public final class VanillaDataFixOracle { Path out = Path.of(args[1]); delete(out); copy(in, out); + if (args.length > 2) { + band(out, Integer.parseInt(args[2])); + System.exit(0); + } int current = SharedConstants.getCurrentVersion().dataVersion().version(); var fixer = DataFixers.getDataFixer(); // FileFixerUpper.fix through a real level storage access, as the game opens a @@ -112,6 +116,53 @@ public final class VanillaDataFixOracle { System.exit(0); } + /** + * The data fixes up to a target DataVersion on a world in the layout of before + * 1.16, without the file fixes: lets the fixes of a range of versions be checked + * on their own, whatever the later fixes do to the same data. + */ + private static void band(Path out, int target) throws Exception { + var fixer = DataFixers.getDataFixer(); + Path levelFile = out.resolve("level.dat"); + if (Files.exists(levelFile)) { + CompoundTag root = NbtIo.readCompressed(levelFile, NbtAccounter.unlimitedHeap()); + CompoundTag data = root.getCompoundOrEmpty("Data"); + int from = NbtUtils.getDataVersion(data, -1); + data = DataFixTypes.LEVEL.update(fixer, data, from, target); + root.put("Data", NbtUtils.addDataVersion(data, target)); + NbtIo.writeCompressed(root, levelFile); + } + String[][] dims = {{"", "minecraft:overworld"}, {"DIM-1", "minecraft:the_nether"}, {"DIM1", "minecraft:the_end"}}; + for (String[] d : dims) { + Path dim = d[0].isEmpty() ? out : out.resolve(d[0]); + ResourceKey key = ResourceKey.create(Registries.DIMENSION, Identifier.parse(d[1])); + CompoundTag context = ChunkMap.getChunkDataFixContextTag(key, Optional.empty()); + upgradeRegions(dim.resolve("region"), key, "chunk", DataFixTypes.CHUNK, -1, context, target); + upgradeRegions(dim.resolve("entities"), key, "entities", DataFixTypes.ENTITY_CHUNK, -1, null, target); + upgradeRegions(dim.resolve("poi"), key, "poi", DataFixTypes.POI_CHUNK, 1945, null, target); + } + for (Path file : list(out.resolve("playerdata"), ".dat")) { + CompoundTag tag = NbtIo.readCompressed(file, NbtAccounter.unlimitedHeap()); + tag = DataFixTypes.PLAYER.update(fixer, tag, NbtUtils.getDataVersion(tag), target); + NbtIo.writeCompressed(NbtUtils.addDataVersion(tag, target), file); + } + upgradeJson(out.resolve("advancements"), DataFixTypes.ADVANCEMENTS, true, target); + upgradeJson(out.resolve("stats"), DataFixTypes.STATS, false, target); + } + + private static void upgradeJson(Path folder, DataFixTypes type, boolean removeVersion, int target) throws Exception { + var fixer = DataFixers.getDataFixer(); + for (Path file : list(folder, ".json")) { + JsonElement json = JsonParser.parseString(Files.readString(file, StandardCharsets.UTF_8)); + var dynamic = new Dynamic<>(JsonOps.INSTANCE, json); + int from = NbtUtils.getDataVersion(dynamic, 1343); + var input = removeVersion ? dynamic.remove("DataVersion") : dynamic; + var fixed = type.update(fixer, input, from, target); + fixed = fixed.set("DataVersion", fixed.createInt(target)); + Files.writeString(file, GSON.toJson(fixed.getValue()), StandardCharsets.UTF_8); + } + } + /** Chunk generator type per dimension, from the saved world generation settings. */ private static Map generators(Path world) throws Exception { Map out = new HashMap<>(); diff --git a/tools/test_datafix_parity.py b/tools/test_datafix_parity.py index f03183ae0..471fccaea 100644 --- a/tools/test_datafix_parity.py +++ b/tools/test_datafix_parity.py @@ -83,20 +83,20 @@ def shard(items): return items[index - 1::count] -def run_vanilla(classpath, world, out): +def run_vanilla(classpath, world, out, target=None): # The oracle replaces OUT itself: left in place, an unchanged run's outputs can be reused. log = out.parent / (out.name + '.log') with log.open('w') as f: subprocess.run(['java', '-Xmx3g', '-Djava.awt.headless=true', '-cp', classpath, - 'dev.horizonlab.parity.VanillaDataFixOracle', str(world), str(out)], + 'dev.horizonlab.parity.VanillaDataFixOracle', str(world), str(out), *([str(target)] if target else [])], check=True, stdout=f, stderr=subprocess.STDOUT) -def run_horizon(binary, world, out): +def run_horizon(binary, world, out, target=None): shutil.rmtree(out, ignore_errors=True) log = out.parent / (out.name + '.log') with log.open('w') as f: - subprocess.run([str(binary), str(world), str(out)], check=True, stdout=f, stderr=subprocess.STDOUT) + subprocess.run([str(binary), str(world), str(out), *([str(target)] if target else [])], check=True, stdout=f, stderr=subprocess.STDOUT) # ---------------------------------------------------------------- comparison @@ -206,6 +206,8 @@ def main(): p.add_argument('--keep', action='store_true') p.add_argument('--vanilla-only', action='store_true', help='only run the oracle') p.add_argument('--binary', help='a prebuilt datafix_world example') + p.add_argument('--band', type=int, metavar='TARGET', help='check the data fixes up to this DataVersion only (not the ' + 'file fixes), on the sample worlds saved before it, for developing the fixes of a range of versions') args = p.parse_args() import datafix_worlds import fcntl @@ -217,6 +219,9 @@ def main(): print('generating sample worlds:', ' '.join(missing), flush=True) subprocess.run([sys.executable, str(ROOT / 'tools' / 'datafix_worlds.py'), *missing], cwd=ROOT, check=True) worlds = sorted(p.name for p in WORLDS.iterdir() if p.is_dir()) + band = args.band + if band and not args.versions: # worlds in the layout of before 1.16, saved before the target + worlds = [w for w in worlds if json.loads((WORLDS / w / 'datafix-source.json').read_text())['data_version'] < band] versions = shard(args.versions or worlds) classpath = java_classpath() binary = None if args.vanilla_only else Path(args.binary) if args.binary else build_rust() @@ -226,18 +231,19 @@ def main(): source = json.loads((world / 'datafix-source.json').read_text()) print(f'{version} (DataVersion {source["data_version"]})') RUN.mkdir(parents=True, exist_ok=True) - run_vanilla(classpath, world, RUN / f'{version}-vanilla') + tag = f'{version}-band{band}' if band else version + run_vanilla(classpath, world, RUN / f'{tag}-vanilla', band) if binary is None: continue - run_horizon(binary, world, RUN / f'{version}-horizon') - failures = summarize(compare(RUN / f'{version}-vanilla', RUN / f'{version}-horizon')) + run_horizon(binary, world, RUN / f'{tag}-horizon', band) + failures = summarize(compare(RUN / f'{tag}-vanilla', RUN / f'{tag}-horizon')) print(f' {version}: {"ok" if not failures else f"{failures} differences"}') total += failures if binary is not None: print('datafix parity', 'FAILED' if total else 'ok', f'({total} differences over {len(versions)} worlds)') if not total and not args.keep: for version in versions: # vanilla outputs stay, for reuse - shutil.rmtree(RUN / f'{version}-horizon', ignore_errors=True) + shutil.rmtree(RUN / f'{version}-band{band}-horizon' if band else RUN / f'{version}-horizon', ignore_errors=True) sys.exit(1 if total else 0) From b633047a5540401ae48932f87cad88203ea5911a Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:14:19 +0200 Subject: [PATCH 05/25] Datafix: fixes 2100 to 2535 (UUIDs, wall/redstone properties, bit storage, furnace recipes, ...) --- crates/horizon-world/src/datafix/fixes_a.rs | 5 +- .../horizon-world/src/datafix/fixes_cliffs.rs | 210 +++- crates/horizon-world/src/datafix/fixes_mid.rs | 982 ++++++++++++++++++ crates/horizon-world/src/datafix/mod.rs | 2 + 4 files changed, 1155 insertions(+), 44 deletions(-) create mode 100644 crates/horizon-world/src/datafix/fixes_mid.rs diff --git a/crates/horizon-world/src/datafix/fixes_a.rs b/crates/horizon-world/src/datafix/fixes_a.rs index 2bfe43af3..3d89ec990 100644 --- a/crates/horizon-world/src/datafix/fixes_a.rs +++ b/crates/horizon-world/src/datafix/fixes_a.rs @@ -659,7 +659,10 @@ fn block_pos_format(cx: &mut Cx) { // ------------------------------------------------------------------ 3814 -fn attributes_rename_legacy(cx: &mut Cx, rename_fn: &dyn Fn(&str) -> Option<&'static str>) { +pub(super) fn attributes_rename_legacy( + cx: &mut Cx, + rename_fn: &dyn Fn(&str) -> Option<&'static str>, +) { let fix_name = |v: &mut Tag, field: &str| { if let Some(name) = as_str(v.get(field)) && let Some(new) = rename_fn(&name) diff --git a/crates/horizon-world/src/datafix/fixes_cliffs.rs b/crates/horizon-world/src/datafix/fixes_cliffs.rs index 9a4dfa402..9c2d55a88 100644 --- a/crates/horizon-world/src/datafix/fixes_cliffs.rs +++ b/crates/horizon-world/src/datafix/fixes_cliffs.rs @@ -21,10 +21,16 @@ pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { })); out.push((key(2690, 0), |cx| cx.rename(Ty::ItemName, renamer(COPPER)))); out.push((key(2690, 0), |cx| block_rename(cx, COPPER))); - out.push((key(2691, 0), |cx| cx.rename(Ty::ItemName, renamer(WAXED_COPPER)))); + out.push((key(2691, 0), |cx| { + cx.rename(Ty::ItemName, renamer(WAXED_COPPER)) + })); out.push((key(2691, 0), |cx| block_rename(cx, WAXED_COPPER))); - out.push((key(2693, 0), |cx| add_flag(cx, "has_increased_height_already", false))); - out.push((key(2696, 0), |cx| cx.rename(Ty::ItemName, renamer(GRIMSTONE)))); + out.push((key(2693, 0), |cx| { + add_flag(cx, "has_increased_height_already", false) + })); + out.push((key(2696, 0), |cx| { + cx.rename(Ty::ItemName, renamer(GRIMSTONE)) + })); out.push((key(2696, 0), |cx| block_rename(cx, GRIMSTONE))); out.push((key(2700, 0), |cx| { block_rename( @@ -37,20 +43,28 @@ pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { })); out.push((key(2701, 0), feature_pool_elements)); out.push((key(2702, 0), arrow_pickup)); - out.push((key(2707, 0), |cx| add_flag(cx, "has_increased_height_already", true))); + out.push((key(2707, 0), |cx| { + add_flag(cx, "has_increased_height_already", true) + })); out.push((key(2710, 0), |cx| { stats_rename(cx, &[("minecraft:play_one_minute", "minecraft:play_time")]) })); out.push((key(2717, 0), |cx| { cx.rename( Ty::ItemName, - renamer(&[("minecraft:azalea_leaves_flowers", "minecraft:flowering_azalea_leaves")]), + renamer(&[( + "minecraft:azalea_leaves_flowers", + "minecraft:flowering_azalea_leaves", + )]), ) })); out.push((key(2717, 0), |cx| { block_rename( cx, - &[("minecraft:azalea_leaves_flowers", "minecraft:flowering_azalea_leaves")], + &[( + "minecraft:azalea_leaves_flowers", + "minecraft:flowering_azalea_leaves", + )], ) })); out.push((key(2825, 0), |cx| { @@ -372,53 +386,161 @@ fn cauldron_rename(cx: &mut Cx) { } const COPPER: &[(&str, &str)] = &[ - ("minecraft:weathered_copper_block", "minecraft:oxidized_copper_block"), - ("minecraft:semi_weathered_copper_block", "minecraft:weathered_copper_block"), - ("minecraft:lightly_weathered_copper_block", "minecraft:exposed_copper_block"), - ("minecraft:weathered_cut_copper", "minecraft:oxidized_cut_copper"), - ("minecraft:semi_weathered_cut_copper", "minecraft:weathered_cut_copper"), - ("minecraft:lightly_weathered_cut_copper", "minecraft:exposed_cut_copper"), - ("minecraft:weathered_cut_copper_stairs", "minecraft:oxidized_cut_copper_stairs"), - ("minecraft:semi_weathered_cut_copper_stairs", "minecraft:weathered_cut_copper_stairs"), - ("minecraft:lightly_weathered_cut_copper_stairs", "minecraft:exposed_cut_copper_stairs"), - ("minecraft:weathered_cut_copper_slab", "minecraft:oxidized_cut_copper_slab"), - ("minecraft:semi_weathered_cut_copper_slab", "minecraft:weathered_cut_copper_slab"), - ("minecraft:lightly_weathered_cut_copper_slab", "minecraft:exposed_cut_copper_slab"), - ("minecraft:waxed_semi_weathered_copper", "minecraft:waxed_weathered_copper"), - ("minecraft:waxed_lightly_weathered_copper", "minecraft:waxed_exposed_copper"), - ("minecraft:waxed_semi_weathered_cut_copper", "minecraft:waxed_weathered_cut_copper"), - ("minecraft:waxed_lightly_weathered_cut_copper", "minecraft:waxed_exposed_cut_copper"), - ("minecraft:waxed_semi_weathered_cut_copper_stairs", "minecraft:waxed_weathered_cut_copper_stairs"), - ("minecraft:waxed_lightly_weathered_cut_copper_stairs", "minecraft:waxed_exposed_cut_copper_stairs"), - ("minecraft:waxed_semi_weathered_cut_copper_slab", "minecraft:waxed_weathered_cut_copper_slab"), - ("minecraft:waxed_lightly_weathered_cut_copper_slab", "minecraft:waxed_exposed_cut_copper_slab"), + ( + "minecraft:weathered_copper_block", + "minecraft:oxidized_copper_block", + ), + ( + "minecraft:semi_weathered_copper_block", + "minecraft:weathered_copper_block", + ), + ( + "minecraft:lightly_weathered_copper_block", + "minecraft:exposed_copper_block", + ), + ( + "minecraft:weathered_cut_copper", + "minecraft:oxidized_cut_copper", + ), + ( + "minecraft:semi_weathered_cut_copper", + "minecraft:weathered_cut_copper", + ), + ( + "minecraft:lightly_weathered_cut_copper", + "minecraft:exposed_cut_copper", + ), + ( + "minecraft:weathered_cut_copper_stairs", + "minecraft:oxidized_cut_copper_stairs", + ), + ( + "minecraft:semi_weathered_cut_copper_stairs", + "minecraft:weathered_cut_copper_stairs", + ), + ( + "minecraft:lightly_weathered_cut_copper_stairs", + "minecraft:exposed_cut_copper_stairs", + ), + ( + "minecraft:weathered_cut_copper_slab", + "minecraft:oxidized_cut_copper_slab", + ), + ( + "minecraft:semi_weathered_cut_copper_slab", + "minecraft:weathered_cut_copper_slab", + ), + ( + "minecraft:lightly_weathered_cut_copper_slab", + "minecraft:exposed_cut_copper_slab", + ), + ( + "minecraft:waxed_semi_weathered_copper", + "minecraft:waxed_weathered_copper", + ), + ( + "minecraft:waxed_lightly_weathered_copper", + "minecraft:waxed_exposed_copper", + ), + ( + "minecraft:waxed_semi_weathered_cut_copper", + "minecraft:waxed_weathered_cut_copper", + ), + ( + "minecraft:waxed_lightly_weathered_cut_copper", + "minecraft:waxed_exposed_cut_copper", + ), + ( + "minecraft:waxed_semi_weathered_cut_copper_stairs", + "minecraft:waxed_weathered_cut_copper_stairs", + ), + ( + "minecraft:waxed_lightly_weathered_cut_copper_stairs", + "minecraft:waxed_exposed_cut_copper_stairs", + ), + ( + "minecraft:waxed_semi_weathered_cut_copper_slab", + "minecraft:waxed_weathered_cut_copper_slab", + ), + ( + "minecraft:waxed_lightly_weathered_cut_copper_slab", + "minecraft:waxed_exposed_cut_copper_slab", + ), ]; const WAXED_COPPER: &[(&str, &str)] = &[ ("minecraft:waxed_copper", "minecraft:waxed_copper_block"), - ("minecraft:oxidized_copper_block", "minecraft:oxidized_copper"), - ("minecraft:weathered_copper_block", "minecraft:weathered_copper"), + ( + "minecraft:oxidized_copper_block", + "minecraft:oxidized_copper", + ), + ( + "minecraft:weathered_copper_block", + "minecraft:weathered_copper", + ), ("minecraft:exposed_copper_block", "minecraft:exposed_copper"), ]; const GRIMSTONE: &[(&str, &str)] = &[ ("minecraft:grimstone", "minecraft:deepslate"), - ("minecraft:grimstone_slab", "minecraft:cobbled_deepslate_slab"), - ("minecraft:grimstone_stairs", "minecraft:cobbled_deepslate_stairs"), - ("minecraft:grimstone_wall", "minecraft:cobbled_deepslate_wall"), - ("minecraft:polished_grimstone", "minecraft:polished_deepslate"), - ("minecraft:polished_grimstone_slab", "minecraft:polished_deepslate_slab"), - ("minecraft:polished_grimstone_stairs", "minecraft:polished_deepslate_stairs"), - ("minecraft:polished_grimstone_wall", "minecraft:polished_deepslate_wall"), + ( + "minecraft:grimstone_slab", + "minecraft:cobbled_deepslate_slab", + ), + ( + "minecraft:grimstone_stairs", + "minecraft:cobbled_deepslate_stairs", + ), + ( + "minecraft:grimstone_wall", + "minecraft:cobbled_deepslate_wall", + ), + ( + "minecraft:polished_grimstone", + "minecraft:polished_deepslate", + ), + ( + "minecraft:polished_grimstone_slab", + "minecraft:polished_deepslate_slab", + ), + ( + "minecraft:polished_grimstone_stairs", + "minecraft:polished_deepslate_stairs", + ), + ( + "minecraft:polished_grimstone_wall", + "minecraft:polished_deepslate_wall", + ), ("minecraft:grimstone_tiles", "minecraft:deepslate_tiles"), - ("minecraft:grimstone_tile_slab", "minecraft:deepslate_tile_slab"), - ("minecraft:grimstone_tile_stairs", "minecraft:deepslate_tile_stairs"), - ("minecraft:grimstone_tile_wall", "minecraft:deepslate_tile_wall"), + ( + "minecraft:grimstone_tile_slab", + "minecraft:deepslate_tile_slab", + ), + ( + "minecraft:grimstone_tile_stairs", + "minecraft:deepslate_tile_stairs", + ), + ( + "minecraft:grimstone_tile_wall", + "minecraft:deepslate_tile_wall", + ), ("minecraft:grimstone_bricks", "minecraft:deepslate_bricks"), - ("minecraft:grimstone_brick_slab", "minecraft:deepslate_brick_slab"), - ("minecraft:grimstone_brick_stairs", "minecraft:deepslate_brick_stairs"), - ("minecraft:grimstone_brick_wall", "minecraft:deepslate_brick_wall"), - ("minecraft:chiseled_grimstone", "minecraft:chiseled_deepslate"), + ( + "minecraft:grimstone_brick_slab", + "minecraft:deepslate_brick_slab", + ), + ( + "minecraft:grimstone_brick_stairs", + "minecraft:deepslate_brick_stairs", + ), + ( + "minecraft:grimstone_brick_wall", + "minecraft:deepslate_brick_wall", + ), + ( + "minecraft:chiseled_grimstone", + "minecraft:chiseled_deepslate", + ), ]; /// `SavedDataFeaturePoolElementFix`: the feature of jigsaw pieces' feature pool @@ -446,7 +568,9 @@ fn feature_pool_elements(cx: &mut Cx) { return child; } let element = child.get("pool_element"); - let is_feature = element.and_then(|e| as_str(e.get("element_type"))).as_deref() + let is_feature = element + .and_then(|e| as_str(e.get("element_type"))) + .as_deref() == Some("minecraft:feature_pool_element"); if is_feature && let Some(f) = child diff --git a/crates/horizon-world/src/datafix/fixes_mid.rs b/crates/horizon-world/src/datafix/fixes_mid.rs new file mode 100644 index 000000000..581e3015e --- /dev/null +++ b/crates/horizon-world/src/datafix/fixes_mid.rs @@ -0,0 +1,982 @@ +//! Fixes of 1.15 and 1.16 (keys 2100 to 2571): what worlds saved by 1.14.4 to +//! 1.16.5 need before the fixes of [`super::fixes_cliffs`]. +use super::dynamic::{ + as_bool, as_double, as_int, as_long, as_long_stream, as_number, as_str, ceillog2, namespaced, + remove, set, stream, string, +}; +use super::fixes_a::attributes_rename_legacy; +use super::fixes_b::advancements_rename; +use super::schema::{Key, Ty, key}; +use super::{Cx, FixFn, id_is, renamer}; +use crate::nbt::{Compound, JavaString, Tag}; + +pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { + out.push((key(2100, 0), |cx| { + cx.rename( + Ty::Recipe, + renamer(&[("minecraft:sugar", "minecraft:sugar_from_sugar_cane")]), + ) + })); + out.push((key(2100, 0), |cx| { + advancements_rename_table( + cx, + &[( + "minecraft:recipes/misc/sugar", + "minecraft:recipes/misc/sugar_from_sugar_cane", + )], + ) + })); + out.push((key(2202, 0), chunk_biomes)); + out.push((key(2209, 0), |cx| { + let t: &[(&str, &'static str)] = &[("minecraft:bee_hive", "minecraft:beehive")]; + cx.rename(Ty::ItemName, renamer(t)); + poi_type_rename(cx, t); + })); + out.push((key(2209, 0), |cx| { + super::fixes_a::block_rename(cx, &[("minecraft:bee_hive", "minecraft:beehive")]) + })); + out.push((key(2211, 0), structure_reference_count)); + out.push((key(2218, 0), force_poi_rebuild)); + out.push((key(2501, 0), furnace_recipes)); + out.push((key(2503, 0), wall_property)); + out.push((key(2503, 0), |cx| { + advancements_rename_table( + cx, + &[( + "minecraft:recipes/misc/composter", + "minecraft:recipes/decorations/composter", + )], + ) + })); + out.push((key(2505, 0), |cx| memory_expiry(cx, "minecraft:villager"))); + out.push((key(2508, 0), |cx| cx.rename(Ty::ItemName, renamer(FUNGUS)))); + out.push((key(2508, 0), |cx| super::fixes_a::block_rename(cx, FUNGUS))); + out.push((key(2509, 0), |cx| { + entity_rename(cx, "minecraft:zombie_pigman", "minecraft:zombified_piglin") + })); + out.push((key(2509, 0), |cx| { + cx.rename( + Ty::ItemName, + renamer(&[( + "minecraft:zombie_pigman_spawn_egg", + "minecraft:zombified_piglin_spawn_egg", + )]), + ) + })); + out.push((key(2511, 0), projectile_owner)); + out.push((key(2514, 0), entity_uuids)); + out.push((key(2514, 0), block_entity_uuids)); + out.push((key(2514, 0), player_uuids)); + out.push((key(2514, 0), level_uuids)); + out.push((key(2514, 0), raids_uuids)); + out.push((key(2514, 0), item_stack_uuids)); + out.push((key(2516, 0), |cx| gossip_uuids(cx, "minecraft:villager"))); + out.push((key(2516, 0), |cx| { + gossip_uuids(cx, "minecraft:zombie_villager") + })); + out.push((key(2518, 0), jigsaw_properties)); + out.push((key(2518, 0), jigsaw_rotation)); + out.push((key(2523, 0), |cx| { + attributes_rename_legacy(cx, &|name| { + ATTRIBUTES + .iter() + .find(|(from, _)| *from == name) + .map(|(_, to)| *to) + }) + })); + out.push((key(2527, 0), bit_storage_align)); + out.push((key(2528, 0), |cx| { + cx.rename( + Ty::ItemName, + renamer(&[ + ("minecraft:soul_fire_torch", "minecraft:soul_torch"), + ("minecraft:soul_fire_lantern", "minecraft:soul_lantern"), + ]), + ) + })); + out.push((key(2528, 0), |cx| { + super::fixes_a::block_rename( + cx, + &[ + ("minecraft:soul_fire_torch", "minecraft:soul_torch"), + ( + "minecraft:soul_fire_wall_torch", + "minecraft:soul_wall_torch", + ), + ("minecraft:soul_fire_lantern", "minecraft:soul_lantern"), + ], + ) + })); + out.push((key(2529, 0), strider_gravity)); + out.push((key(2531, 0), redstone_wire)); + out.push((key(2533, 0), villager_follow_range)); + out.push((key(2535, 0), shulker_rotation)); +} + +const FUNGUS: &[(&str, &str)] = &[ + ("minecraft:warped_fungi", "minecraft:warped_fungus"), + ("minecraft:crimson_fungi", "minecraft:crimson_fungus"), +]; + +/// `AdvancementsRenameFix` with a `createRenamer` table. +fn advancements_rename_table(cx: &mut Cx, table: &'static [(&str, &str)]) { + advancements_rename(cx, &|id| { + let id = namespaced(id); + table + .iter() + .find(|(from, _)| *from == id) + .map(|(_, to)| (*to).to_owned()) + }); +} + +/// `SimplestEntityRenameFix`: the id of the entities and the entity names. +fn entity_rename(cx: &mut Cx, from: &str, to: &'static str) { + cx.each(Ty::Entity, |e| { + if id_is(e, from) { + set(e, "id", string(to)); + } + }); + cx.rename(Ty::EntityName, |name| { + (namespaced(name) == from).then_some(to) + }); +} + +/// `PoiTypeRenameFix`. +fn poi_type_rename(cx: &mut Cx, table: &[(&str, &'static str)]) { + let r = renamer(table); + cx.each(Ty::PoiChunk, |poi| { + let Some(Tag::Compound(sections)) = poi.get_mut("Sections") else { + return; + }; + for section in sections.values_mut() { + let Some(Tag::List(records)) = section.get_mut("Records") else { + continue; + }; + for record in records { + if let Some(t) = as_str(record.get("type")) + && let Some(new) = r(&t) + { + set(record, "type", string(new)); + } + } + } + }); +} + +/// `ChunkBiomeFix`: the 256 biomes of a column become 1024 (a 4x4x64 grid). +fn chunk_biomes(cx: &mut Cx) { + cx.each(Ty::Chunk, |c| { + let Some(level) = c.get_mut("Level") else { + return; + }; + let Some(old) = super::dynamic::as_int_stream(level.get("Biomes")) else { + return; + }; + if old.len() != 256 { + return; + } + let mut new = vec![0i32; 1024]; + for z in 0..4 { + for x in 0..4 { + let (ox, oz) = ((x << 2) + 2, (z << 2) + 2); + new[z << 2 | x] = old[oz << 4 | ox]; + } + } + for y in 1..64 { + new.copy_within(0..16, y * 16); + } + set(level, "Biomes", Tag::IntArray(new)); + }); +} + +/// `StructureReferenceCountFix`. +fn structure_reference_count(cx: &mut Cx) { + cx.each(Ty::StructureFeature, |s| { + if let Some(r) = s.get("references") { + let n = as_number(r) + .map(|n| n.int_value()) + .filter(|n| *n > 0) + .unwrap_or(1); + set(s, "references", Tag::Int(n)); + } + }); +} + +/// `ForcePoiRebuild`: every POI section loses its `Valid` flag. +fn force_poi_rebuild(cx: &mut Cx) { + cx.each(Ty::PoiChunk, |poi| { + if let Some(Tag::Compound(sections)) = poi.get_mut("Sections") { + for section in sections.values_mut() { + remove(section, "Valid"); + } + } + }); +} + +/// `FurnaceRecipeFix`: `RecipeLocation`/`RecipeAmount` pairs become the +/// `RecipesUsed` map. +fn furnace_recipes(cx: &mut Cx) { + cx.each(Ty::BlockEntity, |be| { + if ![ + "minecraft:furnace", + "minecraft:blast_furnace", + "minecraft:smoker", + ] + .iter() + .any(|id| id_is(be, id)) + { + return; + } + let size = as_int(be.get("RecipesUsedSize"), 0); + remove(be, "RecipesUsedSize"); + let mut used = Compound::new(); + for i in 0..size { + let location = remove(be, &format!("RecipeLocation{i}")); + let amount = remove(be, &format!("RecipeAmount{i}")); + let amount = as_int(amount.as_ref(), 0); + if amount > 0 + && let Some(location) = location.as_ref().and_then(|l| as_str(Some(l))) + { + used.insert( + JavaString::from(namespaced(&location).as_str()), + Tag::Int(amount), + ); + } + } + set(be, "RecipesUsed", Tag::Compound(used)); + }); +} + +const WALLS: [&str; 14] = [ + "minecraft:andesite_wall", + "minecraft:brick_wall", + "minecraft:cobblestone_wall", + "minecraft:diorite_wall", + "minecraft:end_stone_brick_wall", + "minecraft:granite_wall", + "minecraft:mossy_cobblestone_wall", + "minecraft:mossy_stone_brick_wall", + "minecraft:nether_brick_wall", + "minecraft:prismarine_wall", + "minecraft:red_nether_brick_wall", + "minecraft:red_sandstone_wall", + "minecraft:sandstone_wall", + "minecraft:stone_brick_wall", +]; + +/// `WallPropertyFix`: `true`/`false` sides become `low`/`none`. +fn wall_property(cx: &mut Cx) { + cx.each(Ty::BlockState, |state| { + let Some(name) = as_str(state.get("Name")) else { + return; + }; + if !WALLS.contains(&name.as_str()) { + return; + } + if let Some(props) = state.get_mut("Properties") { + for side in ["east", "west", "north", "south"] { + if let Some(v) = props.get(side) + && let Some(s) = as_str(Some(v)) + { + let new = if s == "true" { "low" } else { "none" }; + set(props, side, string(new)); + } + } + } + }); +} + +/// `MemoryExpiryDataFix`: every memory of a brain is wrapped as `{value: ...}`. +fn memory_expiry(cx: &mut Cx, entity: &str) { + cx.entity(entity, |e| { + let Some(brain) = e.get_mut("Brain") else { + return; + }; + if let Some(Tag::Compound(memories)) = brain.get_mut("memories") { + for value in memories.values_mut() { + let inner = std::mem::replace(value, Tag::End); + *value = Tag::compound([("value", inner)]); + } + } + }); +} + +/// `EntityProjectileOwnerFix`: the owner of a projectile as a UUID int array. +fn projectile_owner(cx: &mut Cx) { + let uuid = |most: i64, least: i64| -> Option { + (most != 0 && least != 0).then(|| { + Tag::IntArray(vec![ + (most >> 32) as i32, + most as i32, + (least >> 32) as i32, + least as i32, + ]) + }) + }; + cx.each(Ty::Entity, |e| { + let Some(id) = as_str(e.get("id")).map(|i| namespaced(&i)) else { + return; + }; + match id.as_str() { + "minecraft:egg" + | "minecraft:ender_pearl" + | "minecraft:experience_bottle" + | "minecraft:snowball" + | "minecraft:potion" => { + let (m, l) = e + .get("owner") + .map_or((0, 0), |o| (as_long(o.get("M"), 0), as_long(o.get("L"), 0))); + if let Some(u) = uuid(m, l) { + set(e, "OwnerUUID", u); + } + remove(e, "owner"); + } + "minecraft:llama_spit" => { + let (m, l) = e.get("Owner").map_or((0, 0), |o| { + ( + as_long(o.get("OwnerUUIDMost"), 0), + as_long(o.get("OwnerUUIDLeast"), 0), + ) + }); + if let Some(u) = uuid(m, l) { + set(e, "OwnerUUID", u); + } + remove(e, "Owner"); + } + "minecraft:arrow" | "minecraft:spectral_arrow" | "minecraft:trident" => { + let m = as_long(e.get("OwnerUUIDMost"), 0); + let l = as_long(e.get("OwnerUUIDLeast"), 0); + if let Some(u) = uuid(m, l) { + set(e, "OwnerUUID", u); + } + remove(e, "OwnerUUIDMost"); + remove(e, "OwnerUUIDLeast"); + } + _ => {} + } + }); +} + +// ------------------------------------------------------------------ 2514, 2516 + +fn uuid_tag(most: i64, least: i64) -> Tag { + Tag::IntArray(vec![ + (most >> 32) as i32, + most as i32, + (least >> 32) as i32, + least as i32, + ]) +} + +/// `AbstractUUIDFix.createUUIDFromLongs`. +fn uuid_from_longs(tag: &Tag, most: &str, least: &str) -> Option { + let m = as_long(tag.get(most), 0); + let l = as_long(tag.get(least), 0); + (m != 0 && l != 0).then(|| uuid_tag(m, l)) +} + +/// `AbstractUUIDFix.replaceUUIDLeastMost`. +fn replace_least_most(tag: &mut Tag, old: &str, new: &str) { + let (most, least) = (format!("{old}Most"), format!("{old}Least")); + if let Some(uuid) = uuid_from_longs(tag, &most, &least) { + remove(tag, &most); + remove(tag, &least); + set(tag, new, uuid); + } +} + +/// `AbstractUUIDFix.replaceUUIDMLTag`. +fn replace_ml(tag: &mut Tag, old: &str, new: &str) { + if let Some(uuid) = tag.get(old).and_then(|t| uuid_from_longs(t, "M", "L")) { + remove(tag, old); + set(tag, new, uuid); + } +} + +/// `UUID.fromString`, which takes five hexadecimal groups of any length. +fn parse_uuid(s: &str) -> Option<(i64, i64)> { + if s.len() > 36 { + return None; + } + let mut parts = [0i64; 5]; + let mut count = 0; + for part in s.split('-') { + if count == 5 || part.is_empty() || !part.bytes().all(|b| b.is_ascii_hexdigit()) { + return None; + } + parts[count] = i64::from_str_radix(part, 16).ok()?; + count += 1; + } + (count == 5).then(|| { + let most = (parts[0] & 0xffff_ffff) << 32 | (parts[1] & 0xffff) << 16 | (parts[2] & 0xffff); + let least = (parts[3] & 0xffff) << 48 | (parts[4] & 0xffff_ffff_ffff); + (most, least) + }) +} + +/// `AbstractUUIDFix.replaceUUIDString`. +fn replace_uuid_string(tag: &mut Tag, old: &str, new: &str) -> bool { + let Some((m, l)) = as_str(tag.get(old)).as_deref().and_then(parse_uuid) else { + return false; + }; + remove(tag, old); + set(tag, new, uuid_tag(m, l)); + true +} + +/// A field that is present becomes the list of its elements mapped by `f`. +fn map_elements(tag: &mut Tag, field: &str, mut f: impl FnMut(Tag) -> Tag) { + if let Some(v) = tag.get_mut(field) { + *v = Tag::List(stream(Some(v)).into_iter().map(&mut f).collect()); + } +} + +/// `EntityUUIDFix.updateLivingEntity`. +fn living_entity_uuids(tag: &mut Tag) { + map_elements(tag, "Attributes", |mut attribute| { + map_elements(&mut attribute, "Modifiers", |mut modifier| { + replace_least_most(&mut modifier, "UUID", "UUID"); + modifier + }); + attribute + }); +} + +fn mob_uuids(tag: &mut Tag) { + living_entity_uuids(tag); + if let Some(leash) = tag.get_mut("Leash") { + replace_least_most(leash, "UUID", "UUID"); + } +} + +fn animal_uuids(tag: &mut Tag) { + mob_uuids(tag); + replace_least_most(tag, "LoveCause", "LoveCause"); +} + +const ABSTRACT_HORSES: &[&str] = [ + "minecraft:donkey", + "minecraft:horse", + "minecraft:llama", + "minecraft:mule", + "minecraft:skeleton_horse", + "minecraft:trader_llama", + "minecraft:zombie_horse", +]; +const TAMEABLE_ANIMALS: &[&str] = ["minecraft:cat", "minecraft:parrot", "minecraft:wolf"]; +const ANIMALS: &[&str] = [ + "minecraft:bee", + "minecraft:chicken", + "minecraft:cow", + "minecraft:fox", + "minecraft:mooshroom", + "minecraft:ocelot", + "minecraft:panda", + "minecraft:pig", + "minecraft:polar_bear", + "minecraft:rabbit", + "minecraft:sheep", + "minecraft:turtle", + "minecraft:hoglin", +]; +const MOBS: &[&str] = [ + "minecraft:bat", + "minecraft:blaze", + "minecraft:cave_spider", + "minecraft:cod", + "minecraft:creeper", + "minecraft:dolphin", + "minecraft:drowned", + "minecraft:elder_guardian", + "minecraft:ender_dragon", + "minecraft:enderman", + "minecraft:endermite", + "minecraft:evoker", + "minecraft:ghast", + "minecraft:giant", + "minecraft:guardian", + "minecraft:husk", + "minecraft:illusioner", + "minecraft:magma_cube", + "minecraft:pufferfish", + "minecraft:zombified_piglin", + "minecraft:salmon", + "minecraft:shulker", + "minecraft:silverfish", + "minecraft:skeleton", + "minecraft:slime", + "minecraft:snow_golem", + "minecraft:spider", + "minecraft:squid", + "minecraft:stray", + "minecraft:tropical_fish", + "minecraft:vex", + "minecraft:villager", + "minecraft:iron_golem", + "minecraft:vindicator", + "minecraft:pillager", + "minecraft:wandering_trader", + "minecraft:witch", + "minecraft:wither", + "minecraft:wither_skeleton", + "minecraft:zombie", + "minecraft:zombie_villager", + "minecraft:phantom", + "minecraft:ravager", + "minecraft:piglin", +]; +const PROJECTILES: &[&str] = [ + "minecraft:arrow", + "minecraft:dragon_fireball", + "minecraft:firework_rocket", + "minecraft:fireball", + "minecraft:llama_spit", + "minecraft:small_fireball", + "minecraft:snowball", + "minecraft:spectral_arrow", + "minecraft:egg", + "minecraft:ender_pearl", + "minecraft:experience_bottle", + "minecraft:potion", + "minecraft:trident", + "minecraft:wither_skull", +]; + +/// `EntityUUIDFix`. +fn entity_uuids(cx: &mut Cx) { + cx.each(Ty::Entity, |e| { + let Some(id) = as_str(e.get("id")).map(|i| namespaced(&i)) else { + // Without an id no choice matches; the UUID is still fixed. + replace_least_most(e, "UUID", "UUID"); + return; + }; + let id = id.as_str(); + replace_least_most(e, "UUID", "UUID"); + if ABSTRACT_HORSES.contains(&id) || TAMEABLE_ANIMALS.contains(&id) { + animal_uuids(e); + replace_uuid_string(e, "OwnerUUID", "Owner"); + } + if ANIMALS.contains(&id) { + animal_uuids(e); + } + if MOBS.contains(&id) { + mob_uuids(e); + } + if id == "minecraft:armor_stand" { + living_entity_uuids(e); + } + if PROJECTILES.contains(&id) + && let Some(owner) = remove(e, "OwnerUUID") + { + set(e, "Owner", owner); + } + match id { + "minecraft:bee" | "minecraft:zombified_piglin" => { + replace_uuid_string(e, "HurtBy", "HurtBy"); + } + "minecraft:fox" => { + if e.get("TrustedUUIDs").is_some() { + let trusted: Vec = stream(e.get("TrustedUUIDs")) + .into_iter() + .map(|t| uuid_from_longs(&t, "M", "L").unwrap_or(t)) + .collect(); + remove(e, "TrustedUUIDs"); + set(e, "Trusted", Tag::List(trusted)); + } + } + "minecraft:item" => { + replace_ml(e, "Owner", "Owner"); + replace_ml(e, "Thrower", "Thrower"); + } + "minecraft:shulker_bullet" => { + replace_ml(e, "Owner", "Owner"); + replace_ml(e, "Target", "Target"); + } + "minecraft:area_effect_cloud" | "minecraft:evoker_fangs" => { + replace_least_most(e, "OwnerUUID", "Owner"); + } + "minecraft:zombie_villager" => { + replace_least_most(e, "ConversionPlayer", "ConversionPlayer") + } + "minecraft:piglin" => { + if let Some(angry) = e + .get_mut("Brain") + .and_then(|b| b.get_mut("memories")) + .and_then(|m| m.get_mut("minecraft:angry_at")) + { + replace_uuid_string(angry, "value", "value"); + } + } + _ => {} + } + }); +} + +/// `BlockEntityUUIDFix`. +fn block_entity_uuids(cx: &mut Cx) { + cx.each(Ty::BlockEntity, |be| { + if id_is(be, "minecraft:conduit") { + replace_ml(be, "target_uuid", "Target"); + } + if id_is(be, "minecraft:skull") + && let Some(mut owner) = remove(be, "Owner") + { + replace_uuid_string(&mut owner, "Id", "Id"); + set(be, "SkullOwner", owner); + } + }); +} + +/// `PlayerUUIDFix`. +fn player_uuids(cx: &mut Cx) { + cx.each(Ty::Player, |p| { + if let Some(vehicle) = p.get_mut("RootVehicle") { + replace_least_most(vehicle, "Attach", "Attach"); + } + living_entity_uuids(p); + replace_least_most(p, "UUID", "UUID"); + }); +} + +/// `LevelUUIDFix`. +fn level_uuids(cx: &mut Cx) { + cx.each(Ty::Level, |level| { + if let Some(Tag::Compound(dimensions)) = level.get_mut("DimensionData") { + for dimension in dimensions.values_mut() { + if let Some(fight) = dimension.get_mut("DragonFight") { + replace_least_most(fight, "DragonUUID", "Dragon"); + } + } + } + replace_uuid_string(level, "WanderingTraderId", "WanderingTraderId"); + if let Some(Tag::Compound(events)) = level.get_mut("CustomBossEvents") { + for event in events.values_mut() { + map_elements(event, "Players", |player| { + uuid_from_longs(&player, "M", "L").unwrap_or(player) + }); + } + } + }); +} + +/// `SavedDataUUIDFix` (raids). +fn raids_uuids(cx: &mut Cx) { + cx.each(Ty::SavedRaids, |saved| { + let Some(data) = saved.get_mut("data") else { + return; + }; + map_elements(data, "Raids", |mut raid| { + map_elements(&mut raid, "HeroesOfTheVillage", |hero| { + uuid_from_longs(&hero, "UUIDMost", "UUIDLeast").unwrap_or(hero) + }); + raid + }); + }); +} + +/// `ItemStackUUIDFix`. +fn item_stack_uuids(cx: &mut Cx) { + cx.each(Ty::ItemStack, |stack| { + let head = + as_str(stack.get("id")).is_some_and(|id| namespaced(&id) == "minecraft:player_head"); + let Some(tag) = stack.get_mut("tag") else { + return; + }; + map_elements(tag, "AttributeModifiers", |mut modifier| { + replace_least_most(&mut modifier, "UUID", "UUID"); + modifier + }); + if head && let Some(owner) = tag.get_mut("SkullOwner") { + replace_uuid_string(owner, "Id", "Id"); + } + }); +} + +/// `GossipUUIDFix`. +fn gossip_uuids(cx: &mut Cx, entity: &str) { + cx.entity(entity, |e| { + if let Some(gossips) = e.get_mut("Gossips") + && crate::datafix::dynamic::is_list(Some(gossips)) + { + *gossips = Tag::List( + stream(Some(gossips)) + .into_iter() + .map(|mut g| { + replace_least_most(&mut g, "Target", "Target"); + g + }) + .collect(), + ); + } + }); +} + +// ------------------------------------------------------------------ 2518 to 2535 + +/// `JigsawPropertiesFix`. +fn jigsaw_properties(cx: &mut Cx) { + cx.block_entity("minecraft:jigsaw", |be| { + let name = super::dynamic::as_string(be.get("attachement_type"), "minecraft:empty"); + let pool = super::dynamic::as_string(be.get("target_pool"), "minecraft:empty"); + set(be, "name", string(&name)); + set(be, "target", string(&name)); + remove(be, "attachement_type"); + set(be, "pool", string(&pool)); + remove(be, "target_pool"); + }); +} + +/// `LegacyJigsawRotationFix`. +fn jigsaw_rotation(cx: &mut Cx) { + cx.each(Ty::BlockState, |state| { + if as_str(state.get("Name")).is_none_or(|n| namespaced(&n) != "minecraft:jigsaw") { + return; + } + if let Some(props) = state.get_mut("Properties") { + let facing = super::dynamic::as_string(props.get("facing"), "north"); + let orientation = match facing.as_str() { + "down" => "down_south", + "up" => "up_north", + "north" => "north_up", + "south" => "south_up", + "west" => "west_up", + "east" => "east_up", + other => other, + }; + remove(props, "facing"); + set(props, "orientation", string(orientation)); + } + }); +} + +const ATTRIBUTES: &[(&str, &str)] = &[ + ("generic.maxHealth", "minecraft:generic.max_health"), + ("Max Health", "minecraft:generic.max_health"), + ( + "zombie.spawnReinforcements", + "minecraft:zombie.spawn_reinforcements", + ), + ( + "Spawn Reinforcements Chance", + "minecraft:zombie.spawn_reinforcements", + ), + ("horse.jumpStrength", "minecraft:horse.jump_strength"), + ("Jump Strength", "minecraft:horse.jump_strength"), + ("generic.followRange", "minecraft:generic.follow_range"), + ("Follow Range", "minecraft:generic.follow_range"), + ( + "generic.knockbackResistance", + "minecraft:generic.knockback_resistance", + ), + ( + "Knockback Resistance", + "minecraft:generic.knockback_resistance", + ), + ("generic.movementSpeed", "minecraft:generic.movement_speed"), + ("Movement Speed", "minecraft:generic.movement_speed"), + ("generic.flyingSpeed", "minecraft:generic.flying_speed"), + ("Flying Speed", "minecraft:generic.flying_speed"), + ("generic.attackDamage", "minecraft:generic.attack_damage"), + ( + "generic.attackKnockback", + "minecraft:generic.attack_knockback", + ), + ("generic.attackSpeed", "minecraft:generic.attack_speed"), + ( + "generic.armorToughness", + "minecraft:generic.armor_toughness", + ), +]; + +/// `BitStorageAlignFix.addPadding`: values stored without crossing longs. +pub(super) fn add_padding(size: usize, bits: usize, data: &[i64]) -> Vec { + let length = data.len(); + if length == 0 { + return Vec::new(); + } + let mask = (1i64 << bits) - 1; + let per_long = 64 / bits; + let required = size.div_ceil(per_long); + let mut result = vec![0i64; required]; + let mut out_index = 0; + let mut out_start = 0; + let mut out_data = 0i64; + let mut current_index = 0; + let mut current = data[0]; + let mut next = if length > 1 { data[1] } else { 0 }; + for index in 0..size { + let position = index * bits; + let start_data = position >> 6; + let end_data = ((index + 1) * bits - 1) >> 6; + let start_bit = position ^ (start_data << 6); + if start_data != current_index { + current = next; + next = if start_data + 1 < length { + data[start_data + 1] + } else { + 0 + }; + current_index = start_data; + } + let value = if start_data == end_data { + ((current as u64) >> start_bit) as i64 & mask + } else { + let shift = 64 - start_bit; + ((((current as u64) >> start_bit) as i64) | next.wrapping_shl(shift as u32)) & mask + }; + let out_end = out_start + bits; + if out_end >= 64 { + result[out_index] = out_data; + out_index += 1; + out_data = value; + out_start = bits; + } else { + out_data |= value << out_start; + out_start = out_end; + } + } + if out_data != 0 { + result[out_index] = out_data; + } + result +} + +fn align_storage(tag: &mut Tag, field: &str, size: usize, bits: usize) { + if let Some(v) = tag.get_mut(field) { + let input = as_long_stream(Some(v)).unwrap_or_default(); + *v = Tag::LongArray(add_padding(size, bits, &input)); + } +} + +/// `BitStorageAlignFix`: block states and heightmaps no longer cross longs. +fn bit_storage_align(cx: &mut Cx) { + cx.each(Ty::Chunk, |c| { + let Some(level) = c.get_mut("Level") else { + return; + }; + if let Some(Tag::List(sections)) = level.get_mut("Sections") { + for section in sections { + let Some(Tag::List(palette)) = section.get("Palette") else { + continue; + }; + let bits = 4.max(ceillog2(palette.len())) as usize; + if bits & (bits - 1) != 0 { + align_storage(section, "BlockStates", 4096, bits); + } + } + } + if let Some(Tag::Compound(heightmaps)) = level.get_mut("Heightmaps") { + for heightmap in heightmaps.values_mut() { + let input = as_long_stream(Some(heightmap)).unwrap_or_default(); + *heightmap = Tag::LongArray(add_padding(256, 9, &input)); + } + } + }); +} + +/// `StriderGravityFix`. +fn strider_gravity(cx: &mut Cx) { + cx.entity("minecraft:strider", |e| { + if as_bool(e.get("NoGravity"), false) { + set(e, "NoGravity", Tag::Byte(0)); + } + }); +} + +/// `RedstoneWireConnectionsFix`. +fn redstone_wire(cx: &mut Cx) { + cx.each(Ty::BlockState, |state| { + if as_str(state.get("Name")).as_deref() != Some("minecraft:redstone_wire") { + return; + } + let Some(props) = state.get_mut("Properties") else { + return; + }; + let side = |props: &Tag, name: &str| super::dynamic::as_string(props.get(name), "none"); + let (east, west, north, south) = ( + side(props, "east"), + side(props, "west"), + side(props, "north"), + side(props, "south"), + ); + let connected = |s: &str| s != "none"; + let east_west = connected(&east) || connected(&west); + let north_south = connected(&north) || connected(&south); + let fixed = [ + ( + "east", + if !connected(&east) && !north_south { + "side" + } else { + &east + }, + ), + ( + "west", + if !connected(&west) && !north_south { + "side" + } else { + &west + }, + ), + ( + "north", + if !connected(&north) && !east_west { + "side" + } else { + &north + }, + ), + ( + "south", + if !connected(&south) && !east_west { + "side" + } else { + &south + }, + ), + ]; + for (name, value) in fixed { + if props.get(name).is_some() { + set(props, name, string(value)); + } + } + }); +} + +/// `VillagerFollowRangeFix`. +fn villager_follow_range(cx: &mut Cx) { + cx.entity("minecraft:villager", |e| { + map_elements(e, "Attributes", |mut attribute| { + if super::dynamic::as_string(attribute.get("Name"), "") == "generic.follow_range" + && as_double(attribute.get("Base"), 0.0) == 16.0 + { + set(&mut attribute, "Base", Tag::Double(48.0f64.to_bits())); + } + attribute + }); + }); +} + +/// `EntityShulkerRotationFix`. +fn shulker_rotation(cx: &mut Cx) { + cx.entity("minecraft:shulker", |e| { + let mut rotation: Vec = stream(e.get("Rotation")) + .iter() + .map(|d| as_double(Some(d), 180.0)) + .collect(); + if !rotation.is_empty() { + rotation[0] -= 180.0; + set( + e, + "Rotation", + Tag::List( + rotation + .into_iter() + .map(|d| Tag::Double(d.to_bits())) + .collect(), + ), + ); + } + }); +} diff --git a/crates/horizon-world/src/datafix/mod.rs b/crates/horizon-world/src/datafix/mod.rs index eecd9c268..fdbf059e5 100644 --- a/crates/horizon-world/src/datafix/mod.rs +++ b/crates/horizon-world/src/datafix/mod.rs @@ -15,6 +15,7 @@ mod fixes_a; mod fixes_b; mod fixes_c; mod fixes_cliffs; +mod fixes_mid; mod fixes_old; mod items; pub mod json; @@ -177,6 +178,7 @@ type FixFn = fn(&mut Cx); /// Every ported fix (from the 1.19 schemas on), in DataFixers order. fn fixes() -> Vec<(Key, FixFn)> { let mut out = Vec::new(); + fixes_mid::register(&mut out); fixes_cliffs::register(&mut out); fixes_old::register(&mut out); fixes_a::register(&mut out); From 8c542c16bbe35324905dd0f02eb9d1e4ecc69773 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:19:32 +0200 Subject: [PATCH 06/25] Datafix: legacy dimension ids, world gen settings from legacy level data, biome renames, potion field --- crates/horizon-world/src/datafix/fixes_mid.rs | 506 +++++++++++++++++- crates/horizon-world/src/datafix/schema.rs | 6 +- 2 files changed, 506 insertions(+), 6 deletions(-) diff --git a/crates/horizon-world/src/datafix/fixes_mid.rs b/crates/horizon-world/src/datafix/fixes_mid.rs index 581e3015e..be52abc07 100644 --- a/crates/horizon-world/src/datafix/fixes_mid.rs +++ b/crates/horizon-world/src/datafix/fixes_mid.rs @@ -111,6 +111,16 @@ pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { out.push((key(2531, 0), redstone_wire)); out.push((key(2533, 0), villager_follow_range)); out.push((key(2535, 0), shulker_rotation)); + out.push((key(2537, 0), legacy_dimension_id)); + out.push((key(2538, 0), level_legacy_world_gen_settings)); + out.push((key(2550, 0), world_gen_settings)); + out.push((key(2552, 0), |cx| { + cx.rename( + Ty::Biome, + renamer(&[("minecraft:nether", "minecraft:nether_wastes")]), + ) + })); + out.push((key(2553, 0), |cx| cx.rename(Ty::Biome, renamer(BIOMES)))); } const FUNGUS: &[(&str, &str)] = &[ @@ -454,7 +464,7 @@ fn animal_uuids(tag: &mut Tag) { replace_least_most(tag, "LoveCause", "LoveCause"); } -const ABSTRACT_HORSES: &[&str] = [ +const ABSTRACT_HORSES: &[&str] = &[ "minecraft:donkey", "minecraft:horse", "minecraft:llama", @@ -463,8 +473,8 @@ const ABSTRACT_HORSES: &[&str] = [ "minecraft:trader_llama", "minecraft:zombie_horse", ]; -const TAMEABLE_ANIMALS: &[&str] = ["minecraft:cat", "minecraft:parrot", "minecraft:wolf"]; -const ANIMALS: &[&str] = [ +const TAMEABLE_ANIMALS: &[&str] = &["minecraft:cat", "minecraft:parrot", "minecraft:wolf"]; +const ANIMALS: &[&str] = &[ "minecraft:bee", "minecraft:chicken", "minecraft:cow", @@ -479,7 +489,7 @@ const ANIMALS: &[&str] = [ "minecraft:turtle", "minecraft:hoglin", ]; -const MOBS: &[&str] = [ +const MOBS: &[&str] = &[ "minecraft:bat", "minecraft:blaze", "minecraft:cave_spider", @@ -525,7 +535,7 @@ const MOBS: &[&str] = [ "minecraft:ravager", "minecraft:piglin", ]; -const PROJECTILES: &[&str] = [ +const PROJECTILES: &[&str] = &[ "minecraft:arrow", "minecraft:dragon_fireball", "minecraft:firework_rocket", @@ -980,3 +990,489 @@ fn shulker_rotation(cx: &mut Cx) { } }); } + +// ------------------------------------------------------------------ 2537 to 2553 + +/// `LegacyDimensionIdFix`: numeric dimensions of players and maps become names. +fn legacy_dimension_id(cx: &mut Cx) { + let fix = |v: &mut Tag, field: &str| { + if let Some(id) = v.get(field) + && let Some(n) = as_number(id) + { + let name = match n.int_value() { + -1 => "minecraft:the_nether", + 1 => "minecraft:the_end", + _ => "minecraft:overworld", + }; + set(v, field, string(name)); + } + }; + cx.each(Ty::Player, |p| fix(p, "Dimension")); + cx.each(Ty::SavedMapData, |m| { + if let Some(data) = m.get_mut("data") { + fix(data, "dimension"); + } + }); +} + +/// `LevelLegacyWorldGenSettingsFix`: the generator settings move into `WorldGenSettings`. +fn level_legacy_world_gen_settings(cx: &mut Cx) { + cx.each(Ty::Level, |data| { + let mut settings = data + .get("WorldGenSettings") + .cloned() + .unwrap_or_else(super::dynamic::empty_map); + for key in [ + "RandomSeed", + "generatorName", + "generatorOptions", + "generatorVersion", + "legacy_custom_options", + "MapFeatures", + "BonusChest", + ] { + if let Some(old) = remove(data, key) { + set(&mut settings, key, old); + } + } + set(data, "WorldGenSettings", settings); + }); +} + +fn map_of(entries: impl IntoIterator) -> Tag { + Tag::compound(entries) +} + +fn noise_generator(seed: i64, settings: Tag, biome_source: Tag) -> Tag { + map_of([ + ("type", string("minecraft:noise")), + ("biome_source", biome_source), + ("seed", Tag::Long(seed)), + ("settings", settings), + ]) +} + +fn vanilla_biome_source(seed: i64, legacy_biome_init_layer: bool, large_biomes: bool) -> Tag { + let mut source = map_of([ + ("type", string("minecraft:vanilla_layered")), + ("seed", Tag::Long(seed)), + ("large_biomes", Tag::Byte(i8::from(large_biomes))), + ]); + if legacy_biome_init_layer { + set(&mut source, "legacy_biome_init_layer", Tag::Byte(1)); + } + source +} + +fn default_overworld(seed: i64) -> Tag { + noise_generator( + seed, + string("minecraft:overworld"), + vanilla_biome_source(seed, false, false), + ) +} + +/// `WorldGenSettingsFix.vanillaLevels`. +pub(super) fn vanilla_levels(seed: i64, overworld: Tag, caves: bool) -> Tag { + let overworld_type = if caves { + "minecraft:overworld_caves" + } else { + "minecraft:overworld" + }; + map_of([ + ( + "minecraft:overworld", + map_of([("type", string(overworld_type)), ("generator", overworld)]), + ), + ( + "minecraft:the_nether", + map_of([ + ("type", string("minecraft:the_nether")), + ( + "generator", + noise_generator( + seed, + string("minecraft:nether"), + map_of([ + ("type", string("minecraft:multi_noise")), + ("seed", Tag::Long(seed)), + ("preset", string("minecraft:nether")), + ]), + ), + ), + ]), + ), + ( + "minecraft:the_end", + map_of([ + ("type", string("minecraft:the_end")), + ( + "generator", + noise_generator( + seed, + string("minecraft:end"), + map_of([ + ("type", string("minecraft:the_end")), + ("seed", Tag::Long(seed)), + ]), + ), + ), + ]), + ), + ]) +} + +/// The default `StructureFeatureConfiguration` of a structure: spacing, separation, salt. +fn structure_default(name: &str) -> (i32, i32, i32) { + match name { + "minecraft:village" => (32, 8, 10387312), + "minecraft:desert_pyramid" => (32, 8, 14357617), + "minecraft:igloo" => (32, 8, 14357618), + "minecraft:jungle_pyramid" => (32, 8, 14357619), + "minecraft:swamp_hut" => (32, 8, 14357620), + "minecraft:pillager_outpost" => (32, 8, 165745296), + "minecraft:monument" => (32, 5, 10387313), + "minecraft:endcity" => (20, 11, 10387313), + _ => (80, 20, 10387319), // minecraft:mansion + } +} + +/// `NumberUtils.toInt(s, default)` with a minimum. +fn option_int(value: &str, default: i32, min: i32) -> i32 { + value.parse::().unwrap_or(default).max(min) +} + +fn set_spacing( + config: &mut Vec<(&'static str, (i32, i32, i32))>, + structure: &'static str, + value: &str, + min: i32, +) { + let current = config + .iter() + .find(|(n, _)| *n == structure) + .map_or_else(|| structure_default(structure), |(_, c)| *c); + let spacing = option_int(value, current.0, min); + let updated = (spacing, current.1, current.2); + match config.iter_mut().find(|(n, _)| *n == structure) { + Some(entry) => entry.1 = updated, + None => config.push((structure, updated)), + } +} + +/// `WorldGenSettingsFix.fixFlatStructures`. +fn fix_flat_structures(settings: Option<&Tag>) -> Tag { + let (mut distance, mut spread, mut count) = (32, 3, 128); + let mut has_stronghold = false; + let mut config: Vec<(&'static str, (i32, i32, i32))> = Vec::new(); + if settings.is_none() { + has_stronghold = true; + config.push(("minecraft:village", structure_default("minecraft:village"))); + } + if let Some(Tag::Compound(structures)) = settings.and_then(|s| s.get("structures")) { + for (structure_key, options) in structures { + let Tag::Compound(options) = options else { + continue; + }; + let structure = structure_key.to_string_lossy(); + for (option_key, option_value) in options { + let option = option_key.to_string_lossy(); + let value = as_str(Some(option_value)).unwrap_or_default(); + if structure == "stronghold" { + has_stronghold = true; + match option.as_str() { + "distance" => distance = option_int(&value, distance, 1), + "spread" => spread = option_int(&value, spread, 1), + "count" => count = option_int(&value, count, 1), + _ => {} + } + } else { + match (option.as_str(), structure.as_str()) { + ("distance", "village") => { + set_spacing(&mut config, "minecraft:village", &value, 9) + } + ("distance", "biome_1") => { + for s in [ + "minecraft:desert_pyramid", + "minecraft:igloo", + "minecraft:jungle_pyramid", + "minecraft:swamp_hut", + "minecraft:pillager_outpost", + ] { + set_spacing(&mut config, s, &value, 9); + } + } + ("distance", "endcity") => { + set_spacing(&mut config, "minecraft:endcity", &value, 1) + } + ("distance", "mansion") => { + set_spacing(&mut config, "minecraft:mansion", &value, 1) + } + ("separation", "oceanmonument") => { + let current = config + .iter() + .find(|(n, _)| *n == "minecraft:monument") + .map_or_else( + || structure_default("minecraft:monument"), + |(_, c)| *c, + ); + let spacing = option_int(&value, current.1, 1); + let updated = (spacing, current.1, current.2); + match config.iter_mut().find(|(n, _)| *n == "minecraft:monument") { + Some(entry) => entry.1 = updated, + None => config.push(("minecraft:monument", updated)), + } + } + ("spacing", "oceanmonument") => { + set_spacing(&mut config, "minecraft:monument", &value, 1) + } + _ => {} + } + } + } + } + } + let mut structures = Compound::new(); + for (name, (spacing, separation, salt)) in config { + structures.insert( + JavaString::from(name), + map_of([ + ("spacing", Tag::Int(spacing)), + ("separation", Tag::Int(separation)), + ("salt", Tag::Int(salt)), + ]), + ); + } + let mut out = map_of([("structures", Tag::Compound(structures))]); + if has_stronghold { + set( + &mut out, + "stronghold", + map_of([ + ("distance", Tag::Int(distance)), + ("spread", Tag::Int(spread)), + ("count", Tag::Int(count)), + ]), + ); + } + out +} + +/// `WorldGenSettingsFix`: the legacy generator settings become dimensions. +fn world_gen_settings(cx: &mut Cx) { + cx.each(Ty::WorldGenSettings, |input| { + let seed = as_long(input.get("RandomSeed"), 0); + let name = as_str(input.get("generatorName")).map(|n| n.to_lowercase()); + let legacy_custom_options = as_str(input.get("legacy_custom_options")).or_else(|| { + (name.as_deref() == Some("customized")) + .then(|| as_str(input.get("generatorOptions"))) + .flatten() + }); + let mut caves = false; + let generator = match name.as_deref() { + None | Some("customized") => default_overworld(seed), + Some("flat") => { + let settings = input.get("generatorOptions"); + let layers = settings + .and_then(|s| s.get("layers")) + .cloned() + .unwrap_or_else(|| { + Tag::List( + [ + (1, "minecraft:bedrock"), + (2, "minecraft:dirt"), + (1, "minecraft:grass_block"), + ] + .into_iter() + .map(|(h, b)| map_of([("height", Tag::Int(h)), ("block", string(b))])) + .collect(), + ) + }); + map_of([ + ("type", string("minecraft:flat")), + ( + "settings", + map_of([ + ("structures", fix_flat_structures(settings)), + ("layers", layers), + ( + "biome", + string(&super::dynamic::as_string( + settings.and_then(|s| s.get("biome")), + "minecraft:plains", + )), + ), + ]), + ), + ]) + } + Some("debug_all_block_states") => map_of([("type", string("minecraft:debug"))]), + Some("buffet") => { + let settings = input.get("generatorOptions"); + let kind = settings + .and_then(|s| s.get("chunk_generator")) + .and_then(|g| as_str(g.get("type"))); + let noise_settings = match kind.as_deref() { + Some("minecraft:caves") => { + caves = true; + "minecraft:caves" + } + Some("minecraft:floating_islands") => "minecraft:floating_islands", + _ => "minecraft:overworld", + }; + let source = settings + .and_then(|s| s.get("biome_source")) + .cloned() + .unwrap_or_else(|| map_of([("type", string("minecraft:fixed"))])); + let fixed = if as_str(source.get("type")).as_deref() == Some("minecraft:fixed") { + let biome = stream(source.get("options").and_then(|o| o.get("biomes"))) + .first() + .and_then(|b| as_str(Some(b))) + .unwrap_or_else(|| "minecraft:ocean".to_owned()); + let mut fixed = source; + remove(&mut fixed, "options"); + set(&mut fixed, "biome", string(&biome)); + fixed + } else { + source + }; + noise_generator(seed, string(noise_settings), fixed) + } + Some(other) => { + let normal = other == "default"; + let legacy = other == "default_1_1" + || normal && as_int(input.get("generatorVersion"), 0) == 0; + noise_generator( + seed, + string(if other == "amplified" { + "minecraft:amplified" + } else { + "minecraft:overworld" + }), + vanilla_biome_source(seed, legacy, other == "largebiomes"), + ) + } + }; + let mut out = map_of([ + ("seed", Tag::Long(seed)), + ( + "generate_features", + Tag::Byte(i8::from(as_bool(input.get("MapFeatures"), true))), + ), + ( + "bonus_chest", + Tag::Byte(i8::from(as_bool(input.get("BonusChest"), false))), + ), + ("dimensions", vanilla_levels(seed, generator, caves)), + ]); + if let Some(options) = legacy_custom_options { + set(&mut out, "legacy_custom_options", string(&options)); + } + *input = out; + }); +} + +/// `BiomeFix.BIOMES`. +const BIOMES: &[(&str, &str)] = &[ + ("minecraft:extreme_hills", "minecraft:mountains"), + ("minecraft:swampland", "minecraft:swamp"), + ("minecraft:hell", "minecraft:nether_wastes"), + ("minecraft:sky", "minecraft:the_end"), + ("minecraft:ice_flats", "minecraft:snowy_tundra"), + ("minecraft:ice_mountains", "minecraft:snowy_mountains"), + ("minecraft:mushroom_island", "minecraft:mushroom_fields"), + ( + "minecraft:mushroom_island_shore", + "minecraft:mushroom_field_shore", + ), + ("minecraft:beaches", "minecraft:beach"), + ("minecraft:forest_hills", "minecraft:wooded_hills"), + ("minecraft:smaller_extreme_hills", "minecraft:mountain_edge"), + ("minecraft:stone_beach", "minecraft:stone_shore"), + ("minecraft:cold_beach", "minecraft:snowy_beach"), + ("minecraft:roofed_forest", "minecraft:dark_forest"), + ("minecraft:taiga_cold", "minecraft:snowy_taiga"), + ("minecraft:taiga_cold_hills", "minecraft:snowy_taiga_hills"), + ("minecraft:redwood_taiga", "minecraft:giant_tree_taiga"), + ( + "minecraft:redwood_taiga_hills", + "minecraft:giant_tree_taiga_hills", + ), + ( + "minecraft:extreme_hills_with_trees", + "minecraft:wooded_mountains", + ), + ("minecraft:savanna_rock", "minecraft:savanna_plateau"), + ("minecraft:mesa", "minecraft:badlands"), + ("minecraft:mesa_rock", "minecraft:wooded_badlands_plateau"), + ("minecraft:mesa_clear_rock", "minecraft:badlands_plateau"), + ("minecraft:sky_island_low", "minecraft:small_end_islands"), + ("minecraft:sky_island_medium", "minecraft:end_midlands"), + ("minecraft:sky_island_high", "minecraft:end_highlands"), + ("minecraft:sky_island_barren", "minecraft:end_barrens"), + ("minecraft:void", "minecraft:the_void"), + ("minecraft:mutated_plains", "minecraft:sunflower_plains"), + ("minecraft:mutated_desert", "minecraft:desert_lakes"), + ( + "minecraft:mutated_extreme_hills", + "minecraft:gravelly_mountains", + ), + ("minecraft:mutated_forest", "minecraft:flower_forest"), + ("minecraft:mutated_taiga", "minecraft:taiga_mountains"), + ("minecraft:mutated_swampland", "minecraft:swamp_hills"), + ("minecraft:mutated_ice_flats", "minecraft:ice_spikes"), + ("minecraft:mutated_jungle", "minecraft:modified_jungle"), + ( + "minecraft:mutated_jungle_edge", + "minecraft:modified_jungle_edge", + ), + ( + "minecraft:mutated_birch_forest", + "minecraft:tall_birch_forest", + ), + ( + "minecraft:mutated_birch_forest_hills", + "minecraft:tall_birch_hills", + ), + ( + "minecraft:mutated_roofed_forest", + "minecraft:dark_forest_hills", + ), + ( + "minecraft:mutated_taiga_cold", + "minecraft:snowy_taiga_mountains", + ), + ( + "minecraft:mutated_redwood_taiga", + "minecraft:giant_spruce_taiga", + ), + ( + "minecraft:mutated_redwood_taiga_hills", + "minecraft:giant_spruce_taiga_hills", + ), + ( + "minecraft:mutated_extreme_hills_with_trees", + "minecraft:modified_gravelly_mountains", + ), + ("minecraft:mutated_savanna", "minecraft:shattered_savanna"), + ( + "minecraft:mutated_savanna_rock", + "minecraft:shattered_savanna_plateau", + ), + ("minecraft:mutated_mesa", "minecraft:eroded_badlands"), + ( + "minecraft:mutated_mesa_rock", + "minecraft:modified_wooded_badlands_plateau", + ), + ( + "minecraft:mutated_mesa_clear_rock", + "minecraft:modified_badlands_plateau", + ), + ("minecraft:warm_deep_ocean", "minecraft:deep_warm_ocean"), + ( + "minecraft:lukewarm_deep_ocean", + "minecraft:deep_lukewarm_ocean", + ), + ("minecraft:cold_deep_ocean", "minecraft:deep_cold_ocean"), + ("minecraft:frozen_deep_ocean", "minecraft:deep_frozen_ocean"), +]; diff --git a/crates/horizon-world/src/datafix/schema.rs b/crates/horizon-world/src/datafix/schema.rs index bf627401f..b3048bbb2 100644 --- a/crates/horizon-world/src/datafix/schema.rs +++ b/crates/horizon-world/src/datafix/schema.rs @@ -420,7 +420,11 @@ impl Walker<'_> { "minecraft:item" | "minecraft:item_frame" | "minecraft:glow_item_frame" => { self.field(Ty::ItemStack, v, "Item"); } - "minecraft:potion" if k < key(4306, 0) => self.field(Ty::ItemStack, v, "Item"), + "minecraft:potion" if k < key(4306, 0) => { + // V2511_1 renamed the typed field. + let field = if k < key(2511, 1) { "Potion" } else { "Item" }; + self.field(Ty::ItemStack, v, field); + } "minecraft:splash_potion" | "minecraft:lingering_potion" if k >= key(4306, 0) => { self.field(Ty::ItemStack, v, "Item"); } From 8498688341d8eb2a16ab704ce2c5d0d1ab1e3c8d Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:26:17 +0200 Subject: [PATCH 07/25] Datafix: 1.13 to 1.14 fixes (1800 to 1963); saved data may be plain NBT --- crates/horizon-world/src/datafix/files.rs | 19 +- crates/horizon-world/src/datafix/fixes_mid.rs | 326 ++++++++++++++++++ .../parity/VanillaDataFixOracle.java | 6 +- 3 files changed, 349 insertions(+), 2 deletions(-) diff --git a/crates/horizon-world/src/datafix/files.rs b/crates/horizon-world/src/datafix/files.rs index 643cd4390..fc3f70d55 100644 --- a/crates/horizon-world/src/datafix/files.rs +++ b/crates/horizon-world/src/datafix/files.rs @@ -38,6 +38,23 @@ pub fn read_dat(path: &Path) -> io::Result> { Ok(Some(root.tag)) } +/// `SavedDataStorage.readTagFromDisk`: a file without the gzip header is plain NBT. +pub fn read_saved_dat(path: &Path) -> io::Result> { + let bytes = match fs::read(path) { + Ok(b) => b, + Err(e) if e.kind() == io::ErrorKind::NotFound => return Ok(None), + Err(e) => return Err(e), + }; + let limits = Limits::default(); + let raw = if bytes.starts_with(&[0x1f, 0x8b]) { + Compression::Gzip.decode(&bytes, limits.max_bytes)? + } else { + bytes + }; + let (root, _) = nbt::read_named(&raw, limits).map_err(|e| invalid(e.to_string()))?; + Ok(Some(root.tag)) +} + /// `NbtIo.writeCompressed`, creating the parent folders. pub fn write_dat(path: &Path, tag: &Tag) -> io::Result<()> { if let Some(parent) = path.parent() { @@ -571,7 +588,7 @@ fn upgrade_saved_data(data: &Path) -> io::Result<()> { let Some(ty) = super::saved_data_type(&relative) else { continue; }; - if let Some(mut tag) = read_dat(&file)? { + if let Some(mut tag) = read_saved_dat(&file)? { super::update_saved_data(ty, &mut tag); set(&mut tag, "DataVersion", Tag::Int(CURRENT)); write_dat(&file, &tag)?; diff --git a/crates/horizon-world/src/datafix/fixes_mid.rs b/crates/horizon-world/src/datafix/fixes_mid.rs index be52abc07..54e6e67b9 100644 --- a/crates/horizon-world/src/datafix/fixes_mid.rs +++ b/crates/horizon-world/src/datafix/fixes_mid.rs @@ -11,6 +11,119 @@ use super::{Cx, FixFn, id_is, renamer}; use crate::nbt::{Compound, JavaString, Tag}; pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { + out.push((key(1800, 0), |cx| { + cx.rename( + Ty::ItemName, + renamer(&[ + ("minecraft:cactus_green", "minecraft:green_dye"), + ("minecraft:rose_red", "minecraft:red_dye"), + ("minecraft:dandelion_yellow", "minecraft:yellow_dye"), + ]), + ) + })); + out.push((key(1802, 0), |cx| { + super::fixes_a::block_rename( + cx, + &[ + ("minecraft:stone_slab", "minecraft:smooth_stone_slab"), + ("minecraft:sign", "minecraft:oak_sign"), + ("minecraft:wall_sign", "minecraft:oak_wall_sign"), + ], + ) + })); + out.push((key(1802, 0), |cx| { + cx.rename( + Ty::ItemName, + renamer(&[ + ("minecraft:stone_slab", "minecraft:smooth_stone_slab"), + ("minecraft:sign", "minecraft:oak_sign"), + ]), + ) + })); + out.push((key(1803, 0), item_lore)); + out.push((key(1904, 0), cat_split)); + out.push((key(1905, 0), |cx| { + level_status(cx, |status| { + (status == "postprocessed").then_some("fullchunk") + }) + })); + out.push((key(1911, 0), |cx| { + level_status(cx, |status| { + Some(match status { + "structure_references" | "biomes" => "empty", + "base" => "surface", + "carved" => "carvers", + "liquid_carved" => "liquid_carvers", + "decorated" => "features", + "lighted" => "light", + "mobs_spawned" => "spawn", + "finalized" => "heightmaps", + "fullchunk" => "full", + _ => "empty", + }) + }) + })); + out.push((key(1914, 0), |cx| { + cx.block_entity("minecraft:chest", |be| { + if as_str(be.get("LootTable")).as_deref() == Some("minecraft:chests/village_blacksmith") + { + set( + be, + "LootTable", + string("minecraft:chests/village/village_weaponsmith"), + ); + } + }) + })); + out.push((key(1917, 0), |cx| { + cx.entity("minecraft:cat", |e| { + if as_int(e.get("CatType"), 0) == 9 { + set(e, "CatType", Tag::Int(10)); + } + }) + })); + out.push((key(1918, 0), |cx| villager_data(cx, "minecraft:villager"))); + out.push((key(1918, 0), |cx| { + villager_data(cx, "minecraft:zombie_villager") + })); + out.push((key(1920, 0), new_village)); + out.push((key(1925, 0), |cx| { + cx.each(Ty::SavedMapIndex, |root| { + let old = std::mem::replace(root, Tag::End); + *root = Tag::compound([("data", old)]); + }) + })); + out.push((key(1928, 0), |cx| { + entity_rename(cx, "minecraft:illager_beast", "minecraft:ravager") + })); + out.push((key(1928, 0), |cx| { + cx.rename( + Ty::ItemName, + renamer(&[( + "minecraft:illager_beast_spawn_egg", + "minecraft:ravager_spawn_egg", + )]), + ) + })); + out.push((key(1946, 0), reorganize_poi)); + out.push((key(1948, 0), ominous_banner_item)); + out.push((key(1953, 0), ominous_banner_block_entity)); + out.push((key(1955, 0), villager_level_and_xp)); + out.push((key(1955, 0), zombie_villager_xp)); + out.push((key(1961, 0), |cx| { + cx.each(Ty::Chunk, |c| { + if let Some(level) = c.get_mut("Level") { + remove(level, "isLightOn"); + } + }) + })); + out.push((key(1963, 0), |cx| { + cx.entity("minecraft:villager", |e| { + map_elements_filter(e, "Gossips", |g| { + as_str(g.get("Type")).as_deref() != Some("golem") + }); + }) + })); out.push((key(2100, 0), |cx| { cx.rename( Ty::Recipe, @@ -1476,3 +1589,216 @@ const BIOMES: &[(&str, &str)] = &[ ("minecraft:cold_deep_ocean", "minecraft:deep_cold_ocean"), ("minecraft:frozen_deep_ocean", "minecraft:deep_frozen_ocean"), ]; + +// ------------------------------------------------------------------ 1800 to 1963 + +/// `ItemLoreFix`: the lore lines become JSON text components. +fn item_lore(cx: &mut Cx) { + cx.each(Ty::ItemStack, |stack| { + let Some(lore) = stack + .get_mut("tag") + .and_then(|t| t.get_mut("display")) + .and_then(|d| d.get_mut("Lore")) + else { + return; + }; + if let Tag::List(lines) = lore { + for line in lines { + if let Tag::String(text) = line { + *line = Tag::String(JavaString(super::json::text_component_json(&text.0))); + } + } + } + }); +} + +/// `EntityCatSplitFix`: tame ocelots become cats. (The vanilla fix sets +/// `Trusting` on a copy it then drops.) +fn cat_split(cx: &mut Cx) { + cx.each(Ty::Entity, |e| { + if !id_is(e, "minecraft:ocelot") { + return; + } + let kind = as_int(e.get("CatType"), 0); + if kind > 0 && kind < 4 { + set(e, "CatType", Tag::Int(kind)); + let owner = super::dynamic::as_string(e.get("OwnerUUID"), ""); + set(e, "OwnerUUID", string(&owner)); + set(e, "id", string("minecraft:cat")); + } + }); +} + +/// The `Status` of a chunk, mapped (`ChunkStatusFix`, `ChunkStatusFix2`). +fn level_status(cx: &mut Cx, f: impl Fn(&str) -> Option<&'static str>) { + cx.each(Ty::Chunk, |c| { + let Some(level) = c.get_mut("Level") else { + return; + }; + let status = super::dynamic::as_string(level.get("Status"), "empty"); + if let Some(new) = f(&status) + && new != status + { + set(level, "Status", string(new)); + } + }); +} + +/// A list field filtered by `keep`; a present field that is no list becomes empty. +fn map_elements_filter(tag: &mut Tag, field: &str, keep: impl Fn(&Tag) -> bool) { + if let Some(v) = tag.get_mut(field) { + *v = Tag::List(stream(Some(v)).into_iter().filter(|e| keep(e)).collect()); + } +} + +/// `VillagerDataFix`: profession and career become `VillagerData`. +fn villager_data(cx: &mut Cx, entity: &str) { + cx.entity(entity, |e| { + let profession = as_int(e.get("Profession"), 0); + let career = as_int(e.get("Career"), 0); + let profession = match (profession, career) { + (0, 2) => "minecraft:fisherman", + (0, 3) => "minecraft:shepherd", + (0, 4) => "minecraft:fletcher", + (0, _) => "minecraft:farmer", + (1, 2) => "minecraft:cartographer", + (1, _) => "minecraft:librarian", + (2, _) => "minecraft:cleric", + (3, 2) => "minecraft:weaponsmith", + (3, 3) => "minecraft:toolsmith", + (3, _) => "minecraft:armorer", + (4, 2) => "minecraft:leatherworker", + (4, _) => "minecraft:butcher", + (5, _) => "minecraft:nitwit", + _ => "minecraft:none", + }; + let level = e.get("CareerLevel").cloned().unwrap_or(Tag::Int(1)); + remove(e, "Profession"); + remove(e, "Career"); + remove(e, "CareerLevel"); + set( + e, + "VillagerData", + Tag::compound([ + ("type", string("minecraft:plains")), + ("profession", string(profession)), + ("level", level), + ]), + ); + }); +} + +/// `NewVillageFix`: the new village structure takes the old one's name. +fn new_village(cx: &mut Cx) { + cx.each(Ty::Chunk, |c| { + let Some(structures) = c.get_mut("Level").and_then(|l| l.get_mut("Structures")) else { + return; + }; + if let Some(Tag::Compound(starts)) = structures.get_mut("Starts") { + starts.remove(&JavaString::from("Village")); + if let Some(v) = starts.remove(&JavaString::from("New_Village")) { + starts.insert(JavaString::from("Village"), v); + } + } + if let Some(references) = structures.get_mut("References") { + if let Some(v) = remove(references, "New_Village") { + set(references, "Village", v); + } + remove(references, "Village"); + } + }); + cx.each(Ty::StructureFeature, |s| { + if let Some(id) = s.get("id") { + let id = as_str(Some(id)).unwrap_or_default(); + if namespaced(&id) == "minecraft:new_village" { + set(s, "id", string("minecraft:village")); + } + } + }); +} + +/// `ReorganizePoi`: the sections `0` to `15` move below `Sections`. +fn reorganize_poi(cx: &mut Cx) { + cx.each(Ty::PoiChunk, |poi| { + let mut sections = Compound::new(); + for i in 0..16 { + let name = i.to_string(); + if let Some(records) = remove(poi, &name) { + sections.insert( + JavaString::from(name.as_str()), + Tag::compound([("Records", records)]), + ); + } + } + set(poi, "Sections", Tag::Compound(sections)); + }); +} + +const ILLAGER_BANNER: &str = "\"translate\":\"block.minecraft.illager_banner\""; +const OMINOUS_BANNER: &str = "\"translate\":\"block.minecraft.ominous_banner\""; + +/// `OminousBannerRenameFix`. +fn ominous_banner_item(cx: &mut Cx) { + cx.item( + |id| id == "minecraft:white_banner", + |stack| { + if let Some(name) = stack + .get_mut("tag") + .and_then(|t| t.get_mut("display")) + .and_then(|d| d.get_mut("Name")) + && let Some(text) = as_str(Some(name)) + { + *name = string(&text.replace(ILLAGER_BANNER, OMINOUS_BANNER)); + } + }, + ); +} + +/// `OminousBannerBlockEntityRenameFix`. +fn ominous_banner_block_entity(cx: &mut Cx) { + cx.block_entity("minecraft:banner", |be| { + if let Some(name) = be.get_mut("CustomName") + && let Some(text) = as_str(Some(name)) + { + *name = string(&text.replace(ILLAGER_BANNER, OMINOUS_BANNER)); + } + }); +} + +const LEVEL_XP_THRESHOLDS: [i32; 5] = [0, 10, 50, 100, 150]; + +fn min_xp_per_level(level: i32) -> i32 { + LEVEL_XP_THRESHOLDS[(level - 1).clamp(0, 4) as usize] +} + +/// `VillagerRebuildLevelAndXpFix`. +fn villager_level_and_xp(cx: &mut Cx) { + cx.entity("minecraft:villager", |e| { + let mut level = as_int(e.get("VillagerData").and_then(|d| d.get("level")), 0); + if level == 0 || level == 1 { + let offers = e + .get("Offers") + .and_then(|o| o.get("Recipes")) + .map_or(0, |r| stream(Some(r)).len() as i32); + level = (offers / 2).clamp(1, 5); + if level > 1 + && let Some(data) = e.get_mut("VillagerData") + { + set(data, "level", Tag::Int(level)); + } + } + if e.get("Xp").and_then(as_number).is_none() { + set(e, "Xp", Tag::Int(min_xp_per_level(level))); + } + }); +} + +/// `ZombieVillagerRebuildXpFix`. +fn zombie_villager_xp(cx: &mut Cx) { + cx.entity("minecraft:zombie_villager", |e| { + if e.get("Xp").and_then(as_number).is_none() { + let level = as_int(e.get("VillagerData").and_then(|d| d.get("level")), 1); + set(e, "Xp", Tag::Int(min_xp_per_level(level))); + } + }); +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java index f1c5f92e9..57a9305bc 100644 --- a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java @@ -243,7 +243,11 @@ public final class VanillaDataFixOracle { if (type == null) { continue; } - CompoundTag tag = NbtIo.readCompressed(file, NbtAccounter.unlimitedHeap()); + // SavedDataStorage.readTagFromDisk: a file that does not start with the gzip header is plain NBT. + byte[] bytes = Files.readAllBytes(file); + boolean gzip = bytes.length >= 2 && (bytes[0] & 255) == 0x1f && (bytes[1] & 255) == 0x8b; + CompoundTag tag = gzip ? NbtIo.readCompressed(file, NbtAccounter.unlimitedHeap()) + : NbtIo.read(new java.io.DataInputStream(new java.io.ByteArrayInputStream(bytes))); int version = NbtUtils.getDataVersion(tag, 1343); tag = type.update(fixer, tag, version, current); NbtIo.writeCompressed(NbtUtils.addDataVersion(tag, current), file); From 748a80feddd31169b7447023556c05af361112c1 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:31:05 +0200 Subject: [PATCH 08/25] Port the DataFixers of 1.12.2 to 1.13.2 (keys 1450 to 1624): the flattening, renames, stats, leaves Co-Authored-By: Claude Sonnet 5.5 --- .../src/datafix/block_state_data.rs | 199 ++ .../src/datafix/block_state_data.txt | 1703 +++++++++++++++++ .../src/datafix/chunk_flatten.rs | 749 ++++++++ .../horizon-world/src/datafix/chunk_leaves.rs | 507 +++++ .../horizon-world/src/datafix/fixes_flat.rs | 1197 ++++++++++++ .../horizon-world/src/datafix/flat_tables.rs | 1574 +++++++++++++++ crates/horizon-world/src/datafix/mod.rs | 18 +- crates/horizon-world/src/datafix/schema.rs | 9 + .../horizon-world/src/datafix/schema_flat.rs | 166 ++ tools/gen_block_state_data.py | 333 ++++ tools/gen_flat_tables.py | 144 ++ 11 files changed, 6598 insertions(+), 1 deletion(-) create mode 100644 crates/horizon-world/src/datafix/block_state_data.rs create mode 100644 crates/horizon-world/src/datafix/block_state_data.txt create mode 100644 crates/horizon-world/src/datafix/chunk_flatten.rs create mode 100644 crates/horizon-world/src/datafix/chunk_leaves.rs create mode 100644 crates/horizon-world/src/datafix/fixes_flat.rs create mode 100644 crates/horizon-world/src/datafix/flat_tables.rs create mode 100644 crates/horizon-world/src/datafix/schema_flat.rs create mode 100644 tools/gen_block_state_data.py create mode 100644 tools/gen_flat_tables.py diff --git a/crates/horizon-world/src/datafix/block_state_data.rs b/crates/horizon-world/src/datafix/block_state_data.rs new file mode 100644 index 000000000..9d5f578ab --- /dev/null +++ b/crates/horizon-world/src/datafix/block_state_data.rs @@ -0,0 +1,199 @@ +//! `BlockStateData`: the table that maps the 1.12 block states (`blockId << 4 | data`) +//! to 1.13 block states, and the 1.12 `Name` + `Properties` tags to those ids. +//! The table itself is `block_state_data.txt`, generated from vanilla's source by +//! `tools/gen_block_state_data.py`. +//! +//! Vanilla keeps one tag object per `register` call (and per defaulted id) and +//! `ChunkPalettedStorageFix` compares them by identity, so a state is an +//! *instance* here: `register` calls make instances, ids without a call share +//! the instance of the first call for their block. +use std::collections::HashMap; +use std::sync::OnceLock; + +use super::dynamic::{as_str, key, string}; +use crate::nbt::{Compound, Tag}; + +/// A block state: name and properties sorted by key. +#[derive(Clone, Debug, PartialEq, Eq, Hash)] +pub struct State { + pub name: String, + pub props: Vec<(String, String)>, +} + +impl State { + pub fn new(name: &str, props: &[(&str, &str)]) -> Self { + let mut props: Vec<(String, String)> = props + .iter() + .map(|(k, v)| ((*k).to_owned(), (*v).to_owned())) + .collect(); + props.sort(); + Self { + name: name.to_owned(), + props, + } + } + pub fn property(&self, name: &str) -> &str { + self.props + .iter() + .find(|(k, _)| k == name) + .map_or("", |(_, v)| v) + } + /// The NBT tag: `{Name}` or `{Name, Properties}`. + pub fn to_tag(&self) -> Tag { + let mut tag = Tag::compound([("Name", string(&self.name))]); + if !self.props.is_empty() { + let mut props = Compound::new(); + for (k, v) in &self.props { + props.insert(key(k), string(v)); + } + super::dynamic::set(&mut tag, "Properties", Tag::Compound(props)); + } + tag + } + /// A tag read back as a state (`Name` and an optional `Properties` of strings only). + pub fn from_tag(tag: &Tag) -> Option { + let Tag::Compound(c) = tag else { + return None; + }; + let name = as_str(c.get(&key("Name")))?; + let mut props = Vec::new(); + let mut expected = 1; + if let Some(p) = c.get(&key("Properties")) { + expected += 1; + let Tag::Compound(p) = p else { + return None; + }; + for (k, v) in p { + props.push((k.to_string_lossy(), as_str(Some(v))?)); + } + } + if c.len() != expected { + return None; + } + props.sort(); + Some(Self { name, props }) + } +} + +pub struct Data { + /// One entry per `register` call. + pub instances: Vec, + /// `MAP`: the instance of each id (after the defaulting of `finalizeMaps`). + map: Vec>, + id_by_old: HashMap, + id_by_old_name: HashMap, +} + +fn parse_props(s: &str) -> Vec<(String, String)> { + if s.is_empty() { + return Vec::new(); + } + s.split(';') + .map(|kv| { + let (k, v) = kv.split_once('=').unwrap_or((kv, "")); + (k.to_owned(), v.to_owned()) + }) + .collect() +} + +pub fn data() -> &'static Data { + static DATA: OnceLock = OnceLock::new(); + DATA.get_or_init(|| { + let mut map: Vec> = vec![None; 4096]; + let mut defaults: Vec> = vec![None; 256]; + let mut instances = Vec::new(); + let mut id_by_old = HashMap::new(); + let mut id_by_old_name: HashMap = HashMap::new(); + for line in include_str!("block_state_data.txt").lines() { + if line.starts_with('#') || line.is_empty() { + continue; + } + let f: Vec<&str> = line.split('\t').collect(); + let id: usize = f[0].parse().expect("id"); + let instance = instances.len() as u32; + instances.push(State { + name: f[1].to_owned(), + props: parse_props(f.get(2).copied().unwrap_or("")), + }); + map[id] = Some(instance); + if defaults[id >> 4].is_none() { + defaults[id >> 4] = Some(instance); + } + for pair in f[3..].chunks(2) { + let old = State { + name: pair[0].to_owned(), + props: parse_props(pair.get(1).copied().unwrap_or("")), + }; + id_by_old_name.entry(old.name.clone()).or_insert(id as i32); + id_by_old.insert(old, id as i32); + } + } + for (i, slot) in map.iter_mut().enumerate() { + if slot.is_none() { + *slot = defaults[i >> 4]; + } + } + Data { + instances, + map, + id_by_old, + id_by_old_name, + } + }) +} + +impl Data { + /// `getTag(id)` as an instance. + pub fn instance(&self, id: i32) -> u32 { + let slot = usize::try_from(id) + .ok() + .filter(|i| *i < 4096) + .and_then(|i| self.map[i]); + slot.or(self.map[0]).expect("air is registered") + } + pub fn state(&self, instance: u32) -> &State { + &self.instances[instance as usize] + } +} + +/// `BlockStateData.getTag`. +pub fn get_tag(id: i32) -> Tag { + let d = data(); + d.state(d.instance(id)).to_tag() +} + +/// `BlockStateData.upgradeBlockStateTag`. +pub fn upgrade_block_state_tag(old: &Tag) -> Tag { + let d = data(); + match State::from_tag(old).and_then(|s| d.id_by_old.get(&s).copied()) { + Some(id) if (0..4096).contains(&id) => match d.map[id as usize] { + Some(i) => d.state(i).to_tag(), + None => old.clone(), + }, + _ => old.clone(), + } +} + +/// `BlockStateData.upgradeBlock(String)`. +pub fn upgrade_block_name(old: &str) -> String { + let d = data(); + match d.id_by_old_name.get(old) { + Some(&id) if (0..4096).contains(&id) => match d.map[id as usize] { + Some(i) => d.state(i).name.clone(), + None => old.to_owned(), + }, + _ => old.to_owned(), + } +} + +/// `BlockStateData.upgradeBlock(int)`. +pub fn upgrade_block_id(id: i32) -> String { + let d = data(); + match usize::try_from(id).ok().filter(|i| *i < 4096) { + Some(i) => match d.map[i] { + Some(inst) => d.state(inst).name.clone(), + None => "minecraft:air".to_owned(), + }, + None => "minecraft:air".to_owned(), + } +} diff --git a/crates/horizon-world/src/datafix/block_state_data.txt b/crates/horizon-world/src/datafix/block_state_data.txt new file mode 100644 index 000000000..a0c7e7f9b --- /dev/null +++ b/crates/horizon-world/src/datafix/block_state_data.txt @@ -0,0 +1,1703 @@ +# Generated by tools/gen_block_state_data.py from vanilla 26.3 BlockStateData.java. Do not edit. +# One line per register(ID, new, legacy...) call, in execution order of the static initializer +# (bootstrap0, 1, 2, 3_1, 3_2, 4 .. 9, A .. F). +# Format (tab separated): ID newName newProps [ legacyName legacyProps]... +# ID is the decimal 1.12 (blockId << 4 | data) id; newName/newProps is the 1.13 block state; +# each legacy pair is a 1.12 Name + Properties tag that maps to ID. +# Props: key=value pairs joined by ';', sorted by key; empty string when there are none. +# newName may be the literal %%FILTER_ME%% (vanilla FILTER_ME marker, the skull ids 2304..2317). +0 minecraft:air minecraft:air +16 minecraft:stone minecraft:stone variant=stone +17 minecraft:granite minecraft:stone variant=granite +18 minecraft:polished_granite minecraft:stone variant=smooth_granite +19 minecraft:diorite minecraft:stone variant=diorite +20 minecraft:polished_diorite minecraft:stone variant=smooth_diorite +21 minecraft:andesite minecraft:stone variant=andesite +22 minecraft:polished_andesite minecraft:stone variant=smooth_andesite +32 minecraft:grass_block snowy=false minecraft:grass snowy=false minecraft:grass snowy=true +48 minecraft:dirt minecraft:dirt snowy=false;variant=dirt minecraft:dirt snowy=true;variant=dirt +49 minecraft:coarse_dirt minecraft:dirt snowy=false;variant=coarse_dirt minecraft:dirt snowy=true;variant=coarse_dirt +50 minecraft:podzol snowy=false minecraft:dirt snowy=false;variant=podzol minecraft:dirt snowy=true;variant=podzol +64 minecraft:cobblestone minecraft:cobblestone +80 minecraft:oak_planks minecraft:planks variant=oak +81 minecraft:spruce_planks minecraft:planks variant=spruce +82 minecraft:birch_planks minecraft:planks variant=birch +83 minecraft:jungle_planks minecraft:planks variant=jungle +84 minecraft:acacia_planks minecraft:planks variant=acacia +85 minecraft:dark_oak_planks minecraft:planks variant=dark_oak +96 minecraft:oak_sapling stage=0 minecraft:sapling stage=0;type=oak +97 minecraft:spruce_sapling stage=0 minecraft:sapling stage=0;type=spruce +98 minecraft:birch_sapling stage=0 minecraft:sapling stage=0;type=birch +99 minecraft:jungle_sapling stage=0 minecraft:sapling stage=0;type=jungle +100 minecraft:acacia_sapling stage=0 minecraft:sapling stage=0;type=acacia +101 minecraft:dark_oak_sapling stage=0 minecraft:sapling stage=0;type=dark_oak +104 minecraft:oak_sapling stage=1 minecraft:sapling stage=1;type=oak +105 minecraft:spruce_sapling stage=1 minecraft:sapling stage=1;type=spruce +106 minecraft:birch_sapling stage=1 minecraft:sapling stage=1;type=birch +107 minecraft:jungle_sapling stage=1 minecraft:sapling stage=1;type=jungle +108 minecraft:acacia_sapling stage=1 minecraft:sapling stage=1;type=acacia +109 minecraft:dark_oak_sapling stage=1 minecraft:sapling stage=1;type=dark_oak +112 minecraft:bedrock minecraft:bedrock +128 minecraft:water level=0 minecraft:flowing_water level=0 +129 minecraft:water level=1 minecraft:flowing_water level=1 +130 minecraft:water level=2 minecraft:flowing_water level=2 +131 minecraft:water level=3 minecraft:flowing_water level=3 +132 minecraft:water level=4 minecraft:flowing_water level=4 +133 minecraft:water level=5 minecraft:flowing_water level=5 +134 minecraft:water level=6 minecraft:flowing_water level=6 +135 minecraft:water level=7 minecraft:flowing_water level=7 +136 minecraft:water level=8 minecraft:flowing_water level=8 +137 minecraft:water level=9 minecraft:flowing_water level=9 +138 minecraft:water level=10 minecraft:flowing_water level=10 +139 minecraft:water level=11 minecraft:flowing_water level=11 +140 minecraft:water level=12 minecraft:flowing_water level=12 +141 minecraft:water level=13 minecraft:flowing_water level=13 +142 minecraft:water level=14 minecraft:flowing_water level=14 +143 minecraft:water level=15 minecraft:flowing_water level=15 +144 minecraft:water level=0 minecraft:water level=0 +145 minecraft:water level=1 minecraft:water level=1 +146 minecraft:water level=2 minecraft:water level=2 +147 minecraft:water level=3 minecraft:water level=3 +148 minecraft:water level=4 minecraft:water level=4 +149 minecraft:water level=5 minecraft:water level=5 +150 minecraft:water level=6 minecraft:water level=6 +151 minecraft:water level=7 minecraft:water level=7 +152 minecraft:water level=8 minecraft:water level=8 +153 minecraft:water level=9 minecraft:water level=9 +154 minecraft:water level=10 minecraft:water level=10 +155 minecraft:water level=11 minecraft:water level=11 +156 minecraft:water level=12 minecraft:water level=12 +157 minecraft:water level=13 minecraft:water level=13 +158 minecraft:water level=14 minecraft:water level=14 +159 minecraft:water level=15 minecraft:water level=15 +160 minecraft:lava level=0 minecraft:flowing_lava level=0 +161 minecraft:lava level=1 minecraft:flowing_lava level=1 +162 minecraft:lava level=2 minecraft:flowing_lava level=2 +163 minecraft:lava level=3 minecraft:flowing_lava level=3 +164 minecraft:lava level=4 minecraft:flowing_lava level=4 +165 minecraft:lava level=5 minecraft:flowing_lava level=5 +166 minecraft:lava level=6 minecraft:flowing_lava level=6 +167 minecraft:lava level=7 minecraft:flowing_lava level=7 +168 minecraft:lava level=8 minecraft:flowing_lava level=8 +169 minecraft:lava level=9 minecraft:flowing_lava level=9 +170 minecraft:lava level=10 minecraft:flowing_lava level=10 +171 minecraft:lava level=11 minecraft:flowing_lava level=11 +172 minecraft:lava level=12 minecraft:flowing_lava level=12 +173 minecraft:lava level=13 minecraft:flowing_lava level=13 +174 minecraft:lava level=14 minecraft:flowing_lava level=14 +175 minecraft:lava level=15 minecraft:flowing_lava level=15 +176 minecraft:lava level=0 minecraft:lava level=0 +177 minecraft:lava level=1 minecraft:lava level=1 +178 minecraft:lava level=2 minecraft:lava level=2 +179 minecraft:lava level=3 minecraft:lava level=3 +180 minecraft:lava level=4 minecraft:lava level=4 +181 minecraft:lava level=5 minecraft:lava level=5 +182 minecraft:lava level=6 minecraft:lava level=6 +183 minecraft:lava level=7 minecraft:lava level=7 +184 minecraft:lava level=8 minecraft:lava level=8 +185 minecraft:lava level=9 minecraft:lava level=9 +186 minecraft:lava level=10 minecraft:lava level=10 +187 minecraft:lava level=11 minecraft:lava level=11 +188 minecraft:lava level=12 minecraft:lava level=12 +189 minecraft:lava level=13 minecraft:lava level=13 +190 minecraft:lava level=14 minecraft:lava level=14 +191 minecraft:lava level=15 minecraft:lava level=15 +192 minecraft:sand minecraft:sand variant=sand +193 minecraft:red_sand minecraft:sand variant=red_sand +208 minecraft:gravel minecraft:gravel +224 minecraft:gold_ore minecraft:gold_ore +240 minecraft:iron_ore minecraft:iron_ore +256 minecraft:coal_ore minecraft:coal_ore +272 minecraft:oak_log axis=y minecraft:log axis=y;variant=oak +273 minecraft:spruce_log axis=y minecraft:log axis=y;variant=spruce +274 minecraft:birch_log axis=y minecraft:log axis=y;variant=birch +275 minecraft:jungle_log axis=y minecraft:log axis=y;variant=jungle +276 minecraft:oak_log axis=x minecraft:log axis=x;variant=oak +277 minecraft:spruce_log axis=x minecraft:log axis=x;variant=spruce +278 minecraft:birch_log axis=x minecraft:log axis=x;variant=birch +279 minecraft:jungle_log axis=x minecraft:log axis=x;variant=jungle +280 minecraft:oak_log axis=z minecraft:log axis=z;variant=oak +281 minecraft:spruce_log axis=z minecraft:log axis=z;variant=spruce +282 minecraft:birch_log axis=z minecraft:log axis=z;variant=birch +283 minecraft:jungle_log axis=z minecraft:log axis=z;variant=jungle +284 minecraft:oak_bark minecraft:log axis=none;variant=oak +285 minecraft:spruce_bark minecraft:log axis=none;variant=spruce +286 minecraft:birch_bark minecraft:log axis=none;variant=birch +287 minecraft:jungle_bark minecraft:log axis=none;variant=jungle +288 minecraft:oak_leaves check_decay=false;decayable=true minecraft:leaves check_decay=false;decayable=true;variant=oak +289 minecraft:spruce_leaves check_decay=false;decayable=true minecraft:leaves check_decay=false;decayable=true;variant=spruce +290 minecraft:birch_leaves check_decay=false;decayable=true minecraft:leaves check_decay=false;decayable=true;variant=birch +291 minecraft:jungle_leaves check_decay=false;decayable=true minecraft:leaves check_decay=false;decayable=true;variant=jungle +292 minecraft:oak_leaves check_decay=false;decayable=false minecraft:leaves check_decay=false;decayable=false;variant=oak +293 minecraft:spruce_leaves check_decay=false;decayable=false minecraft:leaves check_decay=false;decayable=false;variant=spruce +294 minecraft:birch_leaves check_decay=false;decayable=false minecraft:leaves check_decay=false;decayable=false;variant=birch +295 minecraft:jungle_leaves check_decay=false;decayable=false minecraft:leaves check_decay=false;decayable=false;variant=jungle +296 minecraft:oak_leaves check_decay=true;decayable=true minecraft:leaves check_decay=true;decayable=true;variant=oak +297 minecraft:spruce_leaves check_decay=true;decayable=true minecraft:leaves check_decay=true;decayable=true;variant=spruce +298 minecraft:birch_leaves check_decay=true;decayable=true minecraft:leaves check_decay=true;decayable=true;variant=birch +299 minecraft:jungle_leaves check_decay=true;decayable=true minecraft:leaves check_decay=true;decayable=true;variant=jungle +300 minecraft:oak_leaves check_decay=true;decayable=false minecraft:leaves check_decay=true;decayable=false;variant=oak +301 minecraft:spruce_leaves check_decay=true;decayable=false minecraft:leaves check_decay=true;decayable=false;variant=spruce +302 minecraft:birch_leaves check_decay=true;decayable=false minecraft:leaves check_decay=true;decayable=false;variant=birch +303 minecraft:jungle_leaves check_decay=true;decayable=false minecraft:leaves check_decay=true;decayable=false;variant=jungle +304 minecraft:sponge minecraft:sponge wet=false +305 minecraft:wet_sponge minecraft:sponge wet=true +320 minecraft:glass minecraft:glass +336 minecraft:lapis_ore minecraft:lapis_ore +352 minecraft:lapis_block minecraft:lapis_block +368 minecraft:dispenser facing=down;triggered=false minecraft:dispenser facing=down;triggered=false +369 minecraft:dispenser facing=up;triggered=false minecraft:dispenser facing=up;triggered=false +370 minecraft:dispenser facing=north;triggered=false minecraft:dispenser facing=north;triggered=false +371 minecraft:dispenser facing=south;triggered=false minecraft:dispenser facing=south;triggered=false +372 minecraft:dispenser facing=west;triggered=false minecraft:dispenser facing=west;triggered=false +373 minecraft:dispenser facing=east;triggered=false minecraft:dispenser facing=east;triggered=false +376 minecraft:dispenser facing=down;triggered=true minecraft:dispenser facing=down;triggered=true +377 minecraft:dispenser facing=up;triggered=true minecraft:dispenser facing=up;triggered=true +378 minecraft:dispenser facing=north;triggered=true minecraft:dispenser facing=north;triggered=true +379 minecraft:dispenser facing=south;triggered=true minecraft:dispenser facing=south;triggered=true +380 minecraft:dispenser facing=west;triggered=true minecraft:dispenser facing=west;triggered=true +381 minecraft:dispenser facing=east;triggered=true minecraft:dispenser facing=east;triggered=true +384 minecraft:sandstone minecraft:sandstone type=sandstone +385 minecraft:chiseled_sandstone minecraft:sandstone type=chiseled_sandstone +386 minecraft:cut_sandstone minecraft:sandstone type=smooth_sandstone +400 minecraft:note_block minecraft:noteblock +416 minecraft:red_bed facing=south;occupied=false;part=foot minecraft:bed facing=south;occupied=false;part=foot minecraft:bed facing=south;occupied=true;part=foot +417 minecraft:red_bed facing=west;occupied=false;part=foot minecraft:bed facing=west;occupied=false;part=foot minecraft:bed facing=west;occupied=true;part=foot +418 minecraft:red_bed facing=north;occupied=false;part=foot minecraft:bed facing=north;occupied=false;part=foot minecraft:bed facing=north;occupied=true;part=foot +419 minecraft:red_bed facing=east;occupied=false;part=foot minecraft:bed facing=east;occupied=false;part=foot minecraft:bed facing=east;occupied=true;part=foot +424 minecraft:red_bed facing=south;occupied=false;part=head minecraft:bed facing=south;occupied=false;part=head +425 minecraft:red_bed facing=west;occupied=false;part=head minecraft:bed facing=west;occupied=false;part=head +426 minecraft:red_bed facing=north;occupied=false;part=head minecraft:bed facing=north;occupied=false;part=head +427 minecraft:red_bed facing=east;occupied=false;part=head minecraft:bed facing=east;occupied=false;part=head +428 minecraft:red_bed facing=south;occupied=true;part=head minecraft:bed facing=south;occupied=true;part=head +429 minecraft:red_bed facing=west;occupied=true;part=head minecraft:bed facing=west;occupied=true;part=head +430 minecraft:red_bed facing=north;occupied=true;part=head minecraft:bed facing=north;occupied=true;part=head +431 minecraft:red_bed facing=east;occupied=true;part=head minecraft:bed facing=east;occupied=true;part=head +432 minecraft:powered_rail powered=false;shape=north_south minecraft:golden_rail powered=false;shape=north_south +433 minecraft:powered_rail powered=false;shape=east_west minecraft:golden_rail powered=false;shape=east_west +434 minecraft:powered_rail powered=false;shape=ascending_east minecraft:golden_rail powered=false;shape=ascending_east +435 minecraft:powered_rail powered=false;shape=ascending_west minecraft:golden_rail powered=false;shape=ascending_west +436 minecraft:powered_rail powered=false;shape=ascending_north minecraft:golden_rail powered=false;shape=ascending_north +437 minecraft:powered_rail powered=false;shape=ascending_south minecraft:golden_rail powered=false;shape=ascending_south +440 minecraft:powered_rail powered=true;shape=north_south minecraft:golden_rail powered=true;shape=north_south +441 minecraft:powered_rail powered=true;shape=east_west minecraft:golden_rail powered=true;shape=east_west +442 minecraft:powered_rail powered=true;shape=ascending_east minecraft:golden_rail powered=true;shape=ascending_east +443 minecraft:powered_rail powered=true;shape=ascending_west minecraft:golden_rail powered=true;shape=ascending_west +444 minecraft:powered_rail powered=true;shape=ascending_north minecraft:golden_rail powered=true;shape=ascending_north +445 minecraft:powered_rail powered=true;shape=ascending_south minecraft:golden_rail powered=true;shape=ascending_south +448 minecraft:detector_rail powered=false;shape=north_south minecraft:detector_rail powered=false;shape=north_south +449 minecraft:detector_rail powered=false;shape=east_west minecraft:detector_rail powered=false;shape=east_west +450 minecraft:detector_rail powered=false;shape=ascending_east minecraft:detector_rail powered=false;shape=ascending_east +451 minecraft:detector_rail powered=false;shape=ascending_west minecraft:detector_rail powered=false;shape=ascending_west +452 minecraft:detector_rail powered=false;shape=ascending_north minecraft:detector_rail powered=false;shape=ascending_north +453 minecraft:detector_rail powered=false;shape=ascending_south minecraft:detector_rail powered=false;shape=ascending_south +456 minecraft:detector_rail powered=true;shape=north_south minecraft:detector_rail powered=true;shape=north_south +457 minecraft:detector_rail powered=true;shape=east_west minecraft:detector_rail powered=true;shape=east_west +458 minecraft:detector_rail powered=true;shape=ascending_east minecraft:detector_rail powered=true;shape=ascending_east +459 minecraft:detector_rail powered=true;shape=ascending_west minecraft:detector_rail powered=true;shape=ascending_west +460 minecraft:detector_rail powered=true;shape=ascending_north minecraft:detector_rail powered=true;shape=ascending_north +461 minecraft:detector_rail powered=true;shape=ascending_south minecraft:detector_rail powered=true;shape=ascending_south +464 minecraft:sticky_piston extended=false;facing=down minecraft:sticky_piston extended=false;facing=down +465 minecraft:sticky_piston extended=false;facing=up minecraft:sticky_piston extended=false;facing=up +466 minecraft:sticky_piston extended=false;facing=north minecraft:sticky_piston extended=false;facing=north +467 minecraft:sticky_piston extended=false;facing=south minecraft:sticky_piston extended=false;facing=south +468 minecraft:sticky_piston extended=false;facing=west minecraft:sticky_piston extended=false;facing=west +469 minecraft:sticky_piston extended=false;facing=east minecraft:sticky_piston extended=false;facing=east +472 minecraft:sticky_piston extended=true;facing=down minecraft:sticky_piston extended=true;facing=down +473 minecraft:sticky_piston extended=true;facing=up minecraft:sticky_piston extended=true;facing=up +474 minecraft:sticky_piston extended=true;facing=north minecraft:sticky_piston extended=true;facing=north +475 minecraft:sticky_piston extended=true;facing=south minecraft:sticky_piston extended=true;facing=south +476 minecraft:sticky_piston extended=true;facing=west minecraft:sticky_piston extended=true;facing=west +477 minecraft:sticky_piston extended=true;facing=east minecraft:sticky_piston extended=true;facing=east +480 minecraft:cobweb minecraft:web +496 minecraft:dead_bush minecraft:tallgrass type=dead_bush +497 minecraft:grass minecraft:tallgrass type=tall_grass +498 minecraft:fern minecraft:tallgrass type=fern +512 minecraft:dead_bush minecraft:deadbush +528 minecraft:piston extended=false;facing=down minecraft:piston extended=false;facing=down +529 minecraft:piston extended=false;facing=up minecraft:piston extended=false;facing=up +530 minecraft:piston extended=false;facing=north minecraft:piston extended=false;facing=north +531 minecraft:piston extended=false;facing=south minecraft:piston extended=false;facing=south +532 minecraft:piston extended=false;facing=west minecraft:piston extended=false;facing=west +533 minecraft:piston extended=false;facing=east minecraft:piston extended=false;facing=east +536 minecraft:piston extended=true;facing=down minecraft:piston extended=true;facing=down +537 minecraft:piston extended=true;facing=up minecraft:piston extended=true;facing=up +538 minecraft:piston extended=true;facing=north minecraft:piston extended=true;facing=north +539 minecraft:piston extended=true;facing=south minecraft:piston extended=true;facing=south +540 minecraft:piston extended=true;facing=west minecraft:piston extended=true;facing=west +541 minecraft:piston extended=true;facing=east minecraft:piston extended=true;facing=east +544 minecraft:piston_head facing=down;short=false;type=normal minecraft:piston_head facing=down;short=false;type=normal minecraft:piston_head facing=down;short=true;type=normal +545 minecraft:piston_head facing=up;short=false;type=normal minecraft:piston_head facing=up;short=false;type=normal minecraft:piston_head facing=up;short=true;type=normal +546 minecraft:piston_head facing=north;short=false;type=normal minecraft:piston_head facing=north;short=false;type=normal minecraft:piston_head facing=north;short=true;type=normal +547 minecraft:piston_head facing=south;short=false;type=normal minecraft:piston_head facing=south;short=false;type=normal minecraft:piston_head facing=south;short=true;type=normal +548 minecraft:piston_head facing=west;short=false;type=normal minecraft:piston_head facing=west;short=false;type=normal minecraft:piston_head facing=west;short=true;type=normal +549 minecraft:piston_head facing=east;short=false;type=normal minecraft:piston_head facing=east;short=false;type=normal minecraft:piston_head facing=east;short=true;type=normal +552 minecraft:piston_head facing=down;short=false;type=sticky minecraft:piston_head facing=down;short=false;type=sticky minecraft:piston_head facing=down;short=true;type=sticky +553 minecraft:piston_head facing=up;short=false;type=sticky minecraft:piston_head facing=up;short=false;type=sticky minecraft:piston_head facing=up;short=true;type=sticky +554 minecraft:piston_head facing=north;short=false;type=sticky minecraft:piston_head facing=north;short=false;type=sticky minecraft:piston_head facing=north;short=true;type=sticky +555 minecraft:piston_head facing=south;short=false;type=sticky minecraft:piston_head facing=south;short=false;type=sticky minecraft:piston_head facing=south;short=true;type=sticky +556 minecraft:piston_head facing=west;short=false;type=sticky minecraft:piston_head facing=west;short=false;type=sticky minecraft:piston_head facing=west;short=true;type=sticky +557 minecraft:piston_head facing=east;short=false;type=sticky minecraft:piston_head facing=east;short=false;type=sticky minecraft:piston_head facing=east;short=true;type=sticky +560 minecraft:white_wool minecraft:wool color=white +561 minecraft:orange_wool minecraft:wool color=orange +562 minecraft:magenta_wool minecraft:wool color=magenta +563 minecraft:light_blue_wool minecraft:wool color=light_blue +564 minecraft:yellow_wool minecraft:wool color=yellow +565 minecraft:lime_wool minecraft:wool color=lime +566 minecraft:pink_wool minecraft:wool color=pink +567 minecraft:gray_wool minecraft:wool color=gray +568 minecraft:light_gray_wool minecraft:wool color=silver +569 minecraft:cyan_wool minecraft:wool color=cyan +570 minecraft:purple_wool minecraft:wool color=purple +571 minecraft:blue_wool minecraft:wool color=blue +572 minecraft:brown_wool minecraft:wool color=brown +573 minecraft:green_wool minecraft:wool color=green +574 minecraft:red_wool minecraft:wool color=red +575 minecraft:black_wool minecraft:wool color=black +576 minecraft:moving_piston facing=down;type=normal minecraft:piston_extension facing=down;type=normal +577 minecraft:moving_piston facing=up;type=normal minecraft:piston_extension facing=up;type=normal +578 minecraft:moving_piston facing=north;type=normal minecraft:piston_extension facing=north;type=normal +579 minecraft:moving_piston facing=south;type=normal minecraft:piston_extension facing=south;type=normal +580 minecraft:moving_piston facing=west;type=normal minecraft:piston_extension facing=west;type=normal +581 minecraft:moving_piston facing=east;type=normal minecraft:piston_extension facing=east;type=normal +584 minecraft:moving_piston facing=down;type=sticky minecraft:piston_extension facing=down;type=sticky +585 minecraft:moving_piston facing=up;type=sticky minecraft:piston_extension facing=up;type=sticky +586 minecraft:moving_piston facing=north;type=sticky minecraft:piston_extension facing=north;type=sticky +587 minecraft:moving_piston facing=south;type=sticky minecraft:piston_extension facing=south;type=sticky +588 minecraft:moving_piston facing=west;type=sticky minecraft:piston_extension facing=west;type=sticky +589 minecraft:moving_piston facing=east;type=sticky minecraft:piston_extension facing=east;type=sticky +592 minecraft:dandelion minecraft:yellow_flower type=dandelion +608 minecraft:poppy minecraft:red_flower type=poppy +609 minecraft:blue_orchid minecraft:red_flower type=blue_orchid +610 minecraft:allium minecraft:red_flower type=allium +611 minecraft:azure_bluet minecraft:red_flower type=houstonia +612 minecraft:red_tulip minecraft:red_flower type=red_tulip +613 minecraft:orange_tulip minecraft:red_flower type=orange_tulip +614 minecraft:white_tulip minecraft:red_flower type=white_tulip +615 minecraft:pink_tulip minecraft:red_flower type=pink_tulip +616 minecraft:oxeye_daisy minecraft:red_flower type=oxeye_daisy +624 minecraft:brown_mushroom minecraft:brown_mushroom +640 minecraft:red_mushroom minecraft:red_mushroom +656 minecraft:gold_block minecraft:gold_block +672 minecraft:iron_block minecraft:iron_block +688 minecraft:stone_slab type=double minecraft:double_stone_slab seamless=false;variant=stone +689 minecraft:sandstone_slab type=double minecraft:double_stone_slab seamless=false;variant=sandstone +690 minecraft:petrified_oak_slab type=double minecraft:double_stone_slab seamless=false;variant=wood_old +691 minecraft:cobblestone_slab type=double minecraft:double_stone_slab seamless=false;variant=cobblestone +692 minecraft:brick_slab type=double minecraft:double_stone_slab seamless=false;variant=brick +693 minecraft:stone_brick_slab type=double minecraft:double_stone_slab seamless=false;variant=stone_brick +694 minecraft:nether_brick_slab type=double minecraft:double_stone_slab seamless=false;variant=nether_brick +695 minecraft:quartz_slab type=double minecraft:double_stone_slab seamless=false;variant=quartz +696 minecraft:smooth_stone minecraft:double_stone_slab seamless=true;variant=stone +697 minecraft:smooth_sandstone minecraft:double_stone_slab seamless=true;variant=sandstone +698 minecraft:petrified_oak_slab type=double minecraft:double_stone_slab seamless=true;variant=wood_old +699 minecraft:cobblestone_slab type=double minecraft:double_stone_slab seamless=true;variant=cobblestone +700 minecraft:brick_slab type=double minecraft:double_stone_slab seamless=true;variant=brick +701 minecraft:stone_brick_slab type=double minecraft:double_stone_slab seamless=true;variant=stone_brick +702 minecraft:nether_brick_slab type=double minecraft:double_stone_slab seamless=true;variant=nether_brick +703 minecraft:smooth_quartz minecraft:double_stone_slab seamless=true;variant=quartz +704 minecraft:stone_slab type=bottom minecraft:stone_slab half=bottom;variant=stone +705 minecraft:sandstone_slab type=bottom minecraft:stone_slab half=bottom;variant=sandstone +706 minecraft:petrified_oak_slab type=bottom minecraft:stone_slab half=bottom;variant=wood_old +707 minecraft:cobblestone_slab type=bottom minecraft:stone_slab half=bottom;variant=cobblestone +708 minecraft:brick_slab type=bottom minecraft:stone_slab half=bottom;variant=brick +709 minecraft:stone_brick_slab type=bottom minecraft:stone_slab half=bottom;variant=stone_brick +710 minecraft:nether_brick_slab type=bottom minecraft:stone_slab half=bottom;variant=nether_brick +711 minecraft:quartz_slab type=bottom minecraft:stone_slab half=bottom;variant=quartz +712 minecraft:stone_slab type=top minecraft:stone_slab half=top;variant=stone +713 minecraft:sandstone_slab type=top minecraft:stone_slab half=top;variant=sandstone +714 minecraft:petrified_oak_slab type=top minecraft:stone_slab half=top;variant=wood_old +715 minecraft:cobblestone_slab type=top minecraft:stone_slab half=top;variant=cobblestone +716 minecraft:brick_slab type=top minecraft:stone_slab half=top;variant=brick +717 minecraft:stone_brick_slab type=top minecraft:stone_slab half=top;variant=stone_brick +718 minecraft:nether_brick_slab type=top minecraft:stone_slab half=top;variant=nether_brick +719 minecraft:quartz_slab type=top minecraft:stone_slab half=top;variant=quartz +720 minecraft:bricks minecraft:brick_block +736 minecraft:tnt unstable=false minecraft:tnt explode=false +737 minecraft:tnt unstable=true minecraft:tnt explode=true +752 minecraft:bookshelf minecraft:bookshelf +768 minecraft:mossy_cobblestone minecraft:mossy_cobblestone +784 minecraft:obsidian minecraft:obsidian +801 minecraft:wall_torch facing=east minecraft:torch facing=east +802 minecraft:wall_torch facing=west minecraft:torch facing=west +803 minecraft:wall_torch facing=south minecraft:torch facing=south +804 minecraft:wall_torch facing=north minecraft:torch facing=north +805 minecraft:torch minecraft:torch facing=up +816 minecraft:fire age=0;east=false;north=false;south=false;up=false;west=false minecraft:fire age=0;east=false;north=false;south=false;up=false;west=false minecraft:fire age=0;east=false;north=false;south=false;up=false;west=true minecraft:fire age=0;east=false;north=false;south=false;up=true;west=false minecraft:fire age=0;east=false;north=false;south=false;up=true;west=true minecraft:fire age=0;east=false;north=false;south=true;up=false;west=false minecraft:fire age=0;east=false;north=false;south=true;up=false;west=true minecraft:fire age=0;east=false;north=false;south=true;up=true;west=false minecraft:fire age=0;east=false;north=false;south=true;up=true;west=true minecraft:fire age=0;east=false;north=true;south=false;up=false;west=false minecraft:fire age=0;east=false;north=true;south=false;up=false;west=true minecraft:fire age=0;east=false;north=true;south=false;up=true;west=false minecraft:fire age=0;east=false;north=true;south=false;up=true;west=true minecraft:fire age=0;east=false;north=true;south=true;up=false;west=false minecraft:fire age=0;east=false;north=true;south=true;up=false;west=true minecraft:fire age=0;east=false;north=true;south=true;up=true;west=false minecraft:fire age=0;east=false;north=true;south=true;up=true;west=true minecraft:fire age=0;east=true;north=false;south=false;up=false;west=false minecraft:fire age=0;east=true;north=false;south=false;up=false;west=true minecraft:fire age=0;east=true;north=false;south=false;up=true;west=false minecraft:fire age=0;east=true;north=false;south=false;up=true;west=true minecraft:fire age=0;east=true;north=false;south=true;up=false;west=false minecraft:fire age=0;east=true;north=false;south=true;up=false;west=true minecraft:fire age=0;east=true;north=false;south=true;up=true;west=false minecraft:fire age=0;east=true;north=false;south=true;up=true;west=true minecraft:fire age=0;east=true;north=true;south=false;up=false;west=false minecraft:fire age=0;east=true;north=true;south=false;up=false;west=true minecraft:fire age=0;east=true;north=true;south=false;up=true;west=false minecraft:fire age=0;east=true;north=true;south=false;up=true;west=true minecraft:fire age=0;east=true;north=true;south=true;up=false;west=false minecraft:fire age=0;east=true;north=true;south=true;up=false;west=true minecraft:fire age=0;east=true;north=true;south=true;up=true;west=false minecraft:fire age=0;east=true;north=true;south=true;up=true;west=true +817 minecraft:fire age=1;east=false;north=false;south=false;up=false;west=false minecraft:fire age=1;east=false;north=false;south=false;up=false;west=false minecraft:fire age=1;east=false;north=false;south=false;up=false;west=true minecraft:fire age=1;east=false;north=false;south=false;up=true;west=false minecraft:fire age=1;east=false;north=false;south=false;up=true;west=true minecraft:fire age=1;east=false;north=false;south=true;up=false;west=false minecraft:fire age=1;east=false;north=false;south=true;up=false;west=true minecraft:fire age=1;east=false;north=false;south=true;up=true;west=false minecraft:fire age=1;east=false;north=false;south=true;up=true;west=true minecraft:fire age=1;east=false;north=true;south=false;up=false;west=false minecraft:fire age=1;east=false;north=true;south=false;up=false;west=true minecraft:fire age=1;east=false;north=true;south=false;up=true;west=false minecraft:fire age=1;east=false;north=true;south=false;up=true;west=true minecraft:fire age=1;east=false;north=true;south=true;up=false;west=false minecraft:fire age=1;east=false;north=true;south=true;up=false;west=true minecraft:fire age=1;east=false;north=true;south=true;up=true;west=false minecraft:fire age=1;east=false;north=true;south=true;up=true;west=true minecraft:fire age=1;east=true;north=false;south=false;up=false;west=false minecraft:fire age=1;east=true;north=false;south=false;up=false;west=true minecraft:fire age=1;east=true;north=false;south=false;up=true;west=false minecraft:fire age=1;east=true;north=false;south=false;up=true;west=true minecraft:fire age=1;east=true;north=false;south=true;up=false;west=false minecraft:fire age=1;east=true;north=false;south=true;up=false;west=true minecraft:fire age=1;east=true;north=false;south=true;up=true;west=false minecraft:fire age=1;east=true;north=false;south=true;up=true;west=true minecraft:fire age=1;east=true;north=true;south=false;up=false;west=false minecraft:fire age=1;east=true;north=true;south=false;up=false;west=true minecraft:fire age=1;east=true;north=true;south=false;up=true;west=false minecraft:fire age=1;east=true;north=true;south=false;up=true;west=true minecraft:fire age=1;east=true;north=true;south=true;up=false;west=false minecraft:fire age=1;east=true;north=true;south=true;up=false;west=true minecraft:fire age=1;east=true;north=true;south=true;up=true;west=false minecraft:fire age=1;east=true;north=true;south=true;up=true;west=true +818 minecraft:fire age=2;east=false;north=false;south=false;up=false;west=false minecraft:fire age=2;east=false;north=false;south=false;up=false;west=false minecraft:fire age=2;east=false;north=false;south=false;up=false;west=true minecraft:fire age=2;east=false;north=false;south=false;up=true;west=false minecraft:fire age=2;east=false;north=false;south=false;up=true;west=true minecraft:fire age=2;east=false;north=false;south=true;up=false;west=false minecraft:fire age=2;east=false;north=false;south=true;up=false;west=true minecraft:fire age=2;east=false;north=false;south=true;up=true;west=false minecraft:fire age=2;east=false;north=false;south=true;up=true;west=true minecraft:fire age=2;east=false;north=true;south=false;up=false;west=false minecraft:fire age=2;east=false;north=true;south=false;up=false;west=true minecraft:fire age=2;east=false;north=true;south=false;up=true;west=false minecraft:fire age=2;east=false;north=true;south=false;up=true;west=true minecraft:fire age=2;east=false;north=true;south=true;up=false;west=false minecraft:fire age=2;east=false;north=true;south=true;up=false;west=true minecraft:fire age=2;east=false;north=true;south=true;up=true;west=false minecraft:fire age=2;east=false;north=true;south=true;up=true;west=true minecraft:fire age=2;east=true;north=false;south=false;up=false;west=false minecraft:fire age=2;east=true;north=false;south=false;up=false;west=true minecraft:fire age=2;east=true;north=false;south=false;up=true;west=false minecraft:fire age=2;east=true;north=false;south=false;up=true;west=true minecraft:fire age=2;east=true;north=false;south=true;up=false;west=false minecraft:fire age=2;east=true;north=false;south=true;up=false;west=true minecraft:fire age=2;east=true;north=false;south=true;up=true;west=false minecraft:fire age=2;east=true;north=false;south=true;up=true;west=true minecraft:fire age=2;east=true;north=true;south=false;up=false;west=false minecraft:fire age=2;east=true;north=true;south=false;up=false;west=true minecraft:fire age=2;east=true;north=true;south=false;up=true;west=false minecraft:fire age=2;east=true;north=true;south=false;up=true;west=true minecraft:fire age=2;east=true;north=true;south=true;up=false;west=false minecraft:fire age=2;east=true;north=true;south=true;up=false;west=true minecraft:fire age=2;east=true;north=true;south=true;up=true;west=false minecraft:fire age=2;east=true;north=true;south=true;up=true;west=true +819 minecraft:fire age=3;east=false;north=false;south=false;up=false;west=false minecraft:fire age=3;east=false;north=false;south=false;up=false;west=false minecraft:fire age=3;east=false;north=false;south=false;up=false;west=true minecraft:fire age=3;east=false;north=false;south=false;up=true;west=false minecraft:fire age=3;east=false;north=false;south=false;up=true;west=true minecraft:fire age=3;east=false;north=false;south=true;up=false;west=false minecraft:fire age=3;east=false;north=false;south=true;up=false;west=true minecraft:fire age=3;east=false;north=false;south=true;up=true;west=false minecraft:fire age=3;east=false;north=false;south=true;up=true;west=true minecraft:fire age=3;east=false;north=true;south=false;up=false;west=false minecraft:fire age=3;east=false;north=true;south=false;up=false;west=true minecraft:fire age=3;east=false;north=true;south=false;up=true;west=false minecraft:fire age=3;east=false;north=true;south=false;up=true;west=true minecraft:fire age=3;east=false;north=true;south=true;up=false;west=false minecraft:fire age=3;east=false;north=true;south=true;up=false;west=true minecraft:fire age=3;east=false;north=true;south=true;up=true;west=false minecraft:fire age=3;east=false;north=true;south=true;up=true;west=true minecraft:fire age=3;east=true;north=false;south=false;up=false;west=false minecraft:fire age=3;east=true;north=false;south=false;up=false;west=true minecraft:fire age=3;east=true;north=false;south=false;up=true;west=false minecraft:fire age=3;east=true;north=false;south=false;up=true;west=true minecraft:fire age=3;east=true;north=false;south=true;up=false;west=false minecraft:fire age=3;east=true;north=false;south=true;up=false;west=true minecraft:fire age=3;east=true;north=false;south=true;up=true;west=false minecraft:fire age=3;east=true;north=false;south=true;up=true;west=true minecraft:fire age=3;east=true;north=true;south=false;up=false;west=false minecraft:fire age=3;east=true;north=true;south=false;up=false;west=true minecraft:fire age=3;east=true;north=true;south=false;up=true;west=false minecraft:fire age=3;east=true;north=true;south=false;up=true;west=true minecraft:fire age=3;east=true;north=true;south=true;up=false;west=false minecraft:fire age=3;east=true;north=true;south=true;up=false;west=true minecraft:fire age=3;east=true;north=true;south=true;up=true;west=false minecraft:fire age=3;east=true;north=true;south=true;up=true;west=true +820 minecraft:fire age=4;east=false;north=false;south=false;up=false;west=false minecraft:fire age=4;east=false;north=false;south=false;up=false;west=false minecraft:fire age=4;east=false;north=false;south=false;up=false;west=true minecraft:fire age=4;east=false;north=false;south=false;up=true;west=false minecraft:fire age=4;east=false;north=false;south=false;up=true;west=true minecraft:fire age=4;east=false;north=false;south=true;up=false;west=false minecraft:fire age=4;east=false;north=false;south=true;up=false;west=true minecraft:fire age=4;east=false;north=false;south=true;up=true;west=false minecraft:fire age=4;east=false;north=false;south=true;up=true;west=true minecraft:fire age=4;east=false;north=true;south=false;up=false;west=false minecraft:fire age=4;east=false;north=true;south=false;up=false;west=true minecraft:fire age=4;east=false;north=true;south=false;up=true;west=false minecraft:fire age=4;east=false;north=true;south=false;up=true;west=true minecraft:fire age=4;east=false;north=true;south=true;up=false;west=false minecraft:fire age=4;east=false;north=true;south=true;up=false;west=true minecraft:fire age=4;east=false;north=true;south=true;up=true;west=false minecraft:fire age=4;east=false;north=true;south=true;up=true;west=true minecraft:fire age=4;east=true;north=false;south=false;up=false;west=false minecraft:fire age=4;east=true;north=false;south=false;up=false;west=true minecraft:fire age=4;east=true;north=false;south=false;up=true;west=false minecraft:fire age=4;east=true;north=false;south=false;up=true;west=true minecraft:fire age=4;east=true;north=false;south=true;up=false;west=false minecraft:fire age=4;east=true;north=false;south=true;up=false;west=true minecraft:fire age=4;east=true;north=false;south=true;up=true;west=false minecraft:fire age=4;east=true;north=false;south=true;up=true;west=true minecraft:fire age=4;east=true;north=true;south=false;up=false;west=false minecraft:fire age=4;east=true;north=true;south=false;up=false;west=true minecraft:fire age=4;east=true;north=true;south=false;up=true;west=false minecraft:fire age=4;east=true;north=true;south=false;up=true;west=true minecraft:fire age=4;east=true;north=true;south=true;up=false;west=false minecraft:fire age=4;east=true;north=true;south=true;up=false;west=true minecraft:fire age=4;east=true;north=true;south=true;up=true;west=false minecraft:fire age=4;east=true;north=true;south=true;up=true;west=true +821 minecraft:fire age=5;east=false;north=false;south=false;up=false;west=false minecraft:fire age=5;east=false;north=false;south=false;up=false;west=false minecraft:fire age=5;east=false;north=false;south=false;up=false;west=true minecraft:fire age=5;east=false;north=false;south=false;up=true;west=false minecraft:fire age=5;east=false;north=false;south=false;up=true;west=true minecraft:fire age=5;east=false;north=false;south=true;up=false;west=false minecraft:fire age=5;east=false;north=false;south=true;up=false;west=true minecraft:fire age=5;east=false;north=false;south=true;up=true;west=false minecraft:fire age=5;east=false;north=false;south=true;up=true;west=true minecraft:fire age=5;east=false;north=true;south=false;up=false;west=false minecraft:fire age=5;east=false;north=true;south=false;up=false;west=true minecraft:fire age=5;east=false;north=true;south=false;up=true;west=false minecraft:fire age=5;east=false;north=true;south=false;up=true;west=true minecraft:fire age=5;east=false;north=true;south=true;up=false;west=false minecraft:fire age=5;east=false;north=true;south=true;up=false;west=true minecraft:fire age=5;east=false;north=true;south=true;up=true;west=false minecraft:fire age=5;east=false;north=true;south=true;up=true;west=true minecraft:fire age=5;east=true;north=false;south=false;up=false;west=false minecraft:fire age=5;east=true;north=false;south=false;up=false;west=true minecraft:fire age=5;east=true;north=false;south=false;up=true;west=false minecraft:fire age=5;east=true;north=false;south=false;up=true;west=true minecraft:fire age=5;east=true;north=false;south=true;up=false;west=false minecraft:fire age=5;east=true;north=false;south=true;up=false;west=true minecraft:fire age=5;east=true;north=false;south=true;up=true;west=false minecraft:fire age=5;east=true;north=false;south=true;up=true;west=true minecraft:fire age=5;east=true;north=true;south=false;up=false;west=false minecraft:fire age=5;east=true;north=true;south=false;up=false;west=true minecraft:fire age=5;east=true;north=true;south=false;up=true;west=false minecraft:fire age=5;east=true;north=true;south=false;up=true;west=true minecraft:fire age=5;east=true;north=true;south=true;up=false;west=false minecraft:fire age=5;east=true;north=true;south=true;up=false;west=true minecraft:fire age=5;east=true;north=true;south=true;up=true;west=false minecraft:fire age=5;east=true;north=true;south=true;up=true;west=true +822 minecraft:fire age=6;east=false;north=false;south=false;up=false;west=false minecraft:fire age=6;east=false;north=false;south=false;up=false;west=false minecraft:fire age=6;east=false;north=false;south=false;up=false;west=true minecraft:fire age=6;east=false;north=false;south=false;up=true;west=false minecraft:fire age=6;east=false;north=false;south=false;up=true;west=true minecraft:fire age=6;east=false;north=false;south=true;up=false;west=false minecraft:fire age=6;east=false;north=false;south=true;up=false;west=true minecraft:fire age=6;east=false;north=false;south=true;up=true;west=false minecraft:fire age=6;east=false;north=false;south=true;up=true;west=true minecraft:fire age=6;east=false;north=true;south=false;up=false;west=false minecraft:fire age=6;east=false;north=true;south=false;up=false;west=true minecraft:fire age=6;east=false;north=true;south=false;up=true;west=false minecraft:fire age=6;east=false;north=true;south=false;up=true;west=true minecraft:fire age=6;east=false;north=true;south=true;up=false;west=false minecraft:fire age=6;east=false;north=true;south=true;up=false;west=true minecraft:fire age=6;east=false;north=true;south=true;up=true;west=false minecraft:fire age=6;east=false;north=true;south=true;up=true;west=true minecraft:fire age=6;east=true;north=false;south=false;up=false;west=false minecraft:fire age=6;east=true;north=false;south=false;up=false;west=true minecraft:fire age=6;east=true;north=false;south=false;up=true;west=false minecraft:fire age=6;east=true;north=false;south=false;up=true;west=true minecraft:fire age=6;east=true;north=false;south=true;up=false;west=false minecraft:fire age=6;east=true;north=false;south=true;up=false;west=true minecraft:fire age=6;east=true;north=false;south=true;up=true;west=false minecraft:fire age=6;east=true;north=false;south=true;up=true;west=true minecraft:fire age=6;east=true;north=true;south=false;up=false;west=false minecraft:fire age=6;east=true;north=true;south=false;up=false;west=true minecraft:fire age=6;east=true;north=true;south=false;up=true;west=false minecraft:fire age=6;east=true;north=true;south=false;up=true;west=true minecraft:fire age=6;east=true;north=true;south=true;up=false;west=false minecraft:fire age=6;east=true;north=true;south=true;up=false;west=true minecraft:fire age=6;east=true;north=true;south=true;up=true;west=false minecraft:fire age=6;east=true;north=true;south=true;up=true;west=true +823 minecraft:fire age=7;east=false;north=false;south=false;up=false;west=false minecraft:fire age=7;east=false;north=false;south=false;up=false;west=false minecraft:fire age=7;east=false;north=false;south=false;up=false;west=true minecraft:fire age=7;east=false;north=false;south=false;up=true;west=false minecraft:fire age=7;east=false;north=false;south=false;up=true;west=true minecraft:fire age=7;east=false;north=false;south=true;up=false;west=false minecraft:fire age=7;east=false;north=false;south=true;up=false;west=true minecraft:fire age=7;east=false;north=false;south=true;up=true;west=false minecraft:fire age=7;east=false;north=false;south=true;up=true;west=true minecraft:fire age=7;east=false;north=true;south=false;up=false;west=false minecraft:fire age=7;east=false;north=true;south=false;up=false;west=true minecraft:fire age=7;east=false;north=true;south=false;up=true;west=false minecraft:fire age=7;east=false;north=true;south=false;up=true;west=true minecraft:fire age=7;east=false;north=true;south=true;up=false;west=false minecraft:fire age=7;east=false;north=true;south=true;up=false;west=true minecraft:fire age=7;east=false;north=true;south=true;up=true;west=false minecraft:fire age=7;east=false;north=true;south=true;up=true;west=true minecraft:fire age=7;east=true;north=false;south=false;up=false;west=false minecraft:fire age=7;east=true;north=false;south=false;up=false;west=true minecraft:fire age=7;east=true;north=false;south=false;up=true;west=false minecraft:fire age=7;east=true;north=false;south=false;up=true;west=true minecraft:fire age=7;east=true;north=false;south=true;up=false;west=false minecraft:fire age=7;east=true;north=false;south=true;up=false;west=true minecraft:fire age=7;east=true;north=false;south=true;up=true;west=false minecraft:fire age=7;east=true;north=false;south=true;up=true;west=true minecraft:fire age=7;east=true;north=true;south=false;up=false;west=false minecraft:fire age=7;east=true;north=true;south=false;up=false;west=true minecraft:fire age=7;east=true;north=true;south=false;up=true;west=false minecraft:fire age=7;east=true;north=true;south=false;up=true;west=true minecraft:fire age=7;east=true;north=true;south=true;up=false;west=false minecraft:fire age=7;east=true;north=true;south=true;up=false;west=true minecraft:fire age=7;east=true;north=true;south=true;up=true;west=false minecraft:fire age=7;east=true;north=true;south=true;up=true;west=true +824 minecraft:fire age=8;east=false;north=false;south=false;up=false;west=false minecraft:fire age=8;east=false;north=false;south=false;up=false;west=false minecraft:fire age=8;east=false;north=false;south=false;up=false;west=true minecraft:fire age=8;east=false;north=false;south=false;up=true;west=false minecraft:fire age=8;east=false;north=false;south=false;up=true;west=true minecraft:fire age=8;east=false;north=false;south=true;up=false;west=false minecraft:fire age=8;east=false;north=false;south=true;up=false;west=true minecraft:fire age=8;east=false;north=false;south=true;up=true;west=false minecraft:fire age=8;east=false;north=false;south=true;up=true;west=true minecraft:fire age=8;east=false;north=true;south=false;up=false;west=false minecraft:fire age=8;east=false;north=true;south=false;up=false;west=true minecraft:fire age=8;east=false;north=true;south=false;up=true;west=false minecraft:fire age=8;east=false;north=true;south=false;up=true;west=true minecraft:fire age=8;east=false;north=true;south=true;up=false;west=false minecraft:fire age=8;east=false;north=true;south=true;up=false;west=true minecraft:fire age=8;east=false;north=true;south=true;up=true;west=false minecraft:fire age=8;east=false;north=true;south=true;up=true;west=true minecraft:fire age=8;east=true;north=false;south=false;up=false;west=false minecraft:fire age=8;east=true;north=false;south=false;up=false;west=true minecraft:fire age=8;east=true;north=false;south=false;up=true;west=false minecraft:fire age=8;east=true;north=false;south=false;up=true;west=true minecraft:fire age=8;east=true;north=false;south=true;up=false;west=false minecraft:fire age=8;east=true;north=false;south=true;up=false;west=true minecraft:fire age=8;east=true;north=false;south=true;up=true;west=false minecraft:fire age=8;east=true;north=false;south=true;up=true;west=true minecraft:fire age=8;east=true;north=true;south=false;up=false;west=false minecraft:fire age=8;east=true;north=true;south=false;up=false;west=true minecraft:fire age=8;east=true;north=true;south=false;up=true;west=false minecraft:fire age=8;east=true;north=true;south=false;up=true;west=true minecraft:fire age=8;east=true;north=true;south=true;up=false;west=false minecraft:fire age=8;east=true;north=true;south=true;up=false;west=true minecraft:fire age=8;east=true;north=true;south=true;up=true;west=false minecraft:fire age=8;east=true;north=true;south=true;up=true;west=true +825 minecraft:fire age=9;east=false;north=false;south=false;up=false;west=false minecraft:fire age=9;east=false;north=false;south=false;up=false;west=false minecraft:fire age=9;east=false;north=false;south=false;up=false;west=true minecraft:fire age=9;east=false;north=false;south=false;up=true;west=false minecraft:fire age=9;east=false;north=false;south=false;up=true;west=true minecraft:fire age=9;east=false;north=false;south=true;up=false;west=false minecraft:fire age=9;east=false;north=false;south=true;up=false;west=true minecraft:fire age=9;east=false;north=false;south=true;up=true;west=false minecraft:fire age=9;east=false;north=false;south=true;up=true;west=true minecraft:fire age=9;east=false;north=true;south=false;up=false;west=false minecraft:fire age=9;east=false;north=true;south=false;up=false;west=true minecraft:fire age=9;east=false;north=true;south=false;up=true;west=false minecraft:fire age=9;east=false;north=true;south=false;up=true;west=true minecraft:fire age=9;east=false;north=true;south=true;up=false;west=false minecraft:fire age=9;east=false;north=true;south=true;up=false;west=true minecraft:fire age=9;east=false;north=true;south=true;up=true;west=false minecraft:fire age=9;east=false;north=true;south=true;up=true;west=true minecraft:fire age=9;east=true;north=false;south=false;up=false;west=false minecraft:fire age=9;east=true;north=false;south=false;up=false;west=true minecraft:fire age=9;east=true;north=false;south=false;up=true;west=false minecraft:fire age=9;east=true;north=false;south=false;up=true;west=true minecraft:fire age=9;east=true;north=false;south=true;up=false;west=false minecraft:fire age=9;east=true;north=false;south=true;up=false;west=true minecraft:fire age=9;east=true;north=false;south=true;up=true;west=false minecraft:fire age=9;east=true;north=false;south=true;up=true;west=true minecraft:fire age=9;east=true;north=true;south=false;up=false;west=false minecraft:fire age=9;east=true;north=true;south=false;up=false;west=true minecraft:fire age=9;east=true;north=true;south=false;up=true;west=false minecraft:fire age=9;east=true;north=true;south=false;up=true;west=true minecraft:fire age=9;east=true;north=true;south=true;up=false;west=false minecraft:fire age=9;east=true;north=true;south=true;up=false;west=true minecraft:fire age=9;east=true;north=true;south=true;up=true;west=false minecraft:fire age=9;east=true;north=true;south=true;up=true;west=true +826 minecraft:fire age=10;east=false;north=false;south=false;up=false;west=false minecraft:fire age=10;east=false;north=false;south=false;up=false;west=false minecraft:fire age=10;east=false;north=false;south=false;up=false;west=true minecraft:fire age=10;east=false;north=false;south=false;up=true;west=false minecraft:fire age=10;east=false;north=false;south=false;up=true;west=true minecraft:fire age=10;east=false;north=false;south=true;up=false;west=false minecraft:fire age=10;east=false;north=false;south=true;up=false;west=true minecraft:fire age=10;east=false;north=false;south=true;up=true;west=false minecraft:fire age=10;east=false;north=false;south=true;up=true;west=true minecraft:fire age=10;east=false;north=true;south=false;up=false;west=false minecraft:fire age=10;east=false;north=true;south=false;up=false;west=true minecraft:fire age=10;east=false;north=true;south=false;up=true;west=false minecraft:fire age=10;east=false;north=true;south=false;up=true;west=true minecraft:fire age=10;east=false;north=true;south=true;up=false;west=false minecraft:fire age=10;east=false;north=true;south=true;up=false;west=true minecraft:fire age=10;east=false;north=true;south=true;up=true;west=false minecraft:fire age=10;east=false;north=true;south=true;up=true;west=true minecraft:fire age=10;east=true;north=false;south=false;up=false;west=false minecraft:fire age=10;east=true;north=false;south=false;up=false;west=true minecraft:fire age=10;east=true;north=false;south=false;up=true;west=false minecraft:fire age=10;east=true;north=false;south=false;up=true;west=true minecraft:fire age=10;east=true;north=false;south=true;up=false;west=false minecraft:fire age=10;east=true;north=false;south=true;up=false;west=true minecraft:fire age=10;east=true;north=false;south=true;up=true;west=false minecraft:fire age=10;east=true;north=false;south=true;up=true;west=true minecraft:fire age=10;east=true;north=true;south=false;up=false;west=false minecraft:fire age=10;east=true;north=true;south=false;up=false;west=true minecraft:fire age=10;east=true;north=true;south=false;up=true;west=false minecraft:fire age=10;east=true;north=true;south=false;up=true;west=true minecraft:fire age=10;east=true;north=true;south=true;up=false;west=false minecraft:fire age=10;east=true;north=true;south=true;up=false;west=true minecraft:fire age=10;east=true;north=true;south=true;up=true;west=false minecraft:fire age=10;east=true;north=true;south=true;up=true;west=true +827 minecraft:fire age=11;east=false;north=false;south=false;up=false;west=false minecraft:fire age=11;east=false;north=false;south=false;up=false;west=false minecraft:fire age=11;east=false;north=false;south=false;up=false;west=true minecraft:fire age=11;east=false;north=false;south=false;up=true;west=false minecraft:fire age=11;east=false;north=false;south=false;up=true;west=true minecraft:fire age=11;east=false;north=false;south=true;up=false;west=false minecraft:fire age=11;east=false;north=false;south=true;up=false;west=true minecraft:fire age=11;east=false;north=false;south=true;up=true;west=false minecraft:fire age=11;east=false;north=false;south=true;up=true;west=true minecraft:fire age=11;east=false;north=true;south=false;up=false;west=false minecraft:fire age=11;east=false;north=true;south=false;up=false;west=true minecraft:fire age=11;east=false;north=true;south=false;up=true;west=false minecraft:fire age=11;east=false;north=true;south=false;up=true;west=true minecraft:fire age=11;east=false;north=true;south=true;up=false;west=false minecraft:fire age=11;east=false;north=true;south=true;up=false;west=true minecraft:fire age=11;east=false;north=true;south=true;up=true;west=false minecraft:fire age=11;east=false;north=true;south=true;up=true;west=true minecraft:fire age=11;east=true;north=false;south=false;up=false;west=false minecraft:fire age=11;east=true;north=false;south=false;up=false;west=true minecraft:fire age=11;east=true;north=false;south=false;up=true;west=false minecraft:fire age=11;east=true;north=false;south=false;up=true;west=true minecraft:fire age=11;east=true;north=false;south=true;up=false;west=false minecraft:fire age=11;east=true;north=false;south=true;up=false;west=true minecraft:fire age=11;east=true;north=false;south=true;up=true;west=false minecraft:fire age=11;east=true;north=false;south=true;up=true;west=true minecraft:fire age=11;east=true;north=true;south=false;up=false;west=false minecraft:fire age=11;east=true;north=true;south=false;up=false;west=true minecraft:fire age=11;east=true;north=true;south=false;up=true;west=false minecraft:fire age=11;east=true;north=true;south=false;up=true;west=true minecraft:fire age=11;east=true;north=true;south=true;up=false;west=false minecraft:fire age=11;east=true;north=true;south=true;up=false;west=true minecraft:fire age=11;east=true;north=true;south=true;up=true;west=false minecraft:fire age=11;east=true;north=true;south=true;up=true;west=true +828 minecraft:fire age=12;east=false;north=false;south=false;up=false;west=false minecraft:fire age=12;east=false;north=false;south=false;up=false;west=false minecraft:fire age=12;east=false;north=false;south=false;up=false;west=true minecraft:fire age=12;east=false;north=false;south=false;up=true;west=false minecraft:fire age=12;east=false;north=false;south=false;up=true;west=true minecraft:fire age=12;east=false;north=false;south=true;up=false;west=false minecraft:fire age=12;east=false;north=false;south=true;up=false;west=true minecraft:fire age=12;east=false;north=false;south=true;up=true;west=false minecraft:fire age=12;east=false;north=false;south=true;up=true;west=true minecraft:fire age=12;east=false;north=true;south=false;up=false;west=false minecraft:fire age=12;east=false;north=true;south=false;up=false;west=true minecraft:fire age=12;east=false;north=true;south=false;up=true;west=false minecraft:fire age=12;east=false;north=true;south=false;up=true;west=true minecraft:fire age=12;east=false;north=true;south=true;up=false;west=false minecraft:fire age=12;east=false;north=true;south=true;up=false;west=true minecraft:fire age=12;east=false;north=true;south=true;up=true;west=false minecraft:fire age=12;east=false;north=true;south=true;up=true;west=true minecraft:fire age=12;east=true;north=false;south=false;up=false;west=false minecraft:fire age=12;east=true;north=false;south=false;up=false;west=true minecraft:fire age=12;east=true;north=false;south=false;up=true;west=false minecraft:fire age=12;east=true;north=false;south=false;up=true;west=true minecraft:fire age=12;east=true;north=false;south=true;up=false;west=false minecraft:fire age=12;east=true;north=false;south=true;up=false;west=true minecraft:fire age=12;east=true;north=false;south=true;up=true;west=false minecraft:fire age=12;east=true;north=false;south=true;up=true;west=true minecraft:fire age=12;east=true;north=true;south=false;up=false;west=false minecraft:fire age=12;east=true;north=true;south=false;up=false;west=true minecraft:fire age=12;east=true;north=true;south=false;up=true;west=false minecraft:fire age=12;east=true;north=true;south=false;up=true;west=true minecraft:fire age=12;east=true;north=true;south=true;up=false;west=false minecraft:fire age=12;east=true;north=true;south=true;up=false;west=true minecraft:fire age=12;east=true;north=true;south=true;up=true;west=false minecraft:fire age=12;east=true;north=true;south=true;up=true;west=true +829 minecraft:fire age=13;east=false;north=false;south=false;up=false;west=false minecraft:fire age=13;east=false;north=false;south=false;up=false;west=false minecraft:fire age=13;east=false;north=false;south=false;up=false;west=true minecraft:fire age=13;east=false;north=false;south=false;up=true;west=false minecraft:fire age=13;east=false;north=false;south=false;up=true;west=true minecraft:fire age=13;east=false;north=false;south=true;up=false;west=false minecraft:fire age=13;east=false;north=false;south=true;up=false;west=true minecraft:fire age=13;east=false;north=false;south=true;up=true;west=false minecraft:fire age=13;east=false;north=false;south=true;up=true;west=true minecraft:fire age=13;east=false;north=true;south=false;up=false;west=false minecraft:fire age=13;east=false;north=true;south=false;up=false;west=true minecraft:fire age=13;east=false;north=true;south=false;up=true;west=false minecraft:fire age=13;east=false;north=true;south=false;up=true;west=true minecraft:fire age=13;east=false;north=true;south=true;up=false;west=false minecraft:fire age=13;east=false;north=true;south=true;up=false;west=true minecraft:fire age=13;east=false;north=true;south=true;up=true;west=false minecraft:fire age=13;east=false;north=true;south=true;up=true;west=true minecraft:fire age=13;east=true;north=false;south=false;up=false;west=false minecraft:fire age=13;east=true;north=false;south=false;up=false;west=true minecraft:fire age=13;east=true;north=false;south=false;up=true;west=false minecraft:fire age=13;east=true;north=false;south=false;up=true;west=true minecraft:fire age=13;east=true;north=false;south=true;up=false;west=false minecraft:fire age=13;east=true;north=false;south=true;up=false;west=true minecraft:fire age=13;east=true;north=false;south=true;up=true;west=false minecraft:fire age=13;east=true;north=false;south=true;up=true;west=true minecraft:fire age=13;east=true;north=true;south=false;up=false;west=false minecraft:fire age=13;east=true;north=true;south=false;up=false;west=true minecraft:fire age=13;east=true;north=true;south=false;up=true;west=false minecraft:fire age=13;east=true;north=true;south=false;up=true;west=true minecraft:fire age=13;east=true;north=true;south=true;up=false;west=false minecraft:fire age=13;east=true;north=true;south=true;up=false;west=true minecraft:fire age=13;east=true;north=true;south=true;up=true;west=false minecraft:fire age=13;east=true;north=true;south=true;up=true;west=true +830 minecraft:fire age=14;east=false;north=false;south=false;up=false;west=false minecraft:fire age=14;east=false;north=false;south=false;up=false;west=false minecraft:fire age=14;east=false;north=false;south=false;up=false;west=true minecraft:fire age=14;east=false;north=false;south=false;up=true;west=false minecraft:fire age=14;east=false;north=false;south=false;up=true;west=true minecraft:fire age=14;east=false;north=false;south=true;up=false;west=false minecraft:fire age=14;east=false;north=false;south=true;up=false;west=true minecraft:fire age=14;east=false;north=false;south=true;up=true;west=false minecraft:fire age=14;east=false;north=false;south=true;up=true;west=true minecraft:fire age=14;east=false;north=true;south=false;up=false;west=false minecraft:fire age=14;east=false;north=true;south=false;up=false;west=true minecraft:fire age=14;east=false;north=true;south=false;up=true;west=false minecraft:fire age=14;east=false;north=true;south=false;up=true;west=true minecraft:fire age=14;east=false;north=true;south=true;up=false;west=false minecraft:fire age=14;east=false;north=true;south=true;up=false;west=true minecraft:fire age=14;east=false;north=true;south=true;up=true;west=false minecraft:fire age=14;east=false;north=true;south=true;up=true;west=true minecraft:fire age=14;east=true;north=false;south=false;up=false;west=false minecraft:fire age=14;east=true;north=false;south=false;up=false;west=true minecraft:fire age=14;east=true;north=false;south=false;up=true;west=false minecraft:fire age=14;east=true;north=false;south=false;up=true;west=true minecraft:fire age=14;east=true;north=false;south=true;up=false;west=false minecraft:fire age=14;east=true;north=false;south=true;up=false;west=true minecraft:fire age=14;east=true;north=false;south=true;up=true;west=false minecraft:fire age=14;east=true;north=false;south=true;up=true;west=true minecraft:fire age=14;east=true;north=true;south=false;up=false;west=false minecraft:fire age=14;east=true;north=true;south=false;up=false;west=true minecraft:fire age=14;east=true;north=true;south=false;up=true;west=false minecraft:fire age=14;east=true;north=true;south=false;up=true;west=true minecraft:fire age=14;east=true;north=true;south=true;up=false;west=false minecraft:fire age=14;east=true;north=true;south=true;up=false;west=true minecraft:fire age=14;east=true;north=true;south=true;up=true;west=false minecraft:fire age=14;east=true;north=true;south=true;up=true;west=true +831 minecraft:fire age=15;east=false;north=false;south=false;up=false;west=false minecraft:fire age=15;east=false;north=false;south=false;up=false;west=false minecraft:fire age=15;east=false;north=false;south=false;up=false;west=true minecraft:fire age=15;east=false;north=false;south=false;up=true;west=false minecraft:fire age=15;east=false;north=false;south=false;up=true;west=true minecraft:fire age=15;east=false;north=false;south=true;up=false;west=false minecraft:fire age=15;east=false;north=false;south=true;up=false;west=true minecraft:fire age=15;east=false;north=false;south=true;up=true;west=false minecraft:fire age=15;east=false;north=false;south=true;up=true;west=true minecraft:fire age=15;east=false;north=true;south=false;up=false;west=false minecraft:fire age=15;east=false;north=true;south=false;up=false;west=true minecraft:fire age=15;east=false;north=true;south=false;up=true;west=false minecraft:fire age=15;east=false;north=true;south=false;up=true;west=true minecraft:fire age=15;east=false;north=true;south=true;up=false;west=false minecraft:fire age=15;east=false;north=true;south=true;up=false;west=true minecraft:fire age=15;east=false;north=true;south=true;up=true;west=false minecraft:fire age=15;east=false;north=true;south=true;up=true;west=true minecraft:fire age=15;east=true;north=false;south=false;up=false;west=false minecraft:fire age=15;east=true;north=false;south=false;up=false;west=true minecraft:fire age=15;east=true;north=false;south=false;up=true;west=false minecraft:fire age=15;east=true;north=false;south=false;up=true;west=true minecraft:fire age=15;east=true;north=false;south=true;up=false;west=false minecraft:fire age=15;east=true;north=false;south=true;up=false;west=true minecraft:fire age=15;east=true;north=false;south=true;up=true;west=false minecraft:fire age=15;east=true;north=false;south=true;up=true;west=true minecraft:fire age=15;east=true;north=true;south=false;up=false;west=false minecraft:fire age=15;east=true;north=true;south=false;up=false;west=true minecraft:fire age=15;east=true;north=true;south=false;up=true;west=false minecraft:fire age=15;east=true;north=true;south=false;up=true;west=true minecraft:fire age=15;east=true;north=true;south=true;up=false;west=false minecraft:fire age=15;east=true;north=true;south=true;up=false;west=true minecraft:fire age=15;east=true;north=true;south=true;up=true;west=false minecraft:fire age=15;east=true;north=true;south=true;up=true;west=true +832 minecraft:mob_spawner minecraft:mob_spawner +848 minecraft:oak_stairs facing=east;half=bottom;shape=straight minecraft:oak_stairs facing=east;half=bottom;shape=inner_left minecraft:oak_stairs facing=east;half=bottom;shape=inner_right minecraft:oak_stairs facing=east;half=bottom;shape=outer_left minecraft:oak_stairs facing=east;half=bottom;shape=outer_right minecraft:oak_stairs facing=east;half=bottom;shape=straight +849 minecraft:oak_stairs facing=west;half=bottom;shape=straight minecraft:oak_stairs facing=west;half=bottom;shape=inner_left minecraft:oak_stairs facing=west;half=bottom;shape=inner_right minecraft:oak_stairs facing=west;half=bottom;shape=outer_left minecraft:oak_stairs facing=west;half=bottom;shape=outer_right minecraft:oak_stairs facing=west;half=bottom;shape=straight +850 minecraft:oak_stairs facing=south;half=bottom;shape=straight minecraft:oak_stairs facing=south;half=bottom;shape=inner_left minecraft:oak_stairs facing=south;half=bottom;shape=inner_right minecraft:oak_stairs facing=south;half=bottom;shape=outer_left minecraft:oak_stairs facing=south;half=bottom;shape=outer_right minecraft:oak_stairs facing=south;half=bottom;shape=straight +851 minecraft:oak_stairs facing=north;half=bottom;shape=straight minecraft:oak_stairs facing=north;half=bottom;shape=inner_left minecraft:oak_stairs facing=north;half=bottom;shape=inner_right minecraft:oak_stairs facing=north;half=bottom;shape=outer_left minecraft:oak_stairs facing=north;half=bottom;shape=outer_right minecraft:oak_stairs facing=north;half=bottom;shape=straight +852 minecraft:oak_stairs facing=east;half=top;shape=straight minecraft:oak_stairs facing=east;half=top;shape=inner_left minecraft:oak_stairs facing=east;half=top;shape=inner_right minecraft:oak_stairs facing=east;half=top;shape=outer_left minecraft:oak_stairs facing=east;half=top;shape=outer_right minecraft:oak_stairs facing=east;half=top;shape=straight +853 minecraft:oak_stairs facing=west;half=top;shape=straight minecraft:oak_stairs facing=west;half=top;shape=inner_left minecraft:oak_stairs facing=west;half=top;shape=inner_right minecraft:oak_stairs facing=west;half=top;shape=outer_left minecraft:oak_stairs facing=west;half=top;shape=outer_right minecraft:oak_stairs facing=west;half=top;shape=straight +854 minecraft:oak_stairs facing=south;half=top;shape=straight minecraft:oak_stairs facing=south;half=top;shape=inner_left minecraft:oak_stairs facing=south;half=top;shape=inner_right minecraft:oak_stairs facing=south;half=top;shape=outer_left minecraft:oak_stairs facing=south;half=top;shape=outer_right minecraft:oak_stairs facing=south;half=top;shape=straight +855 minecraft:oak_stairs facing=north;half=top;shape=straight minecraft:oak_stairs facing=north;half=top;shape=inner_left minecraft:oak_stairs facing=north;half=top;shape=inner_right minecraft:oak_stairs facing=north;half=top;shape=outer_left minecraft:oak_stairs facing=north;half=top;shape=outer_right minecraft:oak_stairs facing=north;half=top;shape=straight +866 minecraft:chest facing=north;type=single minecraft:chest facing=north +867 minecraft:chest facing=south;type=single minecraft:chest facing=south +868 minecraft:chest facing=west;type=single minecraft:chest facing=west +869 minecraft:chest facing=east;type=single minecraft:chest facing=east +880 minecraft:redstone_wire east=none;north=none;power=0;south=none;west=none minecraft:redstone_wire east=none;north=none;power=0;south=none;west=none minecraft:redstone_wire east=none;north=none;power=0;south=none;west=side minecraft:redstone_wire east=none;north=none;power=0;south=none;west=up minecraft:redstone_wire east=none;north=none;power=0;south=side;west=none minecraft:redstone_wire east=none;north=none;power=0;south=side;west=side minecraft:redstone_wire east=none;north=none;power=0;south=side;west=up minecraft:redstone_wire east=none;north=none;power=0;south=up;west=none minecraft:redstone_wire east=none;north=none;power=0;south=up;west=side minecraft:redstone_wire east=none;north=none;power=0;south=up;west=up minecraft:redstone_wire east=none;north=side;power=0;south=none;west=none minecraft:redstone_wire east=none;north=side;power=0;south=none;west=side minecraft:redstone_wire east=none;north=side;power=0;south=none;west=up minecraft:redstone_wire east=none;north=side;power=0;south=side;west=none minecraft:redstone_wire east=none;north=side;power=0;south=side;west=side minecraft:redstone_wire east=none;north=side;power=0;south=side;west=up minecraft:redstone_wire east=none;north=side;power=0;south=up;west=none minecraft:redstone_wire east=none;north=side;power=0;south=up;west=side minecraft:redstone_wire east=none;north=side;power=0;south=up;west=up minecraft:redstone_wire east=none;north=up;power=0;south=none;west=none minecraft:redstone_wire east=none;north=up;power=0;south=none;west=side minecraft:redstone_wire east=none;north=up;power=0;south=none;west=up minecraft:redstone_wire east=none;north=up;power=0;south=side;west=none minecraft:redstone_wire east=none;north=up;power=0;south=side;west=side minecraft:redstone_wire east=none;north=up;power=0;south=side;west=up minecraft:redstone_wire east=none;north=up;power=0;south=up;west=none minecraft:redstone_wire east=none;north=up;power=0;south=up;west=side minecraft:redstone_wire east=none;north=up;power=0;south=up;west=up minecraft:redstone_wire east=side;north=none;power=0;south=none;west=none minecraft:redstone_wire east=side;north=none;power=0;south=none;west=side minecraft:redstone_wire east=side;north=none;power=0;south=none;west=up minecraft:redstone_wire east=side;north=none;power=0;south=side;west=none minecraft:redstone_wire east=side;north=none;power=0;south=side;west=side minecraft:redstone_wire east=side;north=none;power=0;south=side;west=up minecraft:redstone_wire east=side;north=none;power=0;south=up;west=none minecraft:redstone_wire east=side;north=none;power=0;south=up;west=side minecraft:redstone_wire east=side;north=none;power=0;south=up;west=up minecraft:redstone_wire east=side;north=side;power=0;south=none;west=none minecraft:redstone_wire east=side;north=side;power=0;south=none;west=side minecraft:redstone_wire east=side;north=side;power=0;south=none;west=up minecraft:redstone_wire east=side;north=side;power=0;south=side;west=none minecraft:redstone_wire east=side;north=side;power=0;south=side;west=side minecraft:redstone_wire east=side;north=side;power=0;south=side;west=up minecraft:redstone_wire east=side;north=side;power=0;south=up;west=none minecraft:redstone_wire east=side;north=side;power=0;south=up;west=side minecraft:redstone_wire east=side;north=side;power=0;south=up;west=up minecraft:redstone_wire east=side;north=up;power=0;south=none;west=none minecraft:redstone_wire east=side;north=up;power=0;south=none;west=side minecraft:redstone_wire east=side;north=up;power=0;south=none;west=up minecraft:redstone_wire east=side;north=up;power=0;south=side;west=none minecraft:redstone_wire east=side;north=up;power=0;south=side;west=side minecraft:redstone_wire east=side;north=up;power=0;south=side;west=up minecraft:redstone_wire east=side;north=up;power=0;south=up;west=none minecraft:redstone_wire east=side;north=up;power=0;south=up;west=side minecraft:redstone_wire east=side;north=up;power=0;south=up;west=up minecraft:redstone_wire east=up;north=none;power=0;south=none;west=none minecraft:redstone_wire east=up;north=none;power=0;south=none;west=side minecraft:redstone_wire east=up;north=none;power=0;south=none;west=up minecraft:redstone_wire east=up;north=none;power=0;south=side;west=none minecraft:redstone_wire east=up;north=none;power=0;south=side;west=side minecraft:redstone_wire east=up;north=none;power=0;south=side;west=up minecraft:redstone_wire east=up;north=none;power=0;south=up;west=none minecraft:redstone_wire east=up;north=none;power=0;south=up;west=side minecraft:redstone_wire east=up;north=none;power=0;south=up;west=up minecraft:redstone_wire east=up;north=side;power=0;south=none;west=none minecraft:redstone_wire east=up;north=side;power=0;south=none;west=side minecraft:redstone_wire east=up;north=side;power=0;south=none;west=up minecraft:redstone_wire east=up;north=side;power=0;south=side;west=none minecraft:redstone_wire east=up;north=side;power=0;south=side;west=side minecraft:redstone_wire east=up;north=side;power=0;south=side;west=up minecraft:redstone_wire east=up;north=side;power=0;south=up;west=none minecraft:redstone_wire east=up;north=side;power=0;south=up;west=side minecraft:redstone_wire east=up;north=side;power=0;south=up;west=up minecraft:redstone_wire east=up;north=up;power=0;south=none;west=none minecraft:redstone_wire east=up;north=up;power=0;south=none;west=side minecraft:redstone_wire east=up;north=up;power=0;south=none;west=up minecraft:redstone_wire east=up;north=up;power=0;south=side;west=none minecraft:redstone_wire east=up;north=up;power=0;south=side;west=side minecraft:redstone_wire east=up;north=up;power=0;south=side;west=up minecraft:redstone_wire east=up;north=up;power=0;south=up;west=none minecraft:redstone_wire east=up;north=up;power=0;south=up;west=side minecraft:redstone_wire east=up;north=up;power=0;south=up;west=up +881 minecraft:redstone_wire east=none;north=none;power=1;south=none;west=none minecraft:redstone_wire east=none;north=none;power=1;south=none;west=none minecraft:redstone_wire east=none;north=none;power=1;south=none;west=side minecraft:redstone_wire east=none;north=none;power=1;south=none;west=up minecraft:redstone_wire east=none;north=none;power=1;south=side;west=none minecraft:redstone_wire east=none;north=none;power=1;south=side;west=side minecraft:redstone_wire east=none;north=none;power=1;south=side;west=up minecraft:redstone_wire east=none;north=none;power=1;south=up;west=none minecraft:redstone_wire east=none;north=none;power=1;south=up;west=side minecraft:redstone_wire east=none;north=none;power=1;south=up;west=up minecraft:redstone_wire east=none;north=side;power=1;south=none;west=none minecraft:redstone_wire east=none;north=side;power=1;south=none;west=side minecraft:redstone_wire east=none;north=side;power=1;south=none;west=up minecraft:redstone_wire east=none;north=side;power=1;south=side;west=none minecraft:redstone_wire east=none;north=side;power=1;south=side;west=side minecraft:redstone_wire east=none;north=side;power=1;south=side;west=up minecraft:redstone_wire east=none;north=side;power=1;south=up;west=none minecraft:redstone_wire east=none;north=side;power=1;south=up;west=side minecraft:redstone_wire east=none;north=side;power=1;south=up;west=up minecraft:redstone_wire east=none;north=up;power=1;south=none;west=none minecraft:redstone_wire east=none;north=up;power=1;south=none;west=side minecraft:redstone_wire east=none;north=up;power=1;south=none;west=up minecraft:redstone_wire east=none;north=up;power=1;south=side;west=none minecraft:redstone_wire east=none;north=up;power=1;south=side;west=side minecraft:redstone_wire east=none;north=up;power=1;south=side;west=up minecraft:redstone_wire east=none;north=up;power=1;south=up;west=none minecraft:redstone_wire east=none;north=up;power=1;south=up;west=side minecraft:redstone_wire east=none;north=up;power=1;south=up;west=up minecraft:redstone_wire east=side;north=none;power=1;south=none;west=none minecraft:redstone_wire east=side;north=none;power=1;south=none;west=side minecraft:redstone_wire east=side;north=none;power=1;south=none;west=up minecraft:redstone_wire east=side;north=none;power=1;south=side;west=none minecraft:redstone_wire east=side;north=none;power=1;south=side;west=side minecraft:redstone_wire east=side;north=none;power=1;south=side;west=up minecraft:redstone_wire east=side;north=none;power=1;south=up;west=none minecraft:redstone_wire east=side;north=none;power=1;south=up;west=side minecraft:redstone_wire east=side;north=none;power=1;south=up;west=up minecraft:redstone_wire east=side;north=side;power=1;south=none;west=none minecraft:redstone_wire east=side;north=side;power=1;south=none;west=side minecraft:redstone_wire east=side;north=side;power=1;south=none;west=up minecraft:redstone_wire east=side;north=side;power=1;south=side;west=none minecraft:redstone_wire east=side;north=side;power=1;south=side;west=side minecraft:redstone_wire east=side;north=side;power=1;south=side;west=up minecraft:redstone_wire east=side;north=side;power=1;south=up;west=none minecraft:redstone_wire east=side;north=side;power=1;south=up;west=side minecraft:redstone_wire east=side;north=side;power=1;south=up;west=up minecraft:redstone_wire east=side;north=up;power=1;south=none;west=none minecraft:redstone_wire east=side;north=up;power=1;south=none;west=side minecraft:redstone_wire east=side;north=up;power=1;south=none;west=up minecraft:redstone_wire east=side;north=up;power=1;south=side;west=none minecraft:redstone_wire east=side;north=up;power=1;south=side;west=side minecraft:redstone_wire east=side;north=up;power=1;south=side;west=up minecraft:redstone_wire east=side;north=up;power=1;south=up;west=none minecraft:redstone_wire east=side;north=up;power=1;south=up;west=side minecraft:redstone_wire east=side;north=up;power=1;south=up;west=up minecraft:redstone_wire east=up;north=none;power=1;south=none;west=none minecraft:redstone_wire east=up;north=none;power=1;south=none;west=side minecraft:redstone_wire east=up;north=none;power=1;south=none;west=up minecraft:redstone_wire east=up;north=none;power=1;south=side;west=none minecraft:redstone_wire east=up;north=none;power=1;south=side;west=side minecraft:redstone_wire east=up;north=none;power=1;south=side;west=up minecraft:redstone_wire east=up;north=none;power=1;south=up;west=none minecraft:redstone_wire east=up;north=none;power=1;south=up;west=side minecraft:redstone_wire east=up;north=none;power=1;south=up;west=up minecraft:redstone_wire east=up;north=side;power=1;south=none;west=none minecraft:redstone_wire east=up;north=side;power=1;south=none;west=side minecraft:redstone_wire east=up;north=side;power=1;south=none;west=up minecraft:redstone_wire east=up;north=side;power=1;south=side;west=none minecraft:redstone_wire east=up;north=side;power=1;south=side;west=side minecraft:redstone_wire east=up;north=side;power=1;south=side;west=up minecraft:redstone_wire east=up;north=side;power=1;south=up;west=none minecraft:redstone_wire east=up;north=side;power=1;south=up;west=side minecraft:redstone_wire east=up;north=side;power=1;south=up;west=up minecraft:redstone_wire east=up;north=up;power=1;south=none;west=none minecraft:redstone_wire east=up;north=up;power=1;south=none;west=side minecraft:redstone_wire east=up;north=up;power=1;south=none;west=up minecraft:redstone_wire east=up;north=up;power=1;south=side;west=none minecraft:redstone_wire east=up;north=up;power=1;south=side;west=side minecraft:redstone_wire east=up;north=up;power=1;south=side;west=up minecraft:redstone_wire east=up;north=up;power=1;south=up;west=none minecraft:redstone_wire east=up;north=up;power=1;south=up;west=side minecraft:redstone_wire east=up;north=up;power=1;south=up;west=up +882 minecraft:redstone_wire east=none;north=none;power=2;south=none;west=none minecraft:redstone_wire east=none;north=none;power=2;south=none;west=none minecraft:redstone_wire east=none;north=none;power=2;south=none;west=side minecraft:redstone_wire east=none;north=none;power=2;south=none;west=up minecraft:redstone_wire east=none;north=none;power=2;south=side;west=none minecraft:redstone_wire east=none;north=none;power=2;south=side;west=side minecraft:redstone_wire east=none;north=none;power=2;south=side;west=up minecraft:redstone_wire east=none;north=none;power=2;south=up;west=none minecraft:redstone_wire east=none;north=none;power=2;south=up;west=side minecraft:redstone_wire east=none;north=none;power=2;south=up;west=up minecraft:redstone_wire east=none;north=side;power=2;south=none;west=none minecraft:redstone_wire east=none;north=side;power=2;south=none;west=side minecraft:redstone_wire east=none;north=side;power=2;south=none;west=up minecraft:redstone_wire east=none;north=side;power=2;south=side;west=none minecraft:redstone_wire east=none;north=side;power=2;south=side;west=side minecraft:redstone_wire east=none;north=side;power=2;south=side;west=up minecraft:redstone_wire east=none;north=side;power=2;south=up;west=none minecraft:redstone_wire east=none;north=side;power=2;south=up;west=side minecraft:redstone_wire east=none;north=side;power=2;south=up;west=up minecraft:redstone_wire east=none;north=up;power=2;south=none;west=none minecraft:redstone_wire east=none;north=up;power=2;south=none;west=side minecraft:redstone_wire east=none;north=up;power=2;south=none;west=up minecraft:redstone_wire east=none;north=up;power=2;south=side;west=none minecraft:redstone_wire east=none;north=up;power=2;south=side;west=side minecraft:redstone_wire east=none;north=up;power=2;south=side;west=up minecraft:redstone_wire east=none;north=up;power=2;south=up;west=none minecraft:redstone_wire east=none;north=up;power=2;south=up;west=side minecraft:redstone_wire east=none;north=up;power=2;south=up;west=up minecraft:redstone_wire east=side;north=none;power=2;south=none;west=none minecraft:redstone_wire east=side;north=none;power=2;south=none;west=side minecraft:redstone_wire east=side;north=none;power=2;south=none;west=up minecraft:redstone_wire east=side;north=none;power=2;south=side;west=none minecraft:redstone_wire east=side;north=none;power=2;south=side;west=side minecraft:redstone_wire east=side;north=none;power=2;south=side;west=up minecraft:redstone_wire east=side;north=none;power=2;south=up;west=none minecraft:redstone_wire east=side;north=none;power=2;south=up;west=side minecraft:redstone_wire east=side;north=none;power=2;south=up;west=up minecraft:redstone_wire east=side;north=side;power=2;south=none;west=none minecraft:redstone_wire east=side;north=side;power=2;south=none;west=side minecraft:redstone_wire east=side;north=side;power=2;south=none;west=up minecraft:redstone_wire east=side;north=side;power=2;south=side;west=none minecraft:redstone_wire east=side;north=side;power=2;south=side;west=side minecraft:redstone_wire east=side;north=side;power=2;south=side;west=up minecraft:redstone_wire east=side;north=side;power=2;south=up;west=none minecraft:redstone_wire east=side;north=side;power=2;south=up;west=side minecraft:redstone_wire east=side;north=side;power=2;south=up;west=up minecraft:redstone_wire east=side;north=up;power=2;south=none;west=none minecraft:redstone_wire east=side;north=up;power=2;south=none;west=side minecraft:redstone_wire east=side;north=up;power=2;south=none;west=up minecraft:redstone_wire east=side;north=up;power=2;south=side;west=none minecraft:redstone_wire east=side;north=up;power=2;south=side;west=side minecraft:redstone_wire east=side;north=up;power=2;south=side;west=up minecraft:redstone_wire east=side;north=up;power=2;south=up;west=none minecraft:redstone_wire east=side;north=up;power=2;south=up;west=side minecraft:redstone_wire east=side;north=up;power=2;south=up;west=up minecraft:redstone_wire east=up;north=none;power=2;south=none;west=none minecraft:redstone_wire east=up;north=none;power=2;south=none;west=side minecraft:redstone_wire east=up;north=none;power=2;south=none;west=up minecraft:redstone_wire east=up;north=none;power=2;south=side;west=none minecraft:redstone_wire east=up;north=none;power=2;south=side;west=side minecraft:redstone_wire east=up;north=none;power=2;south=side;west=up minecraft:redstone_wire east=up;north=none;power=2;south=up;west=none minecraft:redstone_wire east=up;north=none;power=2;south=up;west=side minecraft:redstone_wire east=up;north=none;power=2;south=up;west=up minecraft:redstone_wire east=up;north=side;power=2;south=none;west=none minecraft:redstone_wire east=up;north=side;power=2;south=none;west=side minecraft:redstone_wire east=up;north=side;power=2;south=none;west=up minecraft:redstone_wire east=up;north=side;power=2;south=side;west=none minecraft:redstone_wire east=up;north=side;power=2;south=side;west=side minecraft:redstone_wire east=up;north=side;power=2;south=side;west=up minecraft:redstone_wire east=up;north=side;power=2;south=up;west=none minecraft:redstone_wire east=up;north=side;power=2;south=up;west=side minecraft:redstone_wire east=up;north=side;power=2;south=up;west=up minecraft:redstone_wire east=up;north=up;power=2;south=none;west=none minecraft:redstone_wire east=up;north=up;power=2;south=none;west=side minecraft:redstone_wire east=up;north=up;power=2;south=none;west=up minecraft:redstone_wire east=up;north=up;power=2;south=side;west=none minecraft:redstone_wire east=up;north=up;power=2;south=side;west=side minecraft:redstone_wire east=up;north=up;power=2;south=side;west=up minecraft:redstone_wire east=up;north=up;power=2;south=up;west=none minecraft:redstone_wire east=up;north=up;power=2;south=up;west=side minecraft:redstone_wire east=up;north=up;power=2;south=up;west=up +883 minecraft:redstone_wire east=none;north=none;power=3;south=none;west=none minecraft:redstone_wire east=none;north=none;power=3;south=none;west=none minecraft:redstone_wire east=none;north=none;power=3;south=none;west=side minecraft:redstone_wire east=none;north=none;power=3;south=none;west=up minecraft:redstone_wire east=none;north=none;power=3;south=side;west=none minecraft:redstone_wire east=none;north=none;power=3;south=side;west=side minecraft:redstone_wire east=none;north=none;power=3;south=side;west=up minecraft:redstone_wire east=none;north=none;power=3;south=up;west=none minecraft:redstone_wire east=none;north=none;power=3;south=up;west=side minecraft:redstone_wire east=none;north=none;power=3;south=up;west=up minecraft:redstone_wire east=none;north=side;power=3;south=none;west=none minecraft:redstone_wire east=none;north=side;power=3;south=none;west=side minecraft:redstone_wire east=none;north=side;power=3;south=none;west=up minecraft:redstone_wire east=none;north=side;power=3;south=side;west=none minecraft:redstone_wire east=none;north=side;power=3;south=side;west=side minecraft:redstone_wire east=none;north=side;power=3;south=side;west=up minecraft:redstone_wire east=none;north=side;power=3;south=up;west=none minecraft:redstone_wire east=none;north=side;power=3;south=up;west=side minecraft:redstone_wire east=none;north=side;power=3;south=up;west=up minecraft:redstone_wire east=none;north=up;power=3;south=none;west=none minecraft:redstone_wire east=none;north=up;power=3;south=none;west=side minecraft:redstone_wire east=none;north=up;power=3;south=none;west=up minecraft:redstone_wire east=none;north=up;power=3;south=side;west=none minecraft:redstone_wire east=none;north=up;power=3;south=side;west=side minecraft:redstone_wire east=none;north=up;power=3;south=side;west=up minecraft:redstone_wire east=none;north=up;power=3;south=up;west=none minecraft:redstone_wire east=none;north=up;power=3;south=up;west=side minecraft:redstone_wire east=none;north=up;power=3;south=up;west=up minecraft:redstone_wire east=side;north=none;power=3;south=none;west=none minecraft:redstone_wire east=side;north=none;power=3;south=none;west=side minecraft:redstone_wire east=side;north=none;power=3;south=none;west=up minecraft:redstone_wire east=side;north=none;power=3;south=side;west=none minecraft:redstone_wire east=side;north=none;power=3;south=side;west=side minecraft:redstone_wire east=side;north=none;power=3;south=side;west=up minecraft:redstone_wire east=side;north=none;power=3;south=up;west=none minecraft:redstone_wire east=side;north=none;power=3;south=up;west=side minecraft:redstone_wire east=side;north=none;power=3;south=up;west=up minecraft:redstone_wire east=side;north=side;power=3;south=none;west=none minecraft:redstone_wire east=side;north=side;power=3;south=none;west=side minecraft:redstone_wire east=side;north=side;power=3;south=none;west=up minecraft:redstone_wire east=side;north=side;power=3;south=side;west=none minecraft:redstone_wire east=side;north=side;power=3;south=side;west=side minecraft:redstone_wire east=side;north=side;power=3;south=side;west=up minecraft:redstone_wire east=side;north=side;power=3;south=up;west=none minecraft:redstone_wire east=side;north=side;power=3;south=up;west=side minecraft:redstone_wire east=side;north=side;power=3;south=up;west=up minecraft:redstone_wire east=side;north=up;power=3;south=none;west=none minecraft:redstone_wire east=side;north=up;power=3;south=none;west=side minecraft:redstone_wire east=side;north=up;power=3;south=none;west=up minecraft:redstone_wire east=side;north=up;power=3;south=side;west=none minecraft:redstone_wire east=side;north=up;power=3;south=side;west=side minecraft:redstone_wire east=side;north=up;power=3;south=side;west=up minecraft:redstone_wire east=side;north=up;power=3;south=up;west=none minecraft:redstone_wire east=side;north=up;power=3;south=up;west=side minecraft:redstone_wire east=side;north=up;power=3;south=up;west=up minecraft:redstone_wire east=up;north=none;power=3;south=none;west=none minecraft:redstone_wire east=up;north=none;power=3;south=none;west=side minecraft:redstone_wire east=up;north=none;power=3;south=none;west=up minecraft:redstone_wire east=up;north=none;power=3;south=side;west=none minecraft:redstone_wire east=up;north=none;power=3;south=side;west=side minecraft:redstone_wire east=up;north=none;power=3;south=side;west=up minecraft:redstone_wire east=up;north=none;power=3;south=up;west=none minecraft:redstone_wire east=up;north=none;power=3;south=up;west=side minecraft:redstone_wire east=up;north=none;power=3;south=up;west=up minecraft:redstone_wire east=up;north=side;power=3;south=none;west=none minecraft:redstone_wire east=up;north=side;power=3;south=none;west=side minecraft:redstone_wire east=up;north=side;power=3;south=none;west=up minecraft:redstone_wire east=up;north=side;power=3;south=side;west=none minecraft:redstone_wire east=up;north=side;power=3;south=side;west=side minecraft:redstone_wire east=up;north=side;power=3;south=side;west=up minecraft:redstone_wire east=up;north=side;power=3;south=up;west=none minecraft:redstone_wire east=up;north=side;power=3;south=up;west=side minecraft:redstone_wire east=up;north=side;power=3;south=up;west=up minecraft:redstone_wire east=up;north=up;power=3;south=none;west=none minecraft:redstone_wire east=up;north=up;power=3;south=none;west=side minecraft:redstone_wire east=up;north=up;power=3;south=none;west=up minecraft:redstone_wire east=up;north=up;power=3;south=side;west=none minecraft:redstone_wire east=up;north=up;power=3;south=side;west=side minecraft:redstone_wire east=up;north=up;power=3;south=side;west=up minecraft:redstone_wire east=up;north=up;power=3;south=up;west=none minecraft:redstone_wire east=up;north=up;power=3;south=up;west=side minecraft:redstone_wire east=up;north=up;power=3;south=up;west=up +884 minecraft:redstone_wire east=none;north=none;power=4;south=none;west=none minecraft:redstone_wire east=none;north=none;power=4;south=none;west=none minecraft:redstone_wire east=none;north=none;power=4;south=none;west=side minecraft:redstone_wire east=none;north=none;power=4;south=none;west=up minecraft:redstone_wire east=none;north=none;power=4;south=side;west=none minecraft:redstone_wire east=none;north=none;power=4;south=side;west=side minecraft:redstone_wire east=none;north=none;power=4;south=side;west=up minecraft:redstone_wire east=none;north=none;power=4;south=up;west=none minecraft:redstone_wire east=none;north=none;power=4;south=up;west=side minecraft:redstone_wire east=none;north=none;power=4;south=up;west=up minecraft:redstone_wire east=none;north=side;power=4;south=none;west=none minecraft:redstone_wire east=none;north=side;power=4;south=none;west=side minecraft:redstone_wire east=none;north=side;power=4;south=none;west=up minecraft:redstone_wire east=none;north=side;power=4;south=side;west=none minecraft:redstone_wire east=none;north=side;power=4;south=side;west=side minecraft:redstone_wire east=none;north=side;power=4;south=side;west=up minecraft:redstone_wire east=none;north=side;power=4;south=up;west=none minecraft:redstone_wire east=none;north=side;power=4;south=up;west=side minecraft:redstone_wire east=none;north=side;power=4;south=up;west=up minecraft:redstone_wire east=none;north=up;power=4;south=none;west=none minecraft:redstone_wire east=none;north=up;power=4;south=none;west=side minecraft:redstone_wire east=none;north=up;power=4;south=none;west=up minecraft:redstone_wire east=none;north=up;power=4;south=side;west=none minecraft:redstone_wire east=none;north=up;power=4;south=side;west=side minecraft:redstone_wire east=none;north=up;power=4;south=side;west=up minecraft:redstone_wire east=none;north=up;power=4;south=up;west=none minecraft:redstone_wire east=none;north=up;power=4;south=up;west=side minecraft:redstone_wire east=none;north=up;power=4;south=up;west=up minecraft:redstone_wire east=side;north=none;power=4;south=none;west=none minecraft:redstone_wire east=side;north=none;power=4;south=none;west=side minecraft:redstone_wire east=side;north=none;power=4;south=none;west=up minecraft:redstone_wire east=side;north=none;power=4;south=side;west=none minecraft:redstone_wire east=side;north=none;power=4;south=side;west=side minecraft:redstone_wire east=side;north=none;power=4;south=side;west=up minecraft:redstone_wire east=side;north=none;power=4;south=up;west=none minecraft:redstone_wire east=side;north=none;power=4;south=up;west=side minecraft:redstone_wire east=side;north=none;power=4;south=up;west=up minecraft:redstone_wire east=side;north=side;power=4;south=none;west=none minecraft:redstone_wire east=side;north=side;power=4;south=none;west=side minecraft:redstone_wire east=side;north=side;power=4;south=none;west=up minecraft:redstone_wire east=side;north=side;power=4;south=side;west=none minecraft:redstone_wire east=side;north=side;power=4;south=side;west=side minecraft:redstone_wire east=side;north=side;power=4;south=side;west=up minecraft:redstone_wire east=side;north=side;power=4;south=up;west=none minecraft:redstone_wire east=side;north=side;power=4;south=up;west=side minecraft:redstone_wire east=side;north=side;power=4;south=up;west=up minecraft:redstone_wire east=side;north=up;power=4;south=none;west=none minecraft:redstone_wire east=side;north=up;power=4;south=none;west=side minecraft:redstone_wire east=side;north=up;power=4;south=none;west=up minecraft:redstone_wire east=side;north=up;power=4;south=side;west=none minecraft:redstone_wire east=side;north=up;power=4;south=side;west=side minecraft:redstone_wire east=side;north=up;power=4;south=side;west=up minecraft:redstone_wire east=side;north=up;power=4;south=up;west=none minecraft:redstone_wire east=side;north=up;power=4;south=up;west=side minecraft:redstone_wire east=side;north=up;power=4;south=up;west=up minecraft:redstone_wire east=up;north=none;power=4;south=none;west=none minecraft:redstone_wire east=up;north=none;power=4;south=none;west=side minecraft:redstone_wire east=up;north=none;power=4;south=none;west=up minecraft:redstone_wire east=up;north=none;power=4;south=side;west=none minecraft:redstone_wire east=up;north=none;power=4;south=side;west=side minecraft:redstone_wire east=up;north=none;power=4;south=side;west=up minecraft:redstone_wire east=up;north=none;power=4;south=up;west=none minecraft:redstone_wire east=up;north=none;power=4;south=up;west=side minecraft:redstone_wire east=up;north=none;power=4;south=up;west=up minecraft:redstone_wire east=up;north=side;power=4;south=none;west=none minecraft:redstone_wire east=up;north=side;power=4;south=none;west=side minecraft:redstone_wire east=up;north=side;power=4;south=none;west=up minecraft:redstone_wire east=up;north=side;power=4;south=side;west=none minecraft:redstone_wire east=up;north=side;power=4;south=side;west=side minecraft:redstone_wire east=up;north=side;power=4;south=side;west=up minecraft:redstone_wire east=up;north=side;power=4;south=up;west=none minecraft:redstone_wire east=up;north=side;power=4;south=up;west=side minecraft:redstone_wire east=up;north=side;power=4;south=up;west=up minecraft:redstone_wire east=up;north=up;power=4;south=none;west=none minecraft:redstone_wire east=up;north=up;power=4;south=none;west=side minecraft:redstone_wire east=up;north=up;power=4;south=none;west=up minecraft:redstone_wire east=up;north=up;power=4;south=side;west=none minecraft:redstone_wire east=up;north=up;power=4;south=side;west=side minecraft:redstone_wire east=up;north=up;power=4;south=side;west=up minecraft:redstone_wire east=up;north=up;power=4;south=up;west=none minecraft:redstone_wire east=up;north=up;power=4;south=up;west=side minecraft:redstone_wire east=up;north=up;power=4;south=up;west=up +885 minecraft:redstone_wire east=none;north=none;power=5;south=none;west=none minecraft:redstone_wire east=none;north=none;power=5;south=none;west=none minecraft:redstone_wire east=none;north=none;power=5;south=none;west=side minecraft:redstone_wire east=none;north=none;power=5;south=none;west=up minecraft:redstone_wire east=none;north=none;power=5;south=side;west=none minecraft:redstone_wire east=none;north=none;power=5;south=side;west=side minecraft:redstone_wire east=none;north=none;power=5;south=side;west=up minecraft:redstone_wire east=none;north=none;power=5;south=up;west=none minecraft:redstone_wire east=none;north=none;power=5;south=up;west=side minecraft:redstone_wire east=none;north=none;power=5;south=up;west=up minecraft:redstone_wire east=none;north=side;power=5;south=none;west=none minecraft:redstone_wire east=none;north=side;power=5;south=none;west=side minecraft:redstone_wire east=none;north=side;power=5;south=none;west=up minecraft:redstone_wire east=none;north=side;power=5;south=side;west=none minecraft:redstone_wire east=none;north=side;power=5;south=side;west=side minecraft:redstone_wire east=none;north=side;power=5;south=side;west=up minecraft:redstone_wire east=none;north=side;power=5;south=up;west=none minecraft:redstone_wire east=none;north=side;power=5;south=up;west=side minecraft:redstone_wire east=none;north=side;power=5;south=up;west=up minecraft:redstone_wire east=none;north=up;power=5;south=none;west=none minecraft:redstone_wire east=none;north=up;power=5;south=none;west=side minecraft:redstone_wire east=none;north=up;power=5;south=none;west=up minecraft:redstone_wire east=none;north=up;power=5;south=side;west=none minecraft:redstone_wire east=none;north=up;power=5;south=side;west=side minecraft:redstone_wire east=none;north=up;power=5;south=side;west=up minecraft:redstone_wire east=none;north=up;power=5;south=up;west=none minecraft:redstone_wire east=none;north=up;power=5;south=up;west=side minecraft:redstone_wire east=none;north=up;power=5;south=up;west=up minecraft:redstone_wire east=side;north=none;power=5;south=none;west=none minecraft:redstone_wire east=side;north=none;power=5;south=none;west=side minecraft:redstone_wire east=side;north=none;power=5;south=none;west=up minecraft:redstone_wire east=side;north=none;power=5;south=side;west=none minecraft:redstone_wire east=side;north=none;power=5;south=side;west=side minecraft:redstone_wire east=side;north=none;power=5;south=side;west=up minecraft:redstone_wire east=side;north=none;power=5;south=up;west=none minecraft:redstone_wire east=side;north=none;power=5;south=up;west=side minecraft:redstone_wire east=side;north=none;power=5;south=up;west=up minecraft:redstone_wire east=side;north=side;power=5;south=none;west=none minecraft:redstone_wire east=side;north=side;power=5;south=none;west=side minecraft:redstone_wire east=side;north=side;power=5;south=none;west=up minecraft:redstone_wire east=side;north=side;power=5;south=side;west=none minecraft:redstone_wire east=side;north=side;power=5;south=side;west=side minecraft:redstone_wire east=side;north=side;power=5;south=side;west=up minecraft:redstone_wire east=side;north=side;power=5;south=up;west=none minecraft:redstone_wire east=side;north=side;power=5;south=up;west=side minecraft:redstone_wire east=side;north=side;power=5;south=up;west=up minecraft:redstone_wire east=side;north=up;power=5;south=none;west=none minecraft:redstone_wire east=side;north=up;power=5;south=none;west=side minecraft:redstone_wire east=side;north=up;power=5;south=none;west=up minecraft:redstone_wire east=side;north=up;power=5;south=side;west=none minecraft:redstone_wire east=side;north=up;power=5;south=side;west=side minecraft:redstone_wire east=side;north=up;power=5;south=side;west=up minecraft:redstone_wire east=side;north=up;power=5;south=up;west=none minecraft:redstone_wire east=side;north=up;power=5;south=up;west=side minecraft:redstone_wire east=side;north=up;power=5;south=up;west=up minecraft:redstone_wire east=up;north=none;power=5;south=none;west=none minecraft:redstone_wire east=up;north=none;power=5;south=none;west=side minecraft:redstone_wire east=up;north=none;power=5;south=none;west=up minecraft:redstone_wire east=up;north=none;power=5;south=side;west=none minecraft:redstone_wire east=up;north=none;power=5;south=side;west=side minecraft:redstone_wire east=up;north=none;power=5;south=side;west=up minecraft:redstone_wire east=up;north=none;power=5;south=up;west=none minecraft:redstone_wire east=up;north=none;power=5;south=up;west=side minecraft:redstone_wire east=up;north=none;power=5;south=up;west=up minecraft:redstone_wire east=up;north=side;power=5;south=none;west=none minecraft:redstone_wire east=up;north=side;power=5;south=none;west=side minecraft:redstone_wire east=up;north=side;power=5;south=none;west=up minecraft:redstone_wire east=up;north=side;power=5;south=side;west=none minecraft:redstone_wire east=up;north=side;power=5;south=side;west=side minecraft:redstone_wire east=up;north=side;power=5;south=side;west=up minecraft:redstone_wire east=up;north=side;power=5;south=up;west=none minecraft:redstone_wire east=up;north=side;power=5;south=up;west=side minecraft:redstone_wire east=up;north=side;power=5;south=up;west=up minecraft:redstone_wire east=up;north=up;power=5;south=none;west=none minecraft:redstone_wire east=up;north=up;power=5;south=none;west=side minecraft:redstone_wire east=up;north=up;power=5;south=none;west=up minecraft:redstone_wire east=up;north=up;power=5;south=side;west=none minecraft:redstone_wire east=up;north=up;power=5;south=side;west=side minecraft:redstone_wire east=up;north=up;power=5;south=side;west=up minecraft:redstone_wire east=up;north=up;power=5;south=up;west=none minecraft:redstone_wire east=up;north=up;power=5;south=up;west=side minecraft:redstone_wire east=up;north=up;power=5;south=up;west=up +886 minecraft:redstone_wire east=none;north=none;power=6;south=none;west=none minecraft:redstone_wire east=none;north=none;power=6;south=none;west=none minecraft:redstone_wire east=none;north=none;power=6;south=none;west=side minecraft:redstone_wire east=none;north=none;power=6;south=none;west=up minecraft:redstone_wire east=none;north=none;power=6;south=side;west=none minecraft:redstone_wire east=none;north=none;power=6;south=side;west=side minecraft:redstone_wire east=none;north=none;power=6;south=side;west=up minecraft:redstone_wire east=none;north=none;power=6;south=up;west=none minecraft:redstone_wire east=none;north=none;power=6;south=up;west=side minecraft:redstone_wire east=none;north=none;power=6;south=up;west=up minecraft:redstone_wire east=none;north=side;power=6;south=none;west=none minecraft:redstone_wire east=none;north=side;power=6;south=none;west=side minecraft:redstone_wire east=none;north=side;power=6;south=none;west=up minecraft:redstone_wire east=none;north=side;power=6;south=side;west=none minecraft:redstone_wire east=none;north=side;power=6;south=side;west=side minecraft:redstone_wire east=none;north=side;power=6;south=side;west=up minecraft:redstone_wire east=none;north=side;power=6;south=up;west=none minecraft:redstone_wire east=none;north=side;power=6;south=up;west=side minecraft:redstone_wire east=none;north=side;power=6;south=up;west=up minecraft:redstone_wire east=none;north=up;power=6;south=none;west=none minecraft:redstone_wire east=none;north=up;power=6;south=none;west=side minecraft:redstone_wire east=none;north=up;power=6;south=none;west=up minecraft:redstone_wire east=none;north=up;power=6;south=side;west=none minecraft:redstone_wire east=none;north=up;power=6;south=side;west=side minecraft:redstone_wire east=none;north=up;power=6;south=side;west=up minecraft:redstone_wire east=none;north=up;power=6;south=up;west=none minecraft:redstone_wire east=none;north=up;power=6;south=up;west=side minecraft:redstone_wire east=none;north=up;power=6;south=up;west=up minecraft:redstone_wire east=side;north=none;power=6;south=none;west=none minecraft:redstone_wire east=side;north=none;power=6;south=none;west=side minecraft:redstone_wire east=side;north=none;power=6;south=none;west=up minecraft:redstone_wire east=side;north=none;power=6;south=side;west=none minecraft:redstone_wire east=side;north=none;power=6;south=side;west=side minecraft:redstone_wire east=side;north=none;power=6;south=side;west=up minecraft:redstone_wire east=side;north=none;power=6;south=up;west=none minecraft:redstone_wire east=side;north=none;power=6;south=up;west=side minecraft:redstone_wire east=side;north=none;power=6;south=up;west=up minecraft:redstone_wire east=side;north=side;power=6;south=none;west=none minecraft:redstone_wire east=side;north=side;power=6;south=none;west=side minecraft:redstone_wire east=side;north=side;power=6;south=none;west=up minecraft:redstone_wire east=side;north=side;power=6;south=side;west=none minecraft:redstone_wire east=side;north=side;power=6;south=side;west=side minecraft:redstone_wire east=side;north=side;power=6;south=side;west=up minecraft:redstone_wire east=side;north=side;power=6;south=up;west=none minecraft:redstone_wire east=side;north=side;power=6;south=up;west=side minecraft:redstone_wire east=side;north=side;power=6;south=up;west=up minecraft:redstone_wire east=side;north=up;power=6;south=none;west=none minecraft:redstone_wire east=side;north=up;power=6;south=none;west=side minecraft:redstone_wire east=side;north=up;power=6;south=none;west=up minecraft:redstone_wire east=side;north=up;power=6;south=side;west=none minecraft:redstone_wire east=side;north=up;power=6;south=side;west=side minecraft:redstone_wire east=side;north=up;power=6;south=side;west=up minecraft:redstone_wire east=side;north=up;power=6;south=up;west=none minecraft:redstone_wire east=side;north=up;power=6;south=up;west=side minecraft:redstone_wire east=side;north=up;power=6;south=up;west=up minecraft:redstone_wire east=up;north=none;power=6;south=none;west=none minecraft:redstone_wire east=up;north=none;power=6;south=none;west=side minecraft:redstone_wire east=up;north=none;power=6;south=none;west=up minecraft:redstone_wire east=up;north=none;power=6;south=side;west=none minecraft:redstone_wire east=up;north=none;power=6;south=side;west=side minecraft:redstone_wire east=up;north=none;power=6;south=side;west=up minecraft:redstone_wire east=up;north=none;power=6;south=up;west=none minecraft:redstone_wire east=up;north=none;power=6;south=up;west=side minecraft:redstone_wire east=up;north=none;power=6;south=up;west=up minecraft:redstone_wire east=up;north=side;power=6;south=none;west=none minecraft:redstone_wire east=up;north=side;power=6;south=none;west=side minecraft:redstone_wire east=up;north=side;power=6;south=none;west=up minecraft:redstone_wire east=up;north=side;power=6;south=side;west=none minecraft:redstone_wire east=up;north=side;power=6;south=side;west=side minecraft:redstone_wire east=up;north=side;power=6;south=side;west=up minecraft:redstone_wire east=up;north=side;power=6;south=up;west=none minecraft:redstone_wire east=up;north=side;power=6;south=up;west=side minecraft:redstone_wire east=up;north=side;power=6;south=up;west=up minecraft:redstone_wire east=up;north=up;power=6;south=none;west=none minecraft:redstone_wire east=up;north=up;power=6;south=none;west=side minecraft:redstone_wire east=up;north=up;power=6;south=none;west=up minecraft:redstone_wire east=up;north=up;power=6;south=side;west=none minecraft:redstone_wire east=up;north=up;power=6;south=side;west=side minecraft:redstone_wire east=up;north=up;power=6;south=side;west=up minecraft:redstone_wire east=up;north=up;power=6;south=up;west=none minecraft:redstone_wire east=up;north=up;power=6;south=up;west=side minecraft:redstone_wire east=up;north=up;power=6;south=up;west=up +887 minecraft:redstone_wire east=none;north=none;power=7;south=none;west=none minecraft:redstone_wire east=none;north=none;power=7;south=none;west=none minecraft:redstone_wire east=none;north=none;power=7;south=none;west=side minecraft:redstone_wire east=none;north=none;power=7;south=none;west=up minecraft:redstone_wire east=none;north=none;power=7;south=side;west=none minecraft:redstone_wire east=none;north=none;power=7;south=side;west=side minecraft:redstone_wire east=none;north=none;power=7;south=side;west=up minecraft:redstone_wire east=none;north=none;power=7;south=up;west=none minecraft:redstone_wire east=none;north=none;power=7;south=up;west=side minecraft:redstone_wire east=none;north=none;power=7;south=up;west=up minecraft:redstone_wire east=none;north=side;power=7;south=none;west=none minecraft:redstone_wire east=none;north=side;power=7;south=none;west=side minecraft:redstone_wire east=none;north=side;power=7;south=none;west=up minecraft:redstone_wire east=none;north=side;power=7;south=side;west=none minecraft:redstone_wire east=none;north=side;power=7;south=side;west=side minecraft:redstone_wire east=none;north=side;power=7;south=side;west=up minecraft:redstone_wire east=none;north=side;power=7;south=up;west=none minecraft:redstone_wire east=none;north=side;power=7;south=up;west=side minecraft:redstone_wire east=none;north=side;power=7;south=up;west=up minecraft:redstone_wire east=none;north=up;power=7;south=none;west=none minecraft:redstone_wire east=none;north=up;power=7;south=none;west=side minecraft:redstone_wire east=none;north=up;power=7;south=none;west=up minecraft:redstone_wire east=none;north=up;power=7;south=side;west=none minecraft:redstone_wire east=none;north=up;power=7;south=side;west=side minecraft:redstone_wire east=none;north=up;power=7;south=side;west=up minecraft:redstone_wire east=none;north=up;power=7;south=up;west=none minecraft:redstone_wire east=none;north=up;power=7;south=up;west=side minecraft:redstone_wire east=none;north=up;power=7;south=up;west=up minecraft:redstone_wire east=side;north=none;power=7;south=none;west=none minecraft:redstone_wire east=side;north=none;power=7;south=none;west=side minecraft:redstone_wire east=side;north=none;power=7;south=none;west=up minecraft:redstone_wire east=side;north=none;power=7;south=side;west=none minecraft:redstone_wire east=side;north=none;power=7;south=side;west=side minecraft:redstone_wire east=side;north=none;power=7;south=side;west=up minecraft:redstone_wire east=side;north=none;power=7;south=up;west=none minecraft:redstone_wire east=side;north=none;power=7;south=up;west=side minecraft:redstone_wire east=side;north=none;power=7;south=up;west=up minecraft:redstone_wire east=side;north=side;power=7;south=none;west=none minecraft:redstone_wire east=side;north=side;power=7;south=none;west=side minecraft:redstone_wire east=side;north=side;power=7;south=none;west=up minecraft:redstone_wire east=side;north=side;power=7;south=side;west=none minecraft:redstone_wire east=side;north=side;power=7;south=side;west=side minecraft:redstone_wire east=side;north=side;power=7;south=side;west=up minecraft:redstone_wire east=side;north=side;power=7;south=up;west=none minecraft:redstone_wire east=side;north=side;power=7;south=up;west=side minecraft:redstone_wire east=side;north=side;power=7;south=up;west=up minecraft:redstone_wire east=side;north=up;power=7;south=none;west=none minecraft:redstone_wire east=side;north=up;power=7;south=none;west=side minecraft:redstone_wire east=side;north=up;power=7;south=none;west=up minecraft:redstone_wire east=side;north=up;power=7;south=side;west=none minecraft:redstone_wire east=side;north=up;power=7;south=side;west=side minecraft:redstone_wire east=side;north=up;power=7;south=side;west=up minecraft:redstone_wire east=side;north=up;power=7;south=up;west=none minecraft:redstone_wire east=side;north=up;power=7;south=up;west=side minecraft:redstone_wire east=side;north=up;power=7;south=up;west=up minecraft:redstone_wire east=up;north=none;power=7;south=none;west=none minecraft:redstone_wire east=up;north=none;power=7;south=none;west=side minecraft:redstone_wire east=up;north=none;power=7;south=none;west=up minecraft:redstone_wire east=up;north=none;power=7;south=side;west=none minecraft:redstone_wire east=up;north=none;power=7;south=side;west=side minecraft:redstone_wire east=up;north=none;power=7;south=side;west=up minecraft:redstone_wire east=up;north=none;power=7;south=up;west=none minecraft:redstone_wire east=up;north=none;power=7;south=up;west=side minecraft:redstone_wire east=up;north=none;power=7;south=up;west=up minecraft:redstone_wire east=up;north=side;power=7;south=none;west=none minecraft:redstone_wire east=up;north=side;power=7;south=none;west=side minecraft:redstone_wire east=up;north=side;power=7;south=none;west=up minecraft:redstone_wire east=up;north=side;power=7;south=side;west=none minecraft:redstone_wire east=up;north=side;power=7;south=side;west=side minecraft:redstone_wire east=up;north=side;power=7;south=side;west=up minecraft:redstone_wire east=up;north=side;power=7;south=up;west=none minecraft:redstone_wire east=up;north=side;power=7;south=up;west=side minecraft:redstone_wire east=up;north=side;power=7;south=up;west=up minecraft:redstone_wire east=up;north=up;power=7;south=none;west=none minecraft:redstone_wire east=up;north=up;power=7;south=none;west=side minecraft:redstone_wire east=up;north=up;power=7;south=none;west=up minecraft:redstone_wire east=up;north=up;power=7;south=side;west=none minecraft:redstone_wire east=up;north=up;power=7;south=side;west=side minecraft:redstone_wire east=up;north=up;power=7;south=side;west=up minecraft:redstone_wire east=up;north=up;power=7;south=up;west=none minecraft:redstone_wire east=up;north=up;power=7;south=up;west=side minecraft:redstone_wire east=up;north=up;power=7;south=up;west=up +888 minecraft:redstone_wire east=none;north=none;power=8;south=none;west=none minecraft:redstone_wire east=none;north=none;power=8;south=none;west=none minecraft:redstone_wire east=none;north=none;power=8;south=none;west=side minecraft:redstone_wire east=none;north=none;power=8;south=none;west=up minecraft:redstone_wire east=none;north=none;power=8;south=side;west=none minecraft:redstone_wire east=none;north=none;power=8;south=side;west=side minecraft:redstone_wire east=none;north=none;power=8;south=side;west=up minecraft:redstone_wire east=none;north=none;power=8;south=up;west=none minecraft:redstone_wire east=none;north=none;power=8;south=up;west=side minecraft:redstone_wire east=none;north=none;power=8;south=up;west=up minecraft:redstone_wire east=none;north=side;power=8;south=none;west=none minecraft:redstone_wire east=none;north=side;power=8;south=none;west=side minecraft:redstone_wire east=none;north=side;power=8;south=none;west=up minecraft:redstone_wire east=none;north=side;power=8;south=side;west=none minecraft:redstone_wire east=none;north=side;power=8;south=side;west=side minecraft:redstone_wire east=none;north=side;power=8;south=side;west=up minecraft:redstone_wire east=none;north=side;power=8;south=up;west=none minecraft:redstone_wire east=none;north=side;power=8;south=up;west=side minecraft:redstone_wire east=none;north=side;power=8;south=up;west=up minecraft:redstone_wire east=none;north=up;power=8;south=none;west=none minecraft:redstone_wire east=none;north=up;power=8;south=none;west=side minecraft:redstone_wire east=none;north=up;power=8;south=none;west=up minecraft:redstone_wire east=none;north=up;power=8;south=side;west=none minecraft:redstone_wire east=none;north=up;power=8;south=side;west=side minecraft:redstone_wire east=none;north=up;power=8;south=side;west=up minecraft:redstone_wire east=none;north=up;power=8;south=up;west=none minecraft:redstone_wire east=none;north=up;power=8;south=up;west=side minecraft:redstone_wire east=none;north=up;power=8;south=up;west=up minecraft:redstone_wire east=side;north=none;power=8;south=none;west=none minecraft:redstone_wire east=side;north=none;power=8;south=none;west=side minecraft:redstone_wire east=side;north=none;power=8;south=none;west=up minecraft:redstone_wire east=side;north=none;power=8;south=side;west=none minecraft:redstone_wire east=side;north=none;power=8;south=side;west=side minecraft:redstone_wire east=side;north=none;power=8;south=side;west=up minecraft:redstone_wire east=side;north=none;power=8;south=up;west=none minecraft:redstone_wire east=side;north=none;power=8;south=up;west=side minecraft:redstone_wire east=side;north=none;power=8;south=up;west=up minecraft:redstone_wire east=side;north=side;power=8;south=none;west=none minecraft:redstone_wire east=side;north=side;power=8;south=none;west=side minecraft:redstone_wire east=side;north=side;power=8;south=none;west=up minecraft:redstone_wire east=side;north=side;power=8;south=side;west=none minecraft:redstone_wire east=side;north=side;power=8;south=side;west=side minecraft:redstone_wire east=side;north=side;power=8;south=side;west=up minecraft:redstone_wire east=side;north=side;power=8;south=up;west=none minecraft:redstone_wire east=side;north=side;power=8;south=up;west=side minecraft:redstone_wire east=side;north=side;power=8;south=up;west=up minecraft:redstone_wire east=side;north=up;power=8;south=none;west=none minecraft:redstone_wire east=side;north=up;power=8;south=none;west=side minecraft:redstone_wire east=side;north=up;power=8;south=none;west=up minecraft:redstone_wire east=side;north=up;power=8;south=side;west=none minecraft:redstone_wire east=side;north=up;power=8;south=side;west=side minecraft:redstone_wire east=side;north=up;power=8;south=side;west=up minecraft:redstone_wire east=side;north=up;power=8;south=up;west=none minecraft:redstone_wire east=side;north=up;power=8;south=up;west=side minecraft:redstone_wire east=side;north=up;power=8;south=up;west=up minecraft:redstone_wire east=up;north=none;power=8;south=none;west=none minecraft:redstone_wire east=up;north=none;power=8;south=none;west=side minecraft:redstone_wire east=up;north=none;power=8;south=none;west=up minecraft:redstone_wire east=up;north=none;power=8;south=side;west=none minecraft:redstone_wire east=up;north=none;power=8;south=side;west=side minecraft:redstone_wire east=up;north=none;power=8;south=side;west=up minecraft:redstone_wire east=up;north=none;power=8;south=up;west=none minecraft:redstone_wire east=up;north=none;power=8;south=up;west=side minecraft:redstone_wire east=up;north=none;power=8;south=up;west=up minecraft:redstone_wire east=up;north=side;power=8;south=none;west=none minecraft:redstone_wire east=up;north=side;power=8;south=none;west=side minecraft:redstone_wire east=up;north=side;power=8;south=none;west=up minecraft:redstone_wire east=up;north=side;power=8;south=side;west=none minecraft:redstone_wire east=up;north=side;power=8;south=side;west=side minecraft:redstone_wire east=up;north=side;power=8;south=side;west=up minecraft:redstone_wire east=up;north=side;power=8;south=up;west=none minecraft:redstone_wire east=up;north=side;power=8;south=up;west=side minecraft:redstone_wire east=up;north=side;power=8;south=up;west=up minecraft:redstone_wire east=up;north=up;power=8;south=none;west=none minecraft:redstone_wire east=up;north=up;power=8;south=none;west=side minecraft:redstone_wire east=up;north=up;power=8;south=none;west=up minecraft:redstone_wire east=up;north=up;power=8;south=side;west=none minecraft:redstone_wire east=up;north=up;power=8;south=side;west=side minecraft:redstone_wire east=up;north=up;power=8;south=side;west=up minecraft:redstone_wire east=up;north=up;power=8;south=up;west=none minecraft:redstone_wire east=up;north=up;power=8;south=up;west=side minecraft:redstone_wire east=up;north=up;power=8;south=up;west=up +889 minecraft:redstone_wire east=none;north=none;power=9;south=none;west=none minecraft:redstone_wire east=none;north=none;power=9;south=none;west=none minecraft:redstone_wire east=none;north=none;power=9;south=none;west=side minecraft:redstone_wire east=none;north=none;power=9;south=none;west=up minecraft:redstone_wire east=none;north=none;power=9;south=side;west=none minecraft:redstone_wire east=none;north=none;power=9;south=side;west=side minecraft:redstone_wire east=none;north=none;power=9;south=side;west=up minecraft:redstone_wire east=none;north=none;power=9;south=up;west=none minecraft:redstone_wire east=none;north=none;power=9;south=up;west=side minecraft:redstone_wire east=none;north=none;power=9;south=up;west=up minecraft:redstone_wire east=none;north=side;power=9;south=none;west=none minecraft:redstone_wire east=none;north=side;power=9;south=none;west=side minecraft:redstone_wire east=none;north=side;power=9;south=none;west=up minecraft:redstone_wire east=none;north=side;power=9;south=side;west=none minecraft:redstone_wire east=none;north=side;power=9;south=side;west=side minecraft:redstone_wire east=none;north=side;power=9;south=side;west=up minecraft:redstone_wire east=none;north=side;power=9;south=up;west=none minecraft:redstone_wire east=none;north=side;power=9;south=up;west=side minecraft:redstone_wire east=none;north=side;power=9;south=up;west=up minecraft:redstone_wire east=none;north=up;power=9;south=none;west=none minecraft:redstone_wire east=none;north=up;power=9;south=none;west=side minecraft:redstone_wire east=none;north=up;power=9;south=none;west=up minecraft:redstone_wire east=none;north=up;power=9;south=side;west=none minecraft:redstone_wire east=none;north=up;power=9;south=side;west=side minecraft:redstone_wire east=none;north=up;power=9;south=side;west=up minecraft:redstone_wire east=none;north=up;power=9;south=up;west=none minecraft:redstone_wire east=none;north=up;power=9;south=up;west=side minecraft:redstone_wire east=none;north=up;power=9;south=up;west=up minecraft:redstone_wire east=side;north=none;power=9;south=none;west=none minecraft:redstone_wire east=side;north=none;power=9;south=none;west=side minecraft:redstone_wire east=side;north=none;power=9;south=none;west=up minecraft:redstone_wire east=side;north=none;power=9;south=side;west=none minecraft:redstone_wire east=side;north=none;power=9;south=side;west=side minecraft:redstone_wire east=side;north=none;power=9;south=side;west=up minecraft:redstone_wire east=side;north=none;power=9;south=up;west=none minecraft:redstone_wire east=side;north=none;power=9;south=up;west=side minecraft:redstone_wire east=side;north=none;power=9;south=up;west=up minecraft:redstone_wire east=side;north=side;power=9;south=none;west=none minecraft:redstone_wire east=side;north=side;power=9;south=none;west=side minecraft:redstone_wire east=side;north=side;power=9;south=none;west=up minecraft:redstone_wire east=side;north=side;power=9;south=side;west=none minecraft:redstone_wire east=side;north=side;power=9;south=side;west=side minecraft:redstone_wire east=side;north=side;power=9;south=side;west=up minecraft:redstone_wire east=side;north=side;power=9;south=up;west=none minecraft:redstone_wire east=side;north=side;power=9;south=up;west=side minecraft:redstone_wire east=side;north=side;power=9;south=up;west=up minecraft:redstone_wire east=side;north=up;power=9;south=none;west=none minecraft:redstone_wire east=side;north=up;power=9;south=none;west=side minecraft:redstone_wire east=side;north=up;power=9;south=none;west=up minecraft:redstone_wire east=side;north=up;power=9;south=side;west=none minecraft:redstone_wire east=side;north=up;power=9;south=side;west=side minecraft:redstone_wire east=side;north=up;power=9;south=side;west=up minecraft:redstone_wire east=side;north=up;power=9;south=up;west=none minecraft:redstone_wire east=side;north=up;power=9;south=up;west=side minecraft:redstone_wire east=side;north=up;power=9;south=up;west=up minecraft:redstone_wire east=up;north=none;power=9;south=none;west=none minecraft:redstone_wire east=up;north=none;power=9;south=none;west=side minecraft:redstone_wire east=up;north=none;power=9;south=none;west=up minecraft:redstone_wire east=up;north=none;power=9;south=side;west=none minecraft:redstone_wire east=up;north=none;power=9;south=side;west=side minecraft:redstone_wire east=up;north=none;power=9;south=side;west=up minecraft:redstone_wire east=up;north=none;power=9;south=up;west=none minecraft:redstone_wire east=up;north=none;power=9;south=up;west=side minecraft:redstone_wire east=up;north=none;power=9;south=up;west=up minecraft:redstone_wire east=up;north=side;power=9;south=none;west=none minecraft:redstone_wire east=up;north=side;power=9;south=none;west=side minecraft:redstone_wire east=up;north=side;power=9;south=none;west=up minecraft:redstone_wire east=up;north=side;power=9;south=side;west=none minecraft:redstone_wire east=up;north=side;power=9;south=side;west=side minecraft:redstone_wire east=up;north=side;power=9;south=side;west=up minecraft:redstone_wire east=up;north=side;power=9;south=up;west=none minecraft:redstone_wire east=up;north=side;power=9;south=up;west=side minecraft:redstone_wire east=up;north=side;power=9;south=up;west=up minecraft:redstone_wire east=up;north=up;power=9;south=none;west=none minecraft:redstone_wire east=up;north=up;power=9;south=none;west=side minecraft:redstone_wire east=up;north=up;power=9;south=none;west=up minecraft:redstone_wire east=up;north=up;power=9;south=side;west=none minecraft:redstone_wire east=up;north=up;power=9;south=side;west=side minecraft:redstone_wire east=up;north=up;power=9;south=side;west=up minecraft:redstone_wire east=up;north=up;power=9;south=up;west=none minecraft:redstone_wire east=up;north=up;power=9;south=up;west=side minecraft:redstone_wire east=up;north=up;power=9;south=up;west=up +890 minecraft:redstone_wire east=none;north=none;power=10;south=none;west=none minecraft:redstone_wire east=none;north=none;power=10;south=none;west=none minecraft:redstone_wire east=none;north=none;power=10;south=none;west=side minecraft:redstone_wire east=none;north=none;power=10;south=none;west=up minecraft:redstone_wire east=none;north=none;power=10;south=side;west=none minecraft:redstone_wire east=none;north=none;power=10;south=side;west=side minecraft:redstone_wire east=none;north=none;power=10;south=side;west=up minecraft:redstone_wire east=none;north=none;power=10;south=up;west=none minecraft:redstone_wire east=none;north=none;power=10;south=up;west=side minecraft:redstone_wire east=none;north=none;power=10;south=up;west=up minecraft:redstone_wire east=none;north=side;power=10;south=none;west=none minecraft:redstone_wire east=none;north=side;power=10;south=none;west=side minecraft:redstone_wire east=none;north=side;power=10;south=none;west=up minecraft:redstone_wire east=none;north=side;power=10;south=side;west=none minecraft:redstone_wire east=none;north=side;power=10;south=side;west=side minecraft:redstone_wire east=none;north=side;power=10;south=side;west=up minecraft:redstone_wire east=none;north=side;power=10;south=up;west=none minecraft:redstone_wire east=none;north=side;power=10;south=up;west=side minecraft:redstone_wire east=none;north=side;power=10;south=up;west=up minecraft:redstone_wire east=none;north=up;power=10;south=none;west=none minecraft:redstone_wire east=none;north=up;power=10;south=none;west=side minecraft:redstone_wire east=none;north=up;power=10;south=none;west=up minecraft:redstone_wire east=none;north=up;power=10;south=side;west=none minecraft:redstone_wire east=none;north=up;power=10;south=side;west=side minecraft:redstone_wire east=none;north=up;power=10;south=side;west=up minecraft:redstone_wire east=none;north=up;power=10;south=up;west=none minecraft:redstone_wire east=none;north=up;power=10;south=up;west=side minecraft:redstone_wire east=none;north=up;power=10;south=up;west=up minecraft:redstone_wire east=side;north=none;power=10;south=none;west=none minecraft:redstone_wire east=side;north=none;power=10;south=none;west=side minecraft:redstone_wire east=side;north=none;power=10;south=none;west=up minecraft:redstone_wire east=side;north=none;power=10;south=side;west=none minecraft:redstone_wire east=side;north=none;power=10;south=side;west=side minecraft:redstone_wire east=side;north=none;power=10;south=side;west=up minecraft:redstone_wire east=side;north=none;power=10;south=up;west=none minecraft:redstone_wire east=side;north=none;power=10;south=up;west=side minecraft:redstone_wire east=side;north=none;power=10;south=up;west=up minecraft:redstone_wire east=side;north=side;power=10;south=none;west=none minecraft:redstone_wire east=side;north=side;power=10;south=none;west=side minecraft:redstone_wire east=side;north=side;power=10;south=none;west=up minecraft:redstone_wire east=side;north=side;power=10;south=side;west=none minecraft:redstone_wire east=side;north=side;power=10;south=side;west=side minecraft:redstone_wire east=side;north=side;power=10;south=side;west=up minecraft:redstone_wire east=side;north=side;power=10;south=up;west=none minecraft:redstone_wire east=side;north=side;power=10;south=up;west=side minecraft:redstone_wire east=side;north=side;power=10;south=up;west=up minecraft:redstone_wire east=side;north=up;power=10;south=none;west=none minecraft:redstone_wire east=side;north=up;power=10;south=none;west=side minecraft:redstone_wire east=side;north=up;power=10;south=none;west=up minecraft:redstone_wire east=side;north=up;power=10;south=side;west=none minecraft:redstone_wire east=side;north=up;power=10;south=side;west=side minecraft:redstone_wire east=side;north=up;power=10;south=side;west=up minecraft:redstone_wire east=side;north=up;power=10;south=up;west=none minecraft:redstone_wire east=side;north=up;power=10;south=up;west=side minecraft:redstone_wire east=side;north=up;power=10;south=up;west=up minecraft:redstone_wire east=up;north=none;power=10;south=none;west=none minecraft:redstone_wire east=up;north=none;power=10;south=none;west=side minecraft:redstone_wire east=up;north=none;power=10;south=none;west=up minecraft:redstone_wire east=up;north=none;power=10;south=side;west=none minecraft:redstone_wire east=up;north=none;power=10;south=side;west=side minecraft:redstone_wire east=up;north=none;power=10;south=side;west=up minecraft:redstone_wire east=up;north=none;power=10;south=up;west=none minecraft:redstone_wire east=up;north=none;power=10;south=up;west=side minecraft:redstone_wire east=up;north=none;power=10;south=up;west=up minecraft:redstone_wire east=up;north=side;power=10;south=none;west=none minecraft:redstone_wire east=up;north=side;power=10;south=none;west=side minecraft:redstone_wire east=up;north=side;power=10;south=none;west=up minecraft:redstone_wire east=up;north=side;power=10;south=side;west=none minecraft:redstone_wire east=up;north=side;power=10;south=side;west=side minecraft:redstone_wire east=up;north=side;power=10;south=side;west=up minecraft:redstone_wire east=up;north=side;power=10;south=up;west=none minecraft:redstone_wire east=up;north=side;power=10;south=up;west=side minecraft:redstone_wire east=up;north=side;power=10;south=up;west=up minecraft:redstone_wire east=up;north=up;power=10;south=none;west=none minecraft:redstone_wire east=up;north=up;power=10;south=none;west=side minecraft:redstone_wire east=up;north=up;power=10;south=none;west=up minecraft:redstone_wire east=up;north=up;power=10;south=side;west=none minecraft:redstone_wire east=up;north=up;power=10;south=side;west=side minecraft:redstone_wire east=up;north=up;power=10;south=side;west=up minecraft:redstone_wire east=up;north=up;power=10;south=up;west=none minecraft:redstone_wire east=up;north=up;power=10;south=up;west=side minecraft:redstone_wire east=up;north=up;power=10;south=up;west=up +891 minecraft:redstone_wire east=none;north=none;power=11;south=none;west=none minecraft:redstone_wire east=none;north=none;power=11;south=none;west=none minecraft:redstone_wire east=none;north=none;power=11;south=none;west=side minecraft:redstone_wire east=none;north=none;power=11;south=none;west=up minecraft:redstone_wire east=none;north=none;power=11;south=side;west=none minecraft:redstone_wire east=none;north=none;power=11;south=side;west=side minecraft:redstone_wire east=none;north=none;power=11;south=side;west=up minecraft:redstone_wire east=none;north=none;power=11;south=up;west=none minecraft:redstone_wire east=none;north=none;power=11;south=up;west=side minecraft:redstone_wire east=none;north=none;power=11;south=up;west=up minecraft:redstone_wire east=none;north=side;power=11;south=none;west=none minecraft:redstone_wire east=none;north=side;power=11;south=none;west=side minecraft:redstone_wire east=none;north=side;power=11;south=none;west=up minecraft:redstone_wire east=none;north=side;power=11;south=side;west=none minecraft:redstone_wire east=none;north=side;power=11;south=side;west=side minecraft:redstone_wire east=none;north=side;power=11;south=side;west=up minecraft:redstone_wire east=none;north=side;power=11;south=up;west=none minecraft:redstone_wire east=none;north=side;power=11;south=up;west=side minecraft:redstone_wire east=none;north=side;power=11;south=up;west=up minecraft:redstone_wire east=none;north=up;power=11;south=none;west=none minecraft:redstone_wire east=none;north=up;power=11;south=none;west=side minecraft:redstone_wire east=none;north=up;power=11;south=none;west=up minecraft:redstone_wire east=none;north=up;power=11;south=side;west=none minecraft:redstone_wire east=none;north=up;power=11;south=side;west=side minecraft:redstone_wire east=none;north=up;power=11;south=side;west=up minecraft:redstone_wire east=none;north=up;power=11;south=up;west=none minecraft:redstone_wire east=none;north=up;power=11;south=up;west=side minecraft:redstone_wire east=none;north=up;power=11;south=up;west=up minecraft:redstone_wire east=side;north=none;power=11;south=none;west=none minecraft:redstone_wire east=side;north=none;power=11;south=none;west=side minecraft:redstone_wire east=side;north=none;power=11;south=none;west=up minecraft:redstone_wire east=side;north=none;power=11;south=side;west=none minecraft:redstone_wire east=side;north=none;power=11;south=side;west=side minecraft:redstone_wire east=side;north=none;power=11;south=side;west=up minecraft:redstone_wire east=side;north=none;power=11;south=up;west=none minecraft:redstone_wire east=side;north=none;power=11;south=up;west=side minecraft:redstone_wire east=side;north=none;power=11;south=up;west=up minecraft:redstone_wire east=side;north=side;power=11;south=none;west=none minecraft:redstone_wire east=side;north=side;power=11;south=none;west=side minecraft:redstone_wire east=side;north=side;power=11;south=none;west=up minecraft:redstone_wire east=side;north=side;power=11;south=side;west=none minecraft:redstone_wire east=side;north=side;power=11;south=side;west=side minecraft:redstone_wire east=side;north=side;power=11;south=side;west=up minecraft:redstone_wire east=side;north=side;power=11;south=up;west=none minecraft:redstone_wire east=side;north=side;power=11;south=up;west=side minecraft:redstone_wire east=side;north=side;power=11;south=up;west=up minecraft:redstone_wire east=side;north=up;power=11;south=none;west=none minecraft:redstone_wire east=side;north=up;power=11;south=none;west=side minecraft:redstone_wire east=side;north=up;power=11;south=none;west=up minecraft:redstone_wire east=side;north=up;power=11;south=side;west=none minecraft:redstone_wire east=side;north=up;power=11;south=side;west=side minecraft:redstone_wire east=side;north=up;power=11;south=side;west=up minecraft:redstone_wire east=side;north=up;power=11;south=up;west=none minecraft:redstone_wire east=side;north=up;power=11;south=up;west=side minecraft:redstone_wire east=side;north=up;power=11;south=up;west=up minecraft:redstone_wire east=up;north=none;power=11;south=none;west=none minecraft:redstone_wire east=up;north=none;power=11;south=none;west=side minecraft:redstone_wire east=up;north=none;power=11;south=none;west=up minecraft:redstone_wire east=up;north=none;power=11;south=side;west=none minecraft:redstone_wire east=up;north=none;power=11;south=side;west=side minecraft:redstone_wire east=up;north=none;power=11;south=side;west=up minecraft:redstone_wire east=up;north=none;power=11;south=up;west=none minecraft:redstone_wire east=up;north=none;power=11;south=up;west=side minecraft:redstone_wire east=up;north=none;power=11;south=up;west=up minecraft:redstone_wire east=up;north=side;power=11;south=none;west=none minecraft:redstone_wire east=up;north=side;power=11;south=none;west=side minecraft:redstone_wire east=up;north=side;power=11;south=none;west=up minecraft:redstone_wire east=up;north=side;power=11;south=side;west=none minecraft:redstone_wire east=up;north=side;power=11;south=side;west=side minecraft:redstone_wire east=up;north=side;power=11;south=side;west=up minecraft:redstone_wire east=up;north=side;power=11;south=up;west=none minecraft:redstone_wire east=up;north=side;power=11;south=up;west=side minecraft:redstone_wire east=up;north=side;power=11;south=up;west=up minecraft:redstone_wire east=up;north=up;power=11;south=none;west=none minecraft:redstone_wire east=up;north=up;power=11;south=none;west=side minecraft:redstone_wire east=up;north=up;power=11;south=none;west=up minecraft:redstone_wire east=up;north=up;power=11;south=side;west=none minecraft:redstone_wire east=up;north=up;power=11;south=side;west=side minecraft:redstone_wire east=up;north=up;power=11;south=side;west=up minecraft:redstone_wire east=up;north=up;power=11;south=up;west=none minecraft:redstone_wire east=up;north=up;power=11;south=up;west=side minecraft:redstone_wire east=up;north=up;power=11;south=up;west=up +892 minecraft:redstone_wire east=none;north=none;power=12;south=none;west=none minecraft:redstone_wire east=none;north=none;power=12;south=none;west=none minecraft:redstone_wire east=none;north=none;power=12;south=none;west=side minecraft:redstone_wire east=none;north=none;power=12;south=none;west=up minecraft:redstone_wire east=none;north=none;power=12;south=side;west=none minecraft:redstone_wire east=none;north=none;power=12;south=side;west=side minecraft:redstone_wire east=none;north=none;power=12;south=side;west=up minecraft:redstone_wire east=none;north=none;power=12;south=up;west=none minecraft:redstone_wire east=none;north=none;power=12;south=up;west=side minecraft:redstone_wire east=none;north=none;power=12;south=up;west=up minecraft:redstone_wire east=none;north=side;power=12;south=none;west=none minecraft:redstone_wire east=none;north=side;power=12;south=none;west=side minecraft:redstone_wire east=none;north=side;power=12;south=none;west=up minecraft:redstone_wire east=none;north=side;power=12;south=side;west=none minecraft:redstone_wire east=none;north=side;power=12;south=side;west=side minecraft:redstone_wire east=none;north=side;power=12;south=side;west=up minecraft:redstone_wire east=none;north=side;power=12;south=up;west=none minecraft:redstone_wire east=none;north=side;power=12;south=up;west=side minecraft:redstone_wire east=none;north=side;power=12;south=up;west=up minecraft:redstone_wire east=none;north=up;power=12;south=none;west=none minecraft:redstone_wire east=none;north=up;power=12;south=none;west=side minecraft:redstone_wire east=none;north=up;power=12;south=none;west=up minecraft:redstone_wire east=none;north=up;power=12;south=side;west=none minecraft:redstone_wire east=none;north=up;power=12;south=side;west=side minecraft:redstone_wire east=none;north=up;power=12;south=side;west=up minecraft:redstone_wire east=none;north=up;power=12;south=up;west=none minecraft:redstone_wire east=none;north=up;power=12;south=up;west=side minecraft:redstone_wire east=none;north=up;power=12;south=up;west=up minecraft:redstone_wire east=side;north=none;power=12;south=none;west=none minecraft:redstone_wire east=side;north=none;power=12;south=none;west=side minecraft:redstone_wire east=side;north=none;power=12;south=none;west=up minecraft:redstone_wire east=side;north=none;power=12;south=side;west=none minecraft:redstone_wire east=side;north=none;power=12;south=side;west=side minecraft:redstone_wire east=side;north=none;power=12;south=side;west=up minecraft:redstone_wire east=side;north=none;power=12;south=up;west=none minecraft:redstone_wire east=side;north=none;power=12;south=up;west=side minecraft:redstone_wire east=side;north=none;power=12;south=up;west=up minecraft:redstone_wire east=side;north=side;power=12;south=none;west=none minecraft:redstone_wire east=side;north=side;power=12;south=none;west=side minecraft:redstone_wire east=side;north=side;power=12;south=none;west=up minecraft:redstone_wire east=side;north=side;power=12;south=side;west=none minecraft:redstone_wire east=side;north=side;power=12;south=side;west=side minecraft:redstone_wire east=side;north=side;power=12;south=side;west=up minecraft:redstone_wire east=side;north=side;power=12;south=up;west=none minecraft:redstone_wire east=side;north=side;power=12;south=up;west=side minecraft:redstone_wire east=side;north=side;power=12;south=up;west=up minecraft:redstone_wire east=side;north=up;power=12;south=none;west=none minecraft:redstone_wire east=side;north=up;power=12;south=none;west=side minecraft:redstone_wire east=side;north=up;power=12;south=none;west=up minecraft:redstone_wire east=side;north=up;power=12;south=side;west=none minecraft:redstone_wire east=side;north=up;power=12;south=side;west=side minecraft:redstone_wire east=side;north=up;power=12;south=side;west=up minecraft:redstone_wire east=side;north=up;power=12;south=up;west=none minecraft:redstone_wire east=side;north=up;power=12;south=up;west=side minecraft:redstone_wire east=side;north=up;power=12;south=up;west=up minecraft:redstone_wire east=up;north=none;power=12;south=none;west=none minecraft:redstone_wire east=up;north=none;power=12;south=none;west=side minecraft:redstone_wire east=up;north=none;power=12;south=none;west=up minecraft:redstone_wire east=up;north=none;power=12;south=side;west=none minecraft:redstone_wire east=up;north=none;power=12;south=side;west=side minecraft:redstone_wire east=up;north=none;power=12;south=side;west=up minecraft:redstone_wire east=up;north=none;power=12;south=up;west=none minecraft:redstone_wire east=up;north=none;power=12;south=up;west=side minecraft:redstone_wire east=up;north=none;power=12;south=up;west=up minecraft:redstone_wire east=up;north=side;power=12;south=none;west=none minecraft:redstone_wire east=up;north=side;power=12;south=none;west=side minecraft:redstone_wire east=up;north=side;power=12;south=none;west=up minecraft:redstone_wire east=up;north=side;power=12;south=side;west=none minecraft:redstone_wire east=up;north=side;power=12;south=side;west=side minecraft:redstone_wire east=up;north=side;power=12;south=side;west=up minecraft:redstone_wire east=up;north=side;power=12;south=up;west=none minecraft:redstone_wire east=up;north=side;power=12;south=up;west=side minecraft:redstone_wire east=up;north=side;power=12;south=up;west=up minecraft:redstone_wire east=up;north=up;power=12;south=none;west=none minecraft:redstone_wire east=up;north=up;power=12;south=none;west=side minecraft:redstone_wire east=up;north=up;power=12;south=none;west=up minecraft:redstone_wire east=up;north=up;power=12;south=side;west=none minecraft:redstone_wire east=up;north=up;power=12;south=side;west=side minecraft:redstone_wire east=up;north=up;power=12;south=side;west=up minecraft:redstone_wire east=up;north=up;power=12;south=up;west=none minecraft:redstone_wire east=up;north=up;power=12;south=up;west=side minecraft:redstone_wire east=up;north=up;power=12;south=up;west=up +893 minecraft:redstone_wire east=none;north=none;power=13;south=none;west=none minecraft:redstone_wire east=none;north=none;power=13;south=none;west=none minecraft:redstone_wire east=none;north=none;power=13;south=none;west=side minecraft:redstone_wire east=none;north=none;power=13;south=none;west=up minecraft:redstone_wire east=none;north=none;power=13;south=side;west=none minecraft:redstone_wire east=none;north=none;power=13;south=side;west=side minecraft:redstone_wire east=none;north=none;power=13;south=side;west=up minecraft:redstone_wire east=none;north=none;power=13;south=up;west=none minecraft:redstone_wire east=none;north=none;power=13;south=up;west=side minecraft:redstone_wire east=none;north=none;power=13;south=up;west=up minecraft:redstone_wire east=none;north=side;power=13;south=none;west=none minecraft:redstone_wire east=none;north=side;power=13;south=none;west=side minecraft:redstone_wire east=none;north=side;power=13;south=none;west=up minecraft:redstone_wire east=none;north=side;power=13;south=side;west=none minecraft:redstone_wire east=none;north=side;power=13;south=side;west=side minecraft:redstone_wire east=none;north=side;power=13;south=side;west=up minecraft:redstone_wire east=none;north=side;power=13;south=up;west=none minecraft:redstone_wire east=none;north=side;power=13;south=up;west=side minecraft:redstone_wire east=none;north=side;power=13;south=up;west=up minecraft:redstone_wire east=none;north=up;power=13;south=none;west=none minecraft:redstone_wire east=none;north=up;power=13;south=none;west=side minecraft:redstone_wire east=none;north=up;power=13;south=none;west=up minecraft:redstone_wire east=none;north=up;power=13;south=side;west=none minecraft:redstone_wire east=none;north=up;power=13;south=side;west=side minecraft:redstone_wire east=none;north=up;power=13;south=side;west=up minecraft:redstone_wire east=none;north=up;power=13;south=up;west=none minecraft:redstone_wire east=none;north=up;power=13;south=up;west=side minecraft:redstone_wire east=none;north=up;power=13;south=up;west=up minecraft:redstone_wire east=side;north=none;power=13;south=none;west=none minecraft:redstone_wire east=side;north=none;power=13;south=none;west=side minecraft:redstone_wire east=side;north=none;power=13;south=none;west=up minecraft:redstone_wire east=side;north=none;power=13;south=side;west=none minecraft:redstone_wire east=side;north=none;power=13;south=side;west=side minecraft:redstone_wire east=side;north=none;power=13;south=side;west=up minecraft:redstone_wire east=side;north=none;power=13;south=up;west=none minecraft:redstone_wire east=side;north=none;power=13;south=up;west=side minecraft:redstone_wire east=side;north=none;power=13;south=up;west=up minecraft:redstone_wire east=side;north=side;power=13;south=none;west=none minecraft:redstone_wire east=side;north=side;power=13;south=none;west=side minecraft:redstone_wire east=side;north=side;power=13;south=none;west=up minecraft:redstone_wire east=side;north=side;power=13;south=side;west=none minecraft:redstone_wire east=side;north=side;power=13;south=side;west=side minecraft:redstone_wire east=side;north=side;power=13;south=side;west=up minecraft:redstone_wire east=side;north=side;power=13;south=up;west=none minecraft:redstone_wire east=side;north=side;power=13;south=up;west=side minecraft:redstone_wire east=side;north=side;power=13;south=up;west=up minecraft:redstone_wire east=side;north=up;power=13;south=none;west=none minecraft:redstone_wire east=side;north=up;power=13;south=none;west=side minecraft:redstone_wire east=side;north=up;power=13;south=none;west=up minecraft:redstone_wire east=side;north=up;power=13;south=side;west=none minecraft:redstone_wire east=side;north=up;power=13;south=side;west=side minecraft:redstone_wire east=side;north=up;power=13;south=side;west=up minecraft:redstone_wire east=side;north=up;power=13;south=up;west=none minecraft:redstone_wire east=side;north=up;power=13;south=up;west=side minecraft:redstone_wire east=side;north=up;power=13;south=up;west=up minecraft:redstone_wire east=up;north=none;power=13;south=none;west=none minecraft:redstone_wire east=up;north=none;power=13;south=none;west=side minecraft:redstone_wire east=up;north=none;power=13;south=none;west=up minecraft:redstone_wire east=up;north=none;power=13;south=side;west=none minecraft:redstone_wire east=up;north=none;power=13;south=side;west=side minecraft:redstone_wire east=up;north=none;power=13;south=side;west=up minecraft:redstone_wire east=up;north=none;power=13;south=up;west=none minecraft:redstone_wire east=up;north=none;power=13;south=up;west=side minecraft:redstone_wire east=up;north=none;power=13;south=up;west=up minecraft:redstone_wire east=up;north=side;power=13;south=none;west=none minecraft:redstone_wire east=up;north=side;power=13;south=none;west=side minecraft:redstone_wire east=up;north=side;power=13;south=none;west=up minecraft:redstone_wire east=up;north=side;power=13;south=side;west=none minecraft:redstone_wire east=up;north=side;power=13;south=side;west=side minecraft:redstone_wire east=up;north=side;power=13;south=side;west=up minecraft:redstone_wire east=up;north=side;power=13;south=up;west=none minecraft:redstone_wire east=up;north=side;power=13;south=up;west=side minecraft:redstone_wire east=up;north=side;power=13;south=up;west=up minecraft:redstone_wire east=up;north=up;power=13;south=none;west=none minecraft:redstone_wire east=up;north=up;power=13;south=none;west=side minecraft:redstone_wire east=up;north=up;power=13;south=none;west=up minecraft:redstone_wire east=up;north=up;power=13;south=side;west=none minecraft:redstone_wire east=up;north=up;power=13;south=side;west=side minecraft:redstone_wire east=up;north=up;power=13;south=side;west=up minecraft:redstone_wire east=up;north=up;power=13;south=up;west=none minecraft:redstone_wire east=up;north=up;power=13;south=up;west=side minecraft:redstone_wire east=up;north=up;power=13;south=up;west=up +894 minecraft:redstone_wire east=none;north=none;power=14;south=none;west=none minecraft:redstone_wire east=none;north=none;power=14;south=none;west=none minecraft:redstone_wire east=none;north=none;power=14;south=none;west=side minecraft:redstone_wire east=none;north=none;power=14;south=none;west=up minecraft:redstone_wire east=none;north=none;power=14;south=side;west=none minecraft:redstone_wire east=none;north=none;power=14;south=side;west=side minecraft:redstone_wire east=none;north=none;power=14;south=side;west=up minecraft:redstone_wire east=none;north=none;power=14;south=up;west=none minecraft:redstone_wire east=none;north=none;power=14;south=up;west=side minecraft:redstone_wire east=none;north=none;power=14;south=up;west=up minecraft:redstone_wire east=none;north=side;power=14;south=none;west=none minecraft:redstone_wire east=none;north=side;power=14;south=none;west=side minecraft:redstone_wire east=none;north=side;power=14;south=none;west=up minecraft:redstone_wire east=none;north=side;power=14;south=side;west=none minecraft:redstone_wire east=none;north=side;power=14;south=side;west=side minecraft:redstone_wire east=none;north=side;power=14;south=side;west=up minecraft:redstone_wire east=none;north=side;power=14;south=up;west=none minecraft:redstone_wire east=none;north=side;power=14;south=up;west=side minecraft:redstone_wire east=none;north=side;power=14;south=up;west=up minecraft:redstone_wire east=none;north=up;power=14;south=none;west=none minecraft:redstone_wire east=none;north=up;power=14;south=none;west=side minecraft:redstone_wire east=none;north=up;power=14;south=none;west=up minecraft:redstone_wire east=none;north=up;power=14;south=side;west=none minecraft:redstone_wire east=none;north=up;power=14;south=side;west=side minecraft:redstone_wire east=none;north=up;power=14;south=side;west=up minecraft:redstone_wire east=none;north=up;power=14;south=up;west=none minecraft:redstone_wire east=none;north=up;power=14;south=up;west=side minecraft:redstone_wire east=none;north=up;power=14;south=up;west=up minecraft:redstone_wire east=side;north=none;power=14;south=none;west=none minecraft:redstone_wire east=side;north=none;power=14;south=none;west=side minecraft:redstone_wire east=side;north=none;power=14;south=none;west=up minecraft:redstone_wire east=side;north=none;power=14;south=side;west=none minecraft:redstone_wire east=side;north=none;power=14;south=side;west=side minecraft:redstone_wire east=side;north=none;power=14;south=side;west=up minecraft:redstone_wire east=side;north=none;power=14;south=up;west=none minecraft:redstone_wire east=side;north=none;power=14;south=up;west=side minecraft:redstone_wire east=side;north=none;power=14;south=up;west=up minecraft:redstone_wire east=side;north=side;power=14;south=none;west=none minecraft:redstone_wire east=side;north=side;power=14;south=none;west=side minecraft:redstone_wire east=side;north=side;power=14;south=none;west=up minecraft:redstone_wire east=side;north=side;power=14;south=side;west=none minecraft:redstone_wire east=side;north=side;power=14;south=side;west=side minecraft:redstone_wire east=side;north=side;power=14;south=side;west=up minecraft:redstone_wire east=side;north=side;power=14;south=up;west=none minecraft:redstone_wire east=side;north=side;power=14;south=up;west=side minecraft:redstone_wire east=side;north=side;power=14;south=up;west=up minecraft:redstone_wire east=side;north=up;power=14;south=none;west=none minecraft:redstone_wire east=side;north=up;power=14;south=none;west=side minecraft:redstone_wire east=side;north=up;power=14;south=none;west=up minecraft:redstone_wire east=side;north=up;power=14;south=side;west=none minecraft:redstone_wire east=side;north=up;power=14;south=side;west=side minecraft:redstone_wire east=side;north=up;power=14;south=side;west=up minecraft:redstone_wire east=side;north=up;power=14;south=up;west=none minecraft:redstone_wire east=side;north=up;power=14;south=up;west=side minecraft:redstone_wire east=side;north=up;power=14;south=up;west=up minecraft:redstone_wire east=up;north=none;power=14;south=none;west=none minecraft:redstone_wire east=up;north=none;power=14;south=none;west=side minecraft:redstone_wire east=up;north=none;power=14;south=none;west=up minecraft:redstone_wire east=up;north=none;power=14;south=side;west=none minecraft:redstone_wire east=up;north=none;power=14;south=side;west=side minecraft:redstone_wire east=up;north=none;power=14;south=side;west=up minecraft:redstone_wire east=up;north=none;power=14;south=up;west=none minecraft:redstone_wire east=up;north=none;power=14;south=up;west=side minecraft:redstone_wire east=up;north=none;power=14;south=up;west=up minecraft:redstone_wire east=up;north=side;power=14;south=none;west=none minecraft:redstone_wire east=up;north=side;power=14;south=none;west=side minecraft:redstone_wire east=up;north=side;power=14;south=none;west=up minecraft:redstone_wire east=up;north=side;power=14;south=side;west=none minecraft:redstone_wire east=up;north=side;power=14;south=side;west=side minecraft:redstone_wire east=up;north=side;power=14;south=side;west=up minecraft:redstone_wire east=up;north=side;power=14;south=up;west=none minecraft:redstone_wire east=up;north=side;power=14;south=up;west=side minecraft:redstone_wire east=up;north=side;power=14;south=up;west=up minecraft:redstone_wire east=up;north=up;power=14;south=none;west=none minecraft:redstone_wire east=up;north=up;power=14;south=none;west=side minecraft:redstone_wire east=up;north=up;power=14;south=none;west=up minecraft:redstone_wire east=up;north=up;power=14;south=side;west=none minecraft:redstone_wire east=up;north=up;power=14;south=side;west=side minecraft:redstone_wire east=up;north=up;power=14;south=side;west=up minecraft:redstone_wire east=up;north=up;power=14;south=up;west=none minecraft:redstone_wire east=up;north=up;power=14;south=up;west=side minecraft:redstone_wire east=up;north=up;power=14;south=up;west=up +895 minecraft:redstone_wire east=none;north=none;power=15;south=none;west=none minecraft:redstone_wire east=none;north=none;power=15;south=none;west=none minecraft:redstone_wire east=none;north=none;power=15;south=none;west=side minecraft:redstone_wire east=none;north=none;power=15;south=none;west=up minecraft:redstone_wire east=none;north=none;power=15;south=side;west=none minecraft:redstone_wire east=none;north=none;power=15;south=side;west=side minecraft:redstone_wire east=none;north=none;power=15;south=side;west=up minecraft:redstone_wire east=none;north=none;power=15;south=up;west=none minecraft:redstone_wire east=none;north=none;power=15;south=up;west=side minecraft:redstone_wire east=none;north=none;power=15;south=up;west=up minecraft:redstone_wire east=none;north=side;power=15;south=none;west=none minecraft:redstone_wire east=none;north=side;power=15;south=none;west=side minecraft:redstone_wire east=none;north=side;power=15;south=none;west=up minecraft:redstone_wire east=none;north=side;power=15;south=side;west=none minecraft:redstone_wire east=none;north=side;power=15;south=side;west=side minecraft:redstone_wire east=none;north=side;power=15;south=side;west=up minecraft:redstone_wire east=none;north=side;power=15;south=up;west=none minecraft:redstone_wire east=none;north=side;power=15;south=up;west=side minecraft:redstone_wire east=none;north=side;power=15;south=up;west=up minecraft:redstone_wire east=none;north=up;power=15;south=none;west=none minecraft:redstone_wire east=none;north=up;power=15;south=none;west=side minecraft:redstone_wire east=none;north=up;power=15;south=none;west=up minecraft:redstone_wire east=none;north=up;power=15;south=side;west=none minecraft:redstone_wire east=none;north=up;power=15;south=side;west=side minecraft:redstone_wire east=none;north=up;power=15;south=side;west=up minecraft:redstone_wire east=none;north=up;power=15;south=up;west=none minecraft:redstone_wire east=none;north=up;power=15;south=up;west=side minecraft:redstone_wire east=none;north=up;power=15;south=up;west=up minecraft:redstone_wire east=side;north=none;power=15;south=none;west=none minecraft:redstone_wire east=side;north=none;power=15;south=none;west=side minecraft:redstone_wire east=side;north=none;power=15;south=none;west=up minecraft:redstone_wire east=side;north=none;power=15;south=side;west=none minecraft:redstone_wire east=side;north=none;power=15;south=side;west=side minecraft:redstone_wire east=side;north=none;power=15;south=side;west=up minecraft:redstone_wire east=side;north=none;power=15;south=up;west=none minecraft:redstone_wire east=side;north=none;power=15;south=up;west=side minecraft:redstone_wire east=side;north=none;power=15;south=up;west=up minecraft:redstone_wire east=side;north=side;power=15;south=none;west=none minecraft:redstone_wire east=side;north=side;power=15;south=none;west=side minecraft:redstone_wire east=side;north=side;power=15;south=none;west=up minecraft:redstone_wire east=side;north=side;power=15;south=side;west=none minecraft:redstone_wire east=side;north=side;power=15;south=side;west=side minecraft:redstone_wire east=side;north=side;power=15;south=side;west=up minecraft:redstone_wire east=side;north=side;power=15;south=up;west=none minecraft:redstone_wire east=side;north=side;power=15;south=up;west=side minecraft:redstone_wire east=side;north=side;power=15;south=up;west=up minecraft:redstone_wire east=side;north=up;power=15;south=none;west=none minecraft:redstone_wire east=side;north=up;power=15;south=none;west=side minecraft:redstone_wire east=side;north=up;power=15;south=none;west=up minecraft:redstone_wire east=side;north=up;power=15;south=side;west=none minecraft:redstone_wire east=side;north=up;power=15;south=side;west=side minecraft:redstone_wire east=side;north=up;power=15;south=side;west=up minecraft:redstone_wire east=side;north=up;power=15;south=up;west=none minecraft:redstone_wire east=side;north=up;power=15;south=up;west=side minecraft:redstone_wire east=side;north=up;power=15;south=up;west=up minecraft:redstone_wire east=up;north=none;power=15;south=none;west=none minecraft:redstone_wire east=up;north=none;power=15;south=none;west=side minecraft:redstone_wire east=up;north=none;power=15;south=none;west=up minecraft:redstone_wire east=up;north=none;power=15;south=side;west=none minecraft:redstone_wire east=up;north=none;power=15;south=side;west=side minecraft:redstone_wire east=up;north=none;power=15;south=side;west=up minecraft:redstone_wire east=up;north=none;power=15;south=up;west=none minecraft:redstone_wire east=up;north=none;power=15;south=up;west=side minecraft:redstone_wire east=up;north=none;power=15;south=up;west=up minecraft:redstone_wire east=up;north=side;power=15;south=none;west=none minecraft:redstone_wire east=up;north=side;power=15;south=none;west=side minecraft:redstone_wire east=up;north=side;power=15;south=none;west=up minecraft:redstone_wire east=up;north=side;power=15;south=side;west=none minecraft:redstone_wire east=up;north=side;power=15;south=side;west=side minecraft:redstone_wire east=up;north=side;power=15;south=side;west=up minecraft:redstone_wire east=up;north=side;power=15;south=up;west=none minecraft:redstone_wire east=up;north=side;power=15;south=up;west=side minecraft:redstone_wire east=up;north=side;power=15;south=up;west=up minecraft:redstone_wire east=up;north=up;power=15;south=none;west=none minecraft:redstone_wire east=up;north=up;power=15;south=none;west=side minecraft:redstone_wire east=up;north=up;power=15;south=none;west=up minecraft:redstone_wire east=up;north=up;power=15;south=side;west=none minecraft:redstone_wire east=up;north=up;power=15;south=side;west=side minecraft:redstone_wire east=up;north=up;power=15;south=side;west=up minecraft:redstone_wire east=up;north=up;power=15;south=up;west=none minecraft:redstone_wire east=up;north=up;power=15;south=up;west=side minecraft:redstone_wire east=up;north=up;power=15;south=up;west=up +896 minecraft:diamond_ore minecraft:diamond_ore +912 minecraft:diamond_block minecraft:diamond_block +928 minecraft:crafting_table minecraft:crafting_table +944 minecraft:wheat age=0 minecraft:wheat age=0 +945 minecraft:wheat age=1 minecraft:wheat age=1 +946 minecraft:wheat age=2 minecraft:wheat age=2 +947 minecraft:wheat age=3 minecraft:wheat age=3 +948 minecraft:wheat age=4 minecraft:wheat age=4 +949 minecraft:wheat age=5 minecraft:wheat age=5 +950 minecraft:wheat age=6 minecraft:wheat age=6 +951 minecraft:wheat age=7 minecraft:wheat age=7 +960 minecraft:farmland moisture=0 minecraft:farmland moisture=0 +961 minecraft:farmland moisture=1 minecraft:farmland moisture=1 +962 minecraft:farmland moisture=2 minecraft:farmland moisture=2 +963 minecraft:farmland moisture=3 minecraft:farmland moisture=3 +964 minecraft:farmland moisture=4 minecraft:farmland moisture=4 +965 minecraft:farmland moisture=5 minecraft:farmland moisture=5 +966 minecraft:farmland moisture=6 minecraft:farmland moisture=6 +967 minecraft:farmland moisture=7 minecraft:farmland moisture=7 +978 minecraft:furnace facing=north;lit=false minecraft:furnace facing=north +979 minecraft:furnace facing=south;lit=false minecraft:furnace facing=south +980 minecraft:furnace facing=west;lit=false minecraft:furnace facing=west +981 minecraft:furnace facing=east;lit=false minecraft:furnace facing=east +994 minecraft:furnace facing=north;lit=true minecraft:lit_furnace facing=north +995 minecraft:furnace facing=south;lit=true minecraft:lit_furnace facing=south +996 minecraft:furnace facing=west;lit=true minecraft:lit_furnace facing=west +997 minecraft:furnace facing=east;lit=true minecraft:lit_furnace facing=east +1008 minecraft:sign rotation=0 minecraft:standing_sign rotation=0 +1009 minecraft:sign rotation=1 minecraft:standing_sign rotation=1 +1010 minecraft:sign rotation=2 minecraft:standing_sign rotation=2 +1011 minecraft:sign rotation=3 minecraft:standing_sign rotation=3 +1012 minecraft:sign rotation=4 minecraft:standing_sign rotation=4 +1013 minecraft:sign rotation=5 minecraft:standing_sign rotation=5 +1014 minecraft:sign rotation=6 minecraft:standing_sign rotation=6 +1015 minecraft:sign rotation=7 minecraft:standing_sign rotation=7 +1016 minecraft:sign rotation=8 minecraft:standing_sign rotation=8 +1017 minecraft:sign rotation=9 minecraft:standing_sign rotation=9 +1018 minecraft:sign rotation=10 minecraft:standing_sign rotation=10 +1019 minecraft:sign rotation=11 minecraft:standing_sign rotation=11 +1020 minecraft:sign rotation=12 minecraft:standing_sign rotation=12 +1021 minecraft:sign rotation=13 minecraft:standing_sign rotation=13 +1022 minecraft:sign rotation=14 minecraft:standing_sign rotation=14 +1023 minecraft:sign rotation=15 minecraft:standing_sign rotation=15 +1024 minecraft:oak_door facing=east;half=lower;hinge=right;open=false;powered=false minecraft:wooden_door facing=east;half=lower;hinge=left;open=false;powered=false minecraft:wooden_door facing=east;half=lower;hinge=left;open=false;powered=true minecraft:wooden_door facing=east;half=lower;hinge=right;open=false;powered=false minecraft:wooden_door facing=east;half=lower;hinge=right;open=false;powered=true +1025 minecraft:oak_door facing=south;half=lower;hinge=right;open=false;powered=false minecraft:wooden_door facing=south;half=lower;hinge=left;open=false;powered=false minecraft:wooden_door facing=south;half=lower;hinge=left;open=false;powered=true minecraft:wooden_door facing=south;half=lower;hinge=right;open=false;powered=false minecraft:wooden_door facing=south;half=lower;hinge=right;open=false;powered=true +1026 minecraft:oak_door facing=west;half=lower;hinge=right;open=false;powered=false minecraft:wooden_door facing=west;half=lower;hinge=left;open=false;powered=false minecraft:wooden_door facing=west;half=lower;hinge=left;open=false;powered=true minecraft:wooden_door facing=west;half=lower;hinge=right;open=false;powered=false minecraft:wooden_door facing=west;half=lower;hinge=right;open=false;powered=true +1027 minecraft:oak_door facing=north;half=lower;hinge=right;open=false;powered=false minecraft:wooden_door facing=north;half=lower;hinge=left;open=false;powered=false minecraft:wooden_door facing=north;half=lower;hinge=left;open=false;powered=true minecraft:wooden_door facing=north;half=lower;hinge=right;open=false;powered=false minecraft:wooden_door facing=north;half=lower;hinge=right;open=false;powered=true +1028 minecraft:oak_door facing=east;half=lower;hinge=right;open=true;powered=false minecraft:wooden_door facing=east;half=lower;hinge=left;open=true;powered=false minecraft:wooden_door facing=east;half=lower;hinge=left;open=true;powered=true minecraft:wooden_door facing=east;half=lower;hinge=right;open=true;powered=false minecraft:wooden_door facing=east;half=lower;hinge=right;open=true;powered=true +1029 minecraft:oak_door facing=south;half=lower;hinge=right;open=true;powered=false minecraft:wooden_door facing=south;half=lower;hinge=left;open=true;powered=false minecraft:wooden_door facing=south;half=lower;hinge=left;open=true;powered=true minecraft:wooden_door facing=south;half=lower;hinge=right;open=true;powered=false minecraft:wooden_door facing=south;half=lower;hinge=right;open=true;powered=true +1030 minecraft:oak_door facing=west;half=lower;hinge=right;open=true;powered=false minecraft:wooden_door facing=west;half=lower;hinge=left;open=true;powered=false minecraft:wooden_door facing=west;half=lower;hinge=left;open=true;powered=true minecraft:wooden_door facing=west;half=lower;hinge=right;open=true;powered=false minecraft:wooden_door facing=west;half=lower;hinge=right;open=true;powered=true +1031 minecraft:oak_door facing=north;half=lower;hinge=right;open=true;powered=false minecraft:wooden_door facing=north;half=lower;hinge=left;open=true;powered=false minecraft:wooden_door facing=north;half=lower;hinge=left;open=true;powered=true minecraft:wooden_door facing=north;half=lower;hinge=right;open=true;powered=false minecraft:wooden_door facing=north;half=lower;hinge=right;open=true;powered=true +1032 minecraft:oak_door facing=east;half=upper;hinge=left;open=false;powered=false minecraft:wooden_door facing=east;half=upper;hinge=left;open=false;powered=false minecraft:wooden_door facing=east;half=upper;hinge=left;open=true;powered=false minecraft:wooden_door facing=north;half=upper;hinge=left;open=false;powered=false minecraft:wooden_door facing=north;half=upper;hinge=left;open=true;powered=false minecraft:wooden_door facing=south;half=upper;hinge=left;open=false;powered=false minecraft:wooden_door facing=south;half=upper;hinge=left;open=true;powered=false minecraft:wooden_door facing=west;half=upper;hinge=left;open=false;powered=false minecraft:wooden_door facing=west;half=upper;hinge=left;open=true;powered=false +1033 minecraft:oak_door facing=east;half=upper;hinge=right;open=false;powered=false minecraft:wooden_door facing=east;half=upper;hinge=right;open=false;powered=false minecraft:wooden_door facing=east;half=upper;hinge=right;open=true;powered=false minecraft:wooden_door facing=north;half=upper;hinge=right;open=false;powered=false minecraft:wooden_door facing=north;half=upper;hinge=right;open=true;powered=false minecraft:wooden_door facing=south;half=upper;hinge=right;open=false;powered=false minecraft:wooden_door facing=south;half=upper;hinge=right;open=true;powered=false minecraft:wooden_door facing=west;half=upper;hinge=right;open=false;powered=false minecraft:wooden_door facing=west;half=upper;hinge=right;open=true;powered=false +1034 minecraft:oak_door facing=east;half=upper;hinge=left;open=false;powered=true minecraft:wooden_door facing=east;half=upper;hinge=left;open=false;powered=true minecraft:wooden_door facing=east;half=upper;hinge=left;open=true;powered=true minecraft:wooden_door facing=north;half=upper;hinge=left;open=false;powered=true minecraft:wooden_door facing=north;half=upper;hinge=left;open=true;powered=true minecraft:wooden_door facing=south;half=upper;hinge=left;open=false;powered=true minecraft:wooden_door facing=south;half=upper;hinge=left;open=true;powered=true minecraft:wooden_door facing=west;half=upper;hinge=left;open=false;powered=true minecraft:wooden_door facing=west;half=upper;hinge=left;open=true;powered=true +1035 minecraft:oak_door facing=east;half=upper;hinge=right;open=false;powered=true minecraft:wooden_door facing=east;half=upper;hinge=right;open=false;powered=true minecraft:wooden_door facing=east;half=upper;hinge=right;open=true;powered=true minecraft:wooden_door facing=north;half=upper;hinge=right;open=false;powered=true minecraft:wooden_door facing=north;half=upper;hinge=right;open=true;powered=true minecraft:wooden_door facing=south;half=upper;hinge=right;open=false;powered=true minecraft:wooden_door facing=south;half=upper;hinge=right;open=true;powered=true minecraft:wooden_door facing=west;half=upper;hinge=right;open=false;powered=true minecraft:wooden_door facing=west;half=upper;hinge=right;open=true;powered=true +1036 minecraft:oak_door facing=east;half=upper;hinge=left;open=true;powered=false +1037 minecraft:oak_door facing=south;half=upper;hinge=left;open=true;powered=false +1038 minecraft:oak_door facing=west;half=upper;hinge=left;open=true;powered=false +1039 minecraft:oak_door facing=north;half=upper;hinge=left;open=true;powered=false +1042 minecraft:ladder facing=north minecraft:ladder facing=north +1043 minecraft:ladder facing=south minecraft:ladder facing=south +1044 minecraft:ladder facing=west minecraft:ladder facing=west +1045 minecraft:ladder facing=east minecraft:ladder facing=east +1056 minecraft:rail shape=north_south minecraft:rail shape=north_south +1057 minecraft:rail shape=east_west minecraft:rail shape=east_west +1058 minecraft:rail shape=ascending_east minecraft:rail shape=ascending_east +1059 minecraft:rail shape=ascending_west minecraft:rail shape=ascending_west +1060 minecraft:rail shape=ascending_north minecraft:rail shape=ascending_north +1061 minecraft:rail shape=ascending_south minecraft:rail shape=ascending_south +1062 minecraft:rail shape=south_east minecraft:rail shape=south_east +1063 minecraft:rail shape=south_west minecraft:rail shape=south_west +1064 minecraft:rail shape=north_west minecraft:rail shape=north_west +1065 minecraft:rail shape=north_east minecraft:rail shape=north_east +1072 minecraft:cobblestone_stairs facing=east;half=bottom;shape=straight minecraft:stone_stairs facing=east;half=bottom;shape=inner_left minecraft:stone_stairs facing=east;half=bottom;shape=inner_right minecraft:stone_stairs facing=east;half=bottom;shape=outer_left minecraft:stone_stairs facing=east;half=bottom;shape=outer_right minecraft:stone_stairs facing=east;half=bottom;shape=straight +1073 minecraft:cobblestone_stairs facing=west;half=bottom;shape=straight minecraft:stone_stairs facing=west;half=bottom;shape=inner_left minecraft:stone_stairs facing=west;half=bottom;shape=inner_right minecraft:stone_stairs facing=west;half=bottom;shape=outer_left minecraft:stone_stairs facing=west;half=bottom;shape=outer_right minecraft:stone_stairs facing=west;half=bottom;shape=straight +1074 minecraft:cobblestone_stairs facing=south;half=bottom;shape=straight minecraft:stone_stairs facing=south;half=bottom;shape=inner_left minecraft:stone_stairs facing=south;half=bottom;shape=inner_right minecraft:stone_stairs facing=south;half=bottom;shape=outer_left minecraft:stone_stairs facing=south;half=bottom;shape=outer_right minecraft:stone_stairs facing=south;half=bottom;shape=straight +1075 minecraft:cobblestone_stairs facing=north;half=bottom;shape=straight minecraft:stone_stairs facing=north;half=bottom;shape=inner_left minecraft:stone_stairs facing=north;half=bottom;shape=inner_right minecraft:stone_stairs facing=north;half=bottom;shape=outer_left minecraft:stone_stairs facing=north;half=bottom;shape=outer_right minecraft:stone_stairs facing=north;half=bottom;shape=straight +1076 minecraft:cobblestone_stairs facing=east;half=top;shape=straight minecraft:stone_stairs facing=east;half=top;shape=inner_left minecraft:stone_stairs facing=east;half=top;shape=inner_right minecraft:stone_stairs facing=east;half=top;shape=outer_left minecraft:stone_stairs facing=east;half=top;shape=outer_right minecraft:stone_stairs facing=east;half=top;shape=straight +1077 minecraft:cobblestone_stairs facing=west;half=top;shape=straight minecraft:stone_stairs facing=west;half=top;shape=inner_left minecraft:stone_stairs facing=west;half=top;shape=inner_right minecraft:stone_stairs facing=west;half=top;shape=outer_left minecraft:stone_stairs facing=west;half=top;shape=outer_right minecraft:stone_stairs facing=west;half=top;shape=straight +1078 minecraft:cobblestone_stairs facing=south;half=top;shape=straight minecraft:stone_stairs facing=south;half=top;shape=inner_left minecraft:stone_stairs facing=south;half=top;shape=inner_right minecraft:stone_stairs facing=south;half=top;shape=outer_left minecraft:stone_stairs facing=south;half=top;shape=outer_right minecraft:stone_stairs facing=south;half=top;shape=straight +1079 minecraft:cobblestone_stairs facing=north;half=top;shape=straight minecraft:stone_stairs facing=north;half=top;shape=inner_left minecraft:stone_stairs facing=north;half=top;shape=inner_right minecraft:stone_stairs facing=north;half=top;shape=outer_left minecraft:stone_stairs facing=north;half=top;shape=outer_right minecraft:stone_stairs facing=north;half=top;shape=straight +1090 minecraft:wall_sign facing=north minecraft:wall_sign facing=north +1091 minecraft:wall_sign facing=south minecraft:wall_sign facing=south +1092 minecraft:wall_sign facing=west minecraft:wall_sign facing=west +1093 minecraft:wall_sign facing=east minecraft:wall_sign facing=east +1104 minecraft:lever face=ceiling;facing=west;powered=false minecraft:lever facing=down_x;powered=false +1105 minecraft:lever face=wall;facing=east;powered=false minecraft:lever facing=east;powered=false +1106 minecraft:lever face=wall;facing=west;powered=false minecraft:lever facing=west;powered=false +1107 minecraft:lever face=wall;facing=south;powered=false minecraft:lever facing=south;powered=false +1108 minecraft:lever face=wall;facing=north;powered=false minecraft:lever facing=north;powered=false +1109 minecraft:lever face=floor;facing=north;powered=false minecraft:lever facing=up_z;powered=false +1110 minecraft:lever face=floor;facing=west;powered=false minecraft:lever facing=up_x;powered=false +1111 minecraft:lever face=ceiling;facing=north;powered=false minecraft:lever facing=down_z;powered=false +1112 minecraft:lever face=ceiling;facing=west;powered=true minecraft:lever facing=down_x;powered=true +1113 minecraft:lever face=wall;facing=east;powered=true minecraft:lever facing=east;powered=true +1114 minecraft:lever face=wall;facing=west;powered=true minecraft:lever facing=west;powered=true +1115 minecraft:lever face=wall;facing=south;powered=true minecraft:lever facing=south;powered=true +1116 minecraft:lever face=wall;facing=north;powered=true minecraft:lever facing=north;powered=true +1117 minecraft:lever face=floor;facing=north;powered=true minecraft:lever facing=up_z;powered=true +1118 minecraft:lever face=floor;facing=west;powered=true minecraft:lever facing=up_x;powered=true +1119 minecraft:lever face=ceiling;facing=north;powered=true minecraft:lever facing=down_z;powered=true +1120 minecraft:stone_pressure_plate powered=false minecraft:stone_pressure_plate powered=false +1121 minecraft:stone_pressure_plate powered=true minecraft:stone_pressure_plate powered=true +1136 minecraft:iron_door facing=east;half=lower;hinge=right;open=false;powered=false minecraft:iron_door facing=east;half=lower;hinge=left;open=false;powered=false minecraft:iron_door facing=east;half=lower;hinge=left;open=false;powered=true minecraft:iron_door facing=east;half=lower;hinge=right;open=false;powered=false minecraft:iron_door facing=east;half=lower;hinge=right;open=false;powered=true +1137 minecraft:iron_door facing=south;half=lower;hinge=right;open=false;powered=false minecraft:iron_door facing=south;half=lower;hinge=left;open=false;powered=false minecraft:iron_door facing=south;half=lower;hinge=left;open=false;powered=true minecraft:iron_door facing=south;half=lower;hinge=right;open=false;powered=false minecraft:iron_door facing=south;half=lower;hinge=right;open=false;powered=true +1138 minecraft:iron_door facing=west;half=lower;hinge=right;open=false;powered=false minecraft:iron_door facing=west;half=lower;hinge=left;open=false;powered=false minecraft:iron_door facing=west;half=lower;hinge=left;open=false;powered=true minecraft:iron_door facing=west;half=lower;hinge=right;open=false;powered=false minecraft:iron_door facing=west;half=lower;hinge=right;open=false;powered=true +1139 minecraft:iron_door facing=north;half=lower;hinge=right;open=false;powered=false minecraft:iron_door facing=north;half=lower;hinge=left;open=false;powered=false minecraft:iron_door facing=north;half=lower;hinge=left;open=false;powered=true minecraft:iron_door facing=north;half=lower;hinge=right;open=false;powered=false minecraft:iron_door facing=north;half=lower;hinge=right;open=false;powered=true +1140 minecraft:iron_door facing=east;half=lower;hinge=right;open=true;powered=false minecraft:iron_door facing=east;half=lower;hinge=left;open=true;powered=false minecraft:iron_door facing=east;half=lower;hinge=left;open=true;powered=true minecraft:iron_door facing=east;half=lower;hinge=right;open=true;powered=false minecraft:iron_door facing=east;half=lower;hinge=right;open=true;powered=true +1141 minecraft:iron_door facing=south;half=lower;hinge=right;open=true;powered=false minecraft:iron_door facing=south;half=lower;hinge=left;open=true;powered=false minecraft:iron_door facing=south;half=lower;hinge=left;open=true;powered=true minecraft:iron_door facing=south;half=lower;hinge=right;open=true;powered=false minecraft:iron_door facing=south;half=lower;hinge=right;open=true;powered=true +1142 minecraft:iron_door facing=west;half=lower;hinge=right;open=true;powered=false minecraft:iron_door facing=west;half=lower;hinge=left;open=true;powered=false minecraft:iron_door facing=west;half=lower;hinge=left;open=true;powered=true minecraft:iron_door facing=west;half=lower;hinge=right;open=true;powered=false minecraft:iron_door facing=west;half=lower;hinge=right;open=true;powered=true +1143 minecraft:iron_door facing=north;half=lower;hinge=right;open=true;powered=false minecraft:iron_door facing=north;half=lower;hinge=left;open=true;powered=false minecraft:iron_door facing=north;half=lower;hinge=left;open=true;powered=true minecraft:iron_door facing=north;half=lower;hinge=right;open=true;powered=false minecraft:iron_door facing=north;half=lower;hinge=right;open=true;powered=true +1144 minecraft:iron_door facing=east;half=upper;hinge=left;open=false;powered=false minecraft:iron_door facing=east;half=upper;hinge=left;open=false;powered=false minecraft:iron_door facing=east;half=upper;hinge=left;open=true;powered=false minecraft:iron_door facing=north;half=upper;hinge=left;open=false;powered=false minecraft:iron_door facing=north;half=upper;hinge=left;open=true;powered=false minecraft:iron_door facing=south;half=upper;hinge=left;open=false;powered=false minecraft:iron_door facing=south;half=upper;hinge=left;open=true;powered=false minecraft:iron_door facing=west;half=upper;hinge=left;open=false;powered=false minecraft:iron_door facing=west;half=upper;hinge=left;open=true;powered=false +1145 minecraft:iron_door facing=east;half=upper;hinge=right;open=false;powered=false minecraft:iron_door facing=east;half=upper;hinge=right;open=false;powered=false minecraft:iron_door facing=east;half=upper;hinge=right;open=true;powered=false minecraft:iron_door facing=north;half=upper;hinge=right;open=false;powered=false minecraft:iron_door facing=north;half=upper;hinge=right;open=true;powered=false minecraft:iron_door facing=south;half=upper;hinge=right;open=false;powered=false minecraft:iron_door facing=south;half=upper;hinge=right;open=true;powered=false minecraft:iron_door facing=west;half=upper;hinge=right;open=false;powered=false minecraft:iron_door facing=west;half=upper;hinge=right;open=true;powered=false +1146 minecraft:iron_door facing=east;half=upper;hinge=left;open=false;powered=true minecraft:iron_door facing=east;half=upper;hinge=left;open=false;powered=true minecraft:iron_door facing=east;half=upper;hinge=left;open=true;powered=true minecraft:iron_door facing=north;half=upper;hinge=left;open=false;powered=true minecraft:iron_door facing=north;half=upper;hinge=left;open=true;powered=true minecraft:iron_door facing=south;half=upper;hinge=left;open=false;powered=true minecraft:iron_door facing=south;half=upper;hinge=left;open=true;powered=true minecraft:iron_door facing=west;half=upper;hinge=left;open=false;powered=true minecraft:iron_door facing=west;half=upper;hinge=left;open=true;powered=true +1147 minecraft:iron_door facing=east;half=upper;hinge=right;open=false;powered=true minecraft:iron_door facing=east;half=upper;hinge=right;open=false;powered=true minecraft:iron_door facing=east;half=upper;hinge=right;open=true;powered=true minecraft:iron_door facing=north;half=upper;hinge=right;open=false;powered=true minecraft:iron_door facing=north;half=upper;hinge=right;open=true;powered=true minecraft:iron_door facing=south;half=upper;hinge=right;open=false;powered=true minecraft:iron_door facing=south;half=upper;hinge=right;open=true;powered=true minecraft:iron_door facing=west;half=upper;hinge=right;open=false;powered=true minecraft:iron_door facing=west;half=upper;hinge=right;open=true;powered=true +1148 minecraft:iron_door facing=east;half=upper;hinge=left;open=true;powered=false +1149 minecraft:iron_door facing=south;half=upper;hinge=left;open=true;powered=false +1150 minecraft:iron_door facing=west;half=upper;hinge=left;open=true;powered=false +1151 minecraft:iron_door facing=north;half=upper;hinge=left;open=true;powered=false +1152 minecraft:oak_pressure_plate powered=false minecraft:wooden_pressure_plate powered=false +1153 minecraft:oak_pressure_plate powered=true minecraft:wooden_pressure_plate powered=true +1168 minecraft:redstone_ore lit=false minecraft:redstone_ore +1184 minecraft:redstone_ore lit=true minecraft:lit_redstone_ore +1201 minecraft:redstone_wall_torch facing=east;lit=false minecraft:unlit_redstone_torch facing=east +1202 minecraft:redstone_wall_torch facing=west;lit=false minecraft:unlit_redstone_torch facing=west +1203 minecraft:redstone_wall_torch facing=south;lit=false minecraft:unlit_redstone_torch facing=south +1204 minecraft:redstone_wall_torch facing=north;lit=false minecraft:unlit_redstone_torch facing=north +1205 minecraft:redstone_torch lit=false minecraft:unlit_redstone_torch facing=up +1217 minecraft:redstone_wall_torch facing=east;lit=true minecraft:redstone_torch facing=east +1218 minecraft:redstone_wall_torch facing=west;lit=true minecraft:redstone_torch facing=west +1219 minecraft:redstone_wall_torch facing=south;lit=true minecraft:redstone_torch facing=south +1220 minecraft:redstone_wall_torch facing=north;lit=true minecraft:redstone_torch facing=north +1221 minecraft:redstone_torch lit=true minecraft:redstone_torch facing=up +1232 minecraft:stone_button face=ceiling;facing=north;powered=false minecraft:stone_button facing=down;powered=false +1233 minecraft:stone_button face=wall;facing=east;powered=false minecraft:stone_button facing=east;powered=false +1234 minecraft:stone_button face=wall;facing=west;powered=false minecraft:stone_button facing=west;powered=false +1235 minecraft:stone_button face=wall;facing=south;powered=false minecraft:stone_button facing=south;powered=false +1236 minecraft:stone_button face=wall;facing=north;powered=false minecraft:stone_button facing=north;powered=false +1237 minecraft:stone_button face=floor;facing=north;powered=false minecraft:stone_button facing=up;powered=false +1240 minecraft:stone_button face=ceiling;facing=north;powered=true minecraft:stone_button facing=down;powered=true +1241 minecraft:stone_button face=wall;facing=east;powered=true minecraft:stone_button facing=east;powered=true +1242 minecraft:stone_button face=wall;facing=west;powered=true minecraft:stone_button facing=west;powered=true +1243 minecraft:stone_button face=wall;facing=south;powered=true minecraft:stone_button facing=south;powered=true +1244 minecraft:stone_button face=wall;facing=north;powered=true minecraft:stone_button facing=north;powered=true +1245 minecraft:stone_button face=floor;facing=north;powered=true minecraft:stone_button facing=up;powered=true +1248 minecraft:snow layers=1 minecraft:snow_layer layers=1 +1249 minecraft:snow layers=2 minecraft:snow_layer layers=2 +1250 minecraft:snow layers=3 minecraft:snow_layer layers=3 +1251 minecraft:snow layers=4 minecraft:snow_layer layers=4 +1252 minecraft:snow layers=5 minecraft:snow_layer layers=5 +1253 minecraft:snow layers=6 minecraft:snow_layer layers=6 +1254 minecraft:snow layers=7 minecraft:snow_layer layers=7 +1255 minecraft:snow layers=8 minecraft:snow_layer layers=8 +1264 minecraft:ice minecraft:ice +1280 minecraft:snow_block minecraft:snow +1296 minecraft:cactus age=0 minecraft:cactus age=0 +1297 minecraft:cactus age=1 minecraft:cactus age=1 +1298 minecraft:cactus age=2 minecraft:cactus age=2 +1299 minecraft:cactus age=3 minecraft:cactus age=3 +1300 minecraft:cactus age=4 minecraft:cactus age=4 +1301 minecraft:cactus age=5 minecraft:cactus age=5 +1302 minecraft:cactus age=6 minecraft:cactus age=6 +1303 minecraft:cactus age=7 minecraft:cactus age=7 +1304 minecraft:cactus age=8 minecraft:cactus age=8 +1305 minecraft:cactus age=9 minecraft:cactus age=9 +1306 minecraft:cactus age=10 minecraft:cactus age=10 +1307 minecraft:cactus age=11 minecraft:cactus age=11 +1308 minecraft:cactus age=12 minecraft:cactus age=12 +1309 minecraft:cactus age=13 minecraft:cactus age=13 +1310 minecraft:cactus age=14 minecraft:cactus age=14 +1311 minecraft:cactus age=15 minecraft:cactus age=15 +1312 minecraft:clay minecraft:clay +1328 minecraft:sugar_cane age=0 minecraft:reeds age=0 +1329 minecraft:sugar_cane age=1 minecraft:reeds age=1 +1330 minecraft:sugar_cane age=2 minecraft:reeds age=2 +1331 minecraft:sugar_cane age=3 minecraft:reeds age=3 +1332 minecraft:sugar_cane age=4 minecraft:reeds age=4 +1333 minecraft:sugar_cane age=5 minecraft:reeds age=5 +1334 minecraft:sugar_cane age=6 minecraft:reeds age=6 +1335 minecraft:sugar_cane age=7 minecraft:reeds age=7 +1336 minecraft:sugar_cane age=8 minecraft:reeds age=8 +1337 minecraft:sugar_cane age=9 minecraft:reeds age=9 +1338 minecraft:sugar_cane age=10 minecraft:reeds age=10 +1339 minecraft:sugar_cane age=11 minecraft:reeds age=11 +1340 minecraft:sugar_cane age=12 minecraft:reeds age=12 +1341 minecraft:sugar_cane age=13 minecraft:reeds age=13 +1342 minecraft:sugar_cane age=14 minecraft:reeds age=14 +1343 minecraft:sugar_cane age=15 minecraft:reeds age=15 +1344 minecraft:jukebox has_record=false minecraft:jukebox has_record=false +1345 minecraft:jukebox has_record=true minecraft:jukebox has_record=true +1360 minecraft:oak_fence east=false;north=false;south=false;west=false minecraft:fence east=false;north=false;south=false;west=false minecraft:fence east=false;north=false;south=false;west=true minecraft:fence east=false;north=false;south=true;west=false minecraft:fence east=false;north=false;south=true;west=true minecraft:fence east=false;north=true;south=false;west=false minecraft:fence east=false;north=true;south=false;west=true minecraft:fence east=false;north=true;south=true;west=false minecraft:fence east=false;north=true;south=true;west=true minecraft:fence east=true;north=false;south=false;west=false minecraft:fence east=true;north=false;south=false;west=true minecraft:fence east=true;north=false;south=true;west=false minecraft:fence east=true;north=false;south=true;west=true minecraft:fence east=true;north=true;south=false;west=false minecraft:fence east=true;north=true;south=false;west=true minecraft:fence east=true;north=true;south=true;west=false minecraft:fence east=true;north=true;south=true;west=true +1376 minecraft:carved_pumpkin facing=south minecraft:pumpkin facing=south +1377 minecraft:carved_pumpkin facing=west minecraft:pumpkin facing=west +1378 minecraft:carved_pumpkin facing=north minecraft:pumpkin facing=north +1379 minecraft:carved_pumpkin facing=east minecraft:pumpkin facing=east +1392 minecraft:netherrack minecraft:netherrack +1408 minecraft:soul_sand minecraft:soul_sand +1424 minecraft:glowstone minecraft:glowstone +1441 minecraft:portal axis=x minecraft:portal axis=x +1442 minecraft:portal axis=z minecraft:portal axis=z +1456 minecraft:jack_o_lantern facing=south minecraft:lit_pumpkin facing=south +1457 minecraft:jack_o_lantern facing=west minecraft:lit_pumpkin facing=west +1458 minecraft:jack_o_lantern facing=north minecraft:lit_pumpkin facing=north +1459 minecraft:jack_o_lantern facing=east minecraft:lit_pumpkin facing=east +1472 minecraft:cake bites=0 minecraft:cake bites=0 +1473 minecraft:cake bites=1 minecraft:cake bites=1 +1474 minecraft:cake bites=2 minecraft:cake bites=2 +1475 minecraft:cake bites=3 minecraft:cake bites=3 +1476 minecraft:cake bites=4 minecraft:cake bites=4 +1477 minecraft:cake bites=5 minecraft:cake bites=5 +1478 minecraft:cake bites=6 minecraft:cake bites=6 +1488 minecraft:repeater delay=1;facing=south;locked=false;powered=false minecraft:unpowered_repeater delay=1;facing=south;locked=false minecraft:unpowered_repeater delay=1;facing=south;locked=true +1489 minecraft:repeater delay=1;facing=west;locked=false;powered=false minecraft:unpowered_repeater delay=1;facing=west;locked=false minecraft:unpowered_repeater delay=1;facing=west;locked=true +1490 minecraft:repeater delay=1;facing=north;locked=false;powered=false minecraft:unpowered_repeater delay=1;facing=north;locked=false minecraft:unpowered_repeater delay=1;facing=north;locked=true +1491 minecraft:repeater delay=1;facing=east;locked=false;powered=false minecraft:unpowered_repeater delay=1;facing=east;locked=false minecraft:unpowered_repeater delay=1;facing=east;locked=true +1492 minecraft:repeater delay=2;facing=south;locked=false;powered=false minecraft:unpowered_repeater delay=2;facing=south;locked=false minecraft:unpowered_repeater delay=2;facing=south;locked=true +1493 minecraft:repeater delay=2;facing=west;locked=false;powered=false minecraft:unpowered_repeater delay=2;facing=west;locked=false minecraft:unpowered_repeater delay=2;facing=west;locked=true +1494 minecraft:repeater delay=2;facing=north;locked=false;powered=false minecraft:unpowered_repeater delay=2;facing=north;locked=false minecraft:unpowered_repeater delay=2;facing=north;locked=true +1495 minecraft:repeater delay=2;facing=east;locked=false;powered=false minecraft:unpowered_repeater delay=2;facing=east;locked=false minecraft:unpowered_repeater delay=2;facing=east;locked=true +1496 minecraft:repeater delay=3;facing=south;locked=false;powered=false minecraft:unpowered_repeater delay=3;facing=south;locked=false minecraft:unpowered_repeater delay=3;facing=south;locked=true +1497 minecraft:repeater delay=3;facing=west;locked=false;powered=false minecraft:unpowered_repeater delay=3;facing=west;locked=false minecraft:unpowered_repeater delay=3;facing=west;locked=true +1498 minecraft:repeater delay=3;facing=north;locked=false;powered=false minecraft:unpowered_repeater delay=3;facing=north;locked=false minecraft:unpowered_repeater delay=3;facing=north;locked=true +1499 minecraft:repeater delay=3;facing=east;locked=false;powered=false minecraft:unpowered_repeater delay=3;facing=east;locked=false minecraft:unpowered_repeater delay=3;facing=east;locked=true +1500 minecraft:repeater delay=4;facing=south;locked=false;powered=false minecraft:unpowered_repeater delay=4;facing=south;locked=false minecraft:unpowered_repeater delay=4;facing=south;locked=true +1501 minecraft:repeater delay=4;facing=west;locked=false;powered=false minecraft:unpowered_repeater delay=4;facing=west;locked=false minecraft:unpowered_repeater delay=4;facing=west;locked=true +1502 minecraft:repeater delay=4;facing=north;locked=false;powered=false minecraft:unpowered_repeater delay=4;facing=north;locked=false minecraft:unpowered_repeater delay=4;facing=north;locked=true +1503 minecraft:repeater delay=4;facing=east;locked=false;powered=false minecraft:unpowered_repeater delay=4;facing=east;locked=false minecraft:unpowered_repeater delay=4;facing=east;locked=true +1504 minecraft:repeater delay=1;facing=south;locked=false;powered=true minecraft:powered_repeater delay=1;facing=south;locked=false minecraft:powered_repeater delay=1;facing=south;locked=true +1505 minecraft:repeater delay=1;facing=west;locked=false;powered=true minecraft:powered_repeater delay=1;facing=west;locked=false minecraft:powered_repeater delay=1;facing=west;locked=true +1506 minecraft:repeater delay=1;facing=north;locked=false;powered=true minecraft:powered_repeater delay=1;facing=north;locked=false minecraft:powered_repeater delay=1;facing=north;locked=true +1507 minecraft:repeater delay=1;facing=east;locked=false;powered=true minecraft:powered_repeater delay=1;facing=east;locked=false minecraft:powered_repeater delay=1;facing=east;locked=true +1508 minecraft:repeater delay=2;facing=south;locked=false;powered=true minecraft:powered_repeater delay=2;facing=south;locked=false minecraft:powered_repeater delay=2;facing=south;locked=true +1509 minecraft:repeater delay=2;facing=west;locked=false;powered=true minecraft:powered_repeater delay=2;facing=west;locked=false minecraft:powered_repeater delay=2;facing=west;locked=true +1510 minecraft:repeater delay=2;facing=north;locked=false;powered=true minecraft:powered_repeater delay=2;facing=north;locked=false minecraft:powered_repeater delay=2;facing=north;locked=true +1511 minecraft:repeater delay=2;facing=east;locked=false;powered=true minecraft:powered_repeater delay=2;facing=east;locked=false minecraft:powered_repeater delay=2;facing=east;locked=true +1512 minecraft:repeater delay=3;facing=south;locked=false;powered=true minecraft:powered_repeater delay=3;facing=south;locked=false minecraft:powered_repeater delay=3;facing=south;locked=true +1513 minecraft:repeater delay=3;facing=west;locked=false;powered=true minecraft:powered_repeater delay=3;facing=west;locked=false minecraft:powered_repeater delay=3;facing=west;locked=true +1514 minecraft:repeater delay=3;facing=north;locked=false;powered=true minecraft:powered_repeater delay=3;facing=north;locked=false minecraft:powered_repeater delay=3;facing=north;locked=true +1515 minecraft:repeater delay=3;facing=east;locked=false;powered=true minecraft:powered_repeater delay=3;facing=east;locked=false minecraft:powered_repeater delay=3;facing=east;locked=true +1516 minecraft:repeater delay=4;facing=south;locked=false;powered=true minecraft:powered_repeater delay=4;facing=south;locked=false minecraft:powered_repeater delay=4;facing=south;locked=true +1517 minecraft:repeater delay=4;facing=west;locked=false;powered=true minecraft:powered_repeater delay=4;facing=west;locked=false minecraft:powered_repeater delay=4;facing=west;locked=true +1518 minecraft:repeater delay=4;facing=north;locked=false;powered=true minecraft:powered_repeater delay=4;facing=north;locked=false minecraft:powered_repeater delay=4;facing=north;locked=true +1519 minecraft:repeater delay=4;facing=east;locked=false;powered=true minecraft:powered_repeater delay=4;facing=east;locked=false minecraft:powered_repeater delay=4;facing=east;locked=true +1520 minecraft:white_stained_glass minecraft:stained_glass color=white +1521 minecraft:orange_stained_glass minecraft:stained_glass color=orange +1522 minecraft:magenta_stained_glass minecraft:stained_glass color=magenta +1523 minecraft:light_blue_stained_glass minecraft:stained_glass color=light_blue +1524 minecraft:yellow_stained_glass minecraft:stained_glass color=yellow +1525 minecraft:lime_stained_glass minecraft:stained_glass color=lime +1526 minecraft:pink_stained_glass minecraft:stained_glass color=pink +1527 minecraft:gray_stained_glass minecraft:stained_glass color=gray +1528 minecraft:light_gray_stained_glass minecraft:stained_glass color=silver +1529 minecraft:cyan_stained_glass minecraft:stained_glass color=cyan +1530 minecraft:purple_stained_glass minecraft:stained_glass color=purple +1531 minecraft:blue_stained_glass minecraft:stained_glass color=blue +1532 minecraft:brown_stained_glass minecraft:stained_glass color=brown +1533 minecraft:green_stained_glass minecraft:stained_glass color=green +1534 minecraft:red_stained_glass minecraft:stained_glass color=red +1535 minecraft:black_stained_glass minecraft:stained_glass color=black +1536 minecraft:oak_trapdoor facing=north;half=bottom;open=false minecraft:trapdoor facing=north;half=bottom;open=false +1537 minecraft:oak_trapdoor facing=south;half=bottom;open=false minecraft:trapdoor facing=south;half=bottom;open=false +1538 minecraft:oak_trapdoor facing=west;half=bottom;open=false minecraft:trapdoor facing=west;half=bottom;open=false +1539 minecraft:oak_trapdoor facing=east;half=bottom;open=false minecraft:trapdoor facing=east;half=bottom;open=false +1540 minecraft:oak_trapdoor facing=north;half=bottom;open=true minecraft:trapdoor facing=north;half=bottom;open=true +1541 minecraft:oak_trapdoor facing=south;half=bottom;open=true minecraft:trapdoor facing=south;half=bottom;open=true +1542 minecraft:oak_trapdoor facing=west;half=bottom;open=true minecraft:trapdoor facing=west;half=bottom;open=true +1543 minecraft:oak_trapdoor facing=east;half=bottom;open=true minecraft:trapdoor facing=east;half=bottom;open=true +1544 minecraft:oak_trapdoor facing=north;half=top;open=false minecraft:trapdoor facing=north;half=top;open=false +1545 minecraft:oak_trapdoor facing=south;half=top;open=false minecraft:trapdoor facing=south;half=top;open=false +1546 minecraft:oak_trapdoor facing=west;half=top;open=false minecraft:trapdoor facing=west;half=top;open=false +1547 minecraft:oak_trapdoor facing=east;half=top;open=false minecraft:trapdoor facing=east;half=top;open=false +1548 minecraft:oak_trapdoor facing=north;half=top;open=true minecraft:trapdoor facing=north;half=top;open=true +1549 minecraft:oak_trapdoor facing=south;half=top;open=true minecraft:trapdoor facing=south;half=top;open=true +1550 minecraft:oak_trapdoor facing=west;half=top;open=true minecraft:trapdoor facing=west;half=top;open=true +1551 minecraft:oak_trapdoor facing=east;half=top;open=true minecraft:trapdoor facing=east;half=top;open=true +1552 minecraft:infested_stone minecraft:monster_egg variant=stone +1553 minecraft:infested_cobblestone minecraft:monster_egg variant=cobblestone +1554 minecraft:infested_stone_bricks minecraft:monster_egg variant=stone_brick +1555 minecraft:infested_mossy_stone_bricks minecraft:monster_egg variant=mossy_brick +1556 minecraft:infested_cracked_stone_bricks minecraft:monster_egg variant=cracked_brick +1557 minecraft:infested_chiseled_stone_bricks minecraft:monster_egg variant=chiseled_brick +1568 minecraft:stone_bricks minecraft:stonebrick variant=stonebrick +1569 minecraft:mossy_stone_bricks minecraft:stonebrick variant=mossy_stonebrick +1570 minecraft:cracked_stone_bricks minecraft:stonebrick variant=cracked_stonebrick +1571 minecraft:chiseled_stone_bricks minecraft:stonebrick variant=chiseled_stonebrick +1584 minecraft:brown_mushroom_block down=false;east=false;north=false;south=false;up=false;west=false minecraft:brown_mushroom_block variant=all_inside +1585 minecraft:brown_mushroom_block down=false;east=false;north=true;south=false;up=true;west=true minecraft:brown_mushroom_block variant=north_west +1586 minecraft:brown_mushroom_block down=false;east=false;north=true;south=false;up=true;west=false minecraft:brown_mushroom_block variant=north +1587 minecraft:brown_mushroom_block down=false;east=true;north=true;south=false;up=true;west=false minecraft:brown_mushroom_block variant=north_east +1588 minecraft:brown_mushroom_block down=false;east=false;north=false;south=false;up=true;west=true minecraft:brown_mushroom_block variant=west +1589 minecraft:brown_mushroom_block down=false;east=false;north=false;south=false;up=true;west=false minecraft:brown_mushroom_block variant=center +1590 minecraft:brown_mushroom_block down=false;east=true;north=false;south=false;up=true;west=false minecraft:brown_mushroom_block variant=east +1591 minecraft:brown_mushroom_block down=false;east=false;north=false;south=true;up=true;west=true minecraft:brown_mushroom_block variant=south_west +1592 minecraft:brown_mushroom_block down=false;east=false;north=false;south=true;up=true;west=false minecraft:brown_mushroom_block variant=south +1593 minecraft:brown_mushroom_block down=false;east=true;north=false;south=true;up=true;west=false minecraft:brown_mushroom_block variant=south_east +1594 minecraft:mushroom_stem down=false;east=true;north=true;south=true;up=false;west=true minecraft:brown_mushroom_block variant=stem +1595 minecraft:brown_mushroom_block down=false;east=false;north=false;south=false;up=false;west=false +1596 minecraft:brown_mushroom_block down=false;east=false;north=false;south=false;up=false;west=false +1597 minecraft:brown_mushroom_block down=false;east=false;north=false;south=false;up=false;west=false +1598 minecraft:brown_mushroom_block down=true;east=true;north=true;south=true;up=true;west=true minecraft:brown_mushroom_block variant=all_outside +1599 minecraft:mushroom_stem down=true;east=true;north=true;south=true;up=true;west=true minecraft:brown_mushroom_block variant=all_stem +1600 minecraft:red_mushroom_block down=false;east=false;north=false;south=false;up=false;west=false minecraft:red_mushroom_block variant=all_inside +1601 minecraft:red_mushroom_block down=false;east=false;north=true;south=false;up=true;west=true minecraft:red_mushroom_block variant=north_west +1602 minecraft:red_mushroom_block down=false;east=false;north=true;south=false;up=true;west=false minecraft:red_mushroom_block variant=north +1603 minecraft:red_mushroom_block down=false;east=true;north=true;south=false;up=true;west=false minecraft:red_mushroom_block variant=north_east +1604 minecraft:red_mushroom_block down=false;east=false;north=false;south=false;up=true;west=true minecraft:red_mushroom_block variant=west +1605 minecraft:red_mushroom_block down=false;east=false;north=false;south=false;up=true;west=false minecraft:red_mushroom_block variant=center +1606 minecraft:red_mushroom_block down=false;east=true;north=false;south=false;up=true;west=false minecraft:red_mushroom_block variant=east +1607 minecraft:red_mushroom_block down=false;east=false;north=false;south=true;up=true;west=true minecraft:red_mushroom_block variant=south_west +1608 minecraft:red_mushroom_block down=false;east=false;north=false;south=true;up=true;west=false minecraft:red_mushroom_block variant=south +1609 minecraft:red_mushroom_block down=false;east=true;north=false;south=true;up=true;west=false minecraft:red_mushroom_block variant=south_east +1610 minecraft:mushroom_stem down=false;east=true;north=true;south=true;up=false;west=true minecraft:red_mushroom_block variant=stem +1611 minecraft:red_mushroom_block down=false;east=false;north=false;south=false;up=false;west=false +1612 minecraft:red_mushroom_block down=false;east=false;north=false;south=false;up=false;west=false +1613 minecraft:red_mushroom_block down=false;east=false;north=false;south=false;up=false;west=false +1614 minecraft:red_mushroom_block down=true;east=true;north=true;south=true;up=true;west=true minecraft:red_mushroom_block variant=all_outside +1615 minecraft:mushroom_stem down=true;east=true;north=true;south=true;up=true;west=true minecraft:red_mushroom_block variant=all_stem +1616 minecraft:iron_bars east=false;north=false;south=false;west=false minecraft:iron_bars east=false;north=false;south=false;west=false minecraft:iron_bars east=false;north=false;south=false;west=true minecraft:iron_bars east=false;north=false;south=true;west=false minecraft:iron_bars east=false;north=false;south=true;west=true minecraft:iron_bars east=false;north=true;south=false;west=false minecraft:iron_bars east=false;north=true;south=false;west=true minecraft:iron_bars east=false;north=true;south=true;west=false minecraft:iron_bars east=false;north=true;south=true;west=true minecraft:iron_bars east=true;north=false;south=false;west=false minecraft:iron_bars east=true;north=false;south=false;west=true minecraft:iron_bars east=true;north=false;south=true;west=false minecraft:iron_bars east=true;north=false;south=true;west=true minecraft:iron_bars east=true;north=true;south=false;west=false minecraft:iron_bars east=true;north=true;south=false;west=true minecraft:iron_bars east=true;north=true;south=true;west=false minecraft:iron_bars east=true;north=true;south=true;west=true +1632 minecraft:glass_pane east=false;north=false;south=false;west=false minecraft:glass_pane east=false;north=false;south=false;west=false minecraft:glass_pane east=false;north=false;south=false;west=true minecraft:glass_pane east=false;north=false;south=true;west=false minecraft:glass_pane east=false;north=false;south=true;west=true minecraft:glass_pane east=false;north=true;south=false;west=false minecraft:glass_pane east=false;north=true;south=false;west=true minecraft:glass_pane east=false;north=true;south=true;west=false minecraft:glass_pane east=false;north=true;south=true;west=true minecraft:glass_pane east=true;north=false;south=false;west=false minecraft:glass_pane east=true;north=false;south=false;west=true minecraft:glass_pane east=true;north=false;south=true;west=false minecraft:glass_pane east=true;north=false;south=true;west=true minecraft:glass_pane east=true;north=true;south=false;west=false minecraft:glass_pane east=true;north=true;south=false;west=true minecraft:glass_pane east=true;north=true;south=true;west=false minecraft:glass_pane east=true;north=true;south=true;west=true +1648 minecraft:melon_block minecraft:melon_block +1664 minecraft:pumpkin_stem age=0 minecraft:pumpkin_stem age=0;facing=east minecraft:pumpkin_stem age=0;facing=north minecraft:pumpkin_stem age=0;facing=south minecraft:pumpkin_stem age=0;facing=up minecraft:pumpkin_stem age=0;facing=west +1665 minecraft:pumpkin_stem age=1 minecraft:pumpkin_stem age=1;facing=east minecraft:pumpkin_stem age=1;facing=north minecraft:pumpkin_stem age=1;facing=south minecraft:pumpkin_stem age=1;facing=up minecraft:pumpkin_stem age=1;facing=west +1666 minecraft:pumpkin_stem age=2 minecraft:pumpkin_stem age=2;facing=east minecraft:pumpkin_stem age=2;facing=north minecraft:pumpkin_stem age=2;facing=south minecraft:pumpkin_stem age=2;facing=up minecraft:pumpkin_stem age=2;facing=west +1667 minecraft:pumpkin_stem age=3 minecraft:pumpkin_stem age=3;facing=east minecraft:pumpkin_stem age=3;facing=north minecraft:pumpkin_stem age=3;facing=south minecraft:pumpkin_stem age=3;facing=up minecraft:pumpkin_stem age=3;facing=west +1668 minecraft:pumpkin_stem age=4 minecraft:pumpkin_stem age=4;facing=east minecraft:pumpkin_stem age=4;facing=north minecraft:pumpkin_stem age=4;facing=south minecraft:pumpkin_stem age=4;facing=up minecraft:pumpkin_stem age=4;facing=west +1669 minecraft:pumpkin_stem age=5 minecraft:pumpkin_stem age=5;facing=east minecraft:pumpkin_stem age=5;facing=north minecraft:pumpkin_stem age=5;facing=south minecraft:pumpkin_stem age=5;facing=up minecraft:pumpkin_stem age=5;facing=west +1670 minecraft:pumpkin_stem age=6 minecraft:pumpkin_stem age=6;facing=east minecraft:pumpkin_stem age=6;facing=north minecraft:pumpkin_stem age=6;facing=south minecraft:pumpkin_stem age=6;facing=up minecraft:pumpkin_stem age=6;facing=west +1671 minecraft:pumpkin_stem age=7 minecraft:pumpkin_stem age=7;facing=east minecraft:pumpkin_stem age=7;facing=north minecraft:pumpkin_stem age=7;facing=south minecraft:pumpkin_stem age=7;facing=up minecraft:pumpkin_stem age=7;facing=west +1680 minecraft:melon_stem age=0 minecraft:melon_stem age=0;facing=east minecraft:melon_stem age=0;facing=north minecraft:melon_stem age=0;facing=south minecraft:melon_stem age=0;facing=up minecraft:melon_stem age=0;facing=west +1681 minecraft:melon_stem age=1 minecraft:melon_stem age=1;facing=east minecraft:melon_stem age=1;facing=north minecraft:melon_stem age=1;facing=south minecraft:melon_stem age=1;facing=up minecraft:melon_stem age=1;facing=west +1682 minecraft:melon_stem age=2 minecraft:melon_stem age=2;facing=east minecraft:melon_stem age=2;facing=north minecraft:melon_stem age=2;facing=south minecraft:melon_stem age=2;facing=up minecraft:melon_stem age=2;facing=west +1683 minecraft:melon_stem age=3 minecraft:melon_stem age=3;facing=east minecraft:melon_stem age=3;facing=north minecraft:melon_stem age=3;facing=south minecraft:melon_stem age=3;facing=up minecraft:melon_stem age=3;facing=west +1684 minecraft:melon_stem age=4 minecraft:melon_stem age=4;facing=east minecraft:melon_stem age=4;facing=north minecraft:melon_stem age=4;facing=south minecraft:melon_stem age=4;facing=up minecraft:melon_stem age=4;facing=west +1685 minecraft:melon_stem age=5 minecraft:melon_stem age=5;facing=east minecraft:melon_stem age=5;facing=north minecraft:melon_stem age=5;facing=south minecraft:melon_stem age=5;facing=up minecraft:melon_stem age=5;facing=west +1686 minecraft:melon_stem age=6 minecraft:melon_stem age=6;facing=east minecraft:melon_stem age=6;facing=north minecraft:melon_stem age=6;facing=south minecraft:melon_stem age=6;facing=up minecraft:melon_stem age=6;facing=west +1687 minecraft:melon_stem age=7 minecraft:melon_stem age=7;facing=east minecraft:melon_stem age=7;facing=north minecraft:melon_stem age=7;facing=south minecraft:melon_stem age=7;facing=up minecraft:melon_stem age=7;facing=west +1696 minecraft:vine east=false;north=false;south=false;up=true;west=false minecraft:vine east=false;north=false;south=false;up=false;west=false minecraft:vine east=false;north=false;south=false;up=true;west=false +1697 minecraft:vine east=false;north=false;south=true;up=true;west=false minecraft:vine east=false;north=false;south=true;up=false;west=false minecraft:vine east=false;north=false;south=true;up=true;west=false +1698 minecraft:vine east=false;north=false;south=false;up=true;west=true minecraft:vine east=false;north=false;south=false;up=false;west=true minecraft:vine east=false;north=false;south=false;up=true;west=true +1699 minecraft:vine east=false;north=false;south=true;up=true;west=true minecraft:vine east=false;north=false;south=true;up=false;west=true minecraft:vine east=false;north=false;south=true;up=true;west=true +1700 minecraft:vine east=false;north=true;south=false;up=true;west=false minecraft:vine east=false;north=true;south=false;up=false;west=false minecraft:vine east=false;north=true;south=false;up=true;west=false +1701 minecraft:vine east=false;north=true;south=true;up=true;west=false minecraft:vine east=false;north=true;south=true;up=false;west=false minecraft:vine east=false;north=true;south=true;up=true;west=false +1702 minecraft:vine east=false;north=true;south=false;up=true;west=true minecraft:vine east=false;north=true;south=false;up=false;west=true minecraft:vine east=false;north=true;south=false;up=true;west=true +1703 minecraft:vine east=false;north=true;south=true;up=true;west=true minecraft:vine east=false;north=true;south=true;up=false;west=true minecraft:vine east=false;north=true;south=true;up=true;west=true +1704 minecraft:vine east=true;north=false;south=false;up=true;west=false minecraft:vine east=true;north=false;south=false;up=false;west=false minecraft:vine east=true;north=false;south=false;up=true;west=false +1705 minecraft:vine east=true;north=false;south=true;up=true;west=false minecraft:vine east=true;north=false;south=true;up=false;west=false minecraft:vine east=true;north=false;south=true;up=true;west=false +1706 minecraft:vine east=true;north=false;south=false;up=true;west=true minecraft:vine east=true;north=false;south=false;up=false;west=true minecraft:vine east=true;north=false;south=false;up=true;west=true +1707 minecraft:vine east=true;north=false;south=true;up=true;west=true minecraft:vine east=true;north=false;south=true;up=false;west=true minecraft:vine east=true;north=false;south=true;up=true;west=true +1708 minecraft:vine east=true;north=true;south=false;up=true;west=false minecraft:vine east=true;north=true;south=false;up=false;west=false minecraft:vine east=true;north=true;south=false;up=true;west=false +1709 minecraft:vine east=true;north=true;south=true;up=true;west=false minecraft:vine east=true;north=true;south=true;up=false;west=false minecraft:vine east=true;north=true;south=true;up=true;west=false +1710 minecraft:vine east=true;north=true;south=false;up=true;west=true minecraft:vine east=true;north=true;south=false;up=false;west=true minecraft:vine east=true;north=true;south=false;up=true;west=true +1711 minecraft:vine east=true;north=true;south=true;up=true;west=true minecraft:vine east=true;north=true;south=true;up=false;west=true minecraft:vine east=true;north=true;south=true;up=true;west=true +1712 minecraft:oak_fence_gate facing=south;in_wall=false;open=false;powered=false minecraft:fence_gate facing=south;in_wall=false;open=false;powered=false minecraft:fence_gate facing=south;in_wall=true;open=false;powered=false +1713 minecraft:oak_fence_gate facing=west;in_wall=false;open=false;powered=false minecraft:fence_gate facing=west;in_wall=false;open=false;powered=false minecraft:fence_gate facing=west;in_wall=true;open=false;powered=false +1714 minecraft:oak_fence_gate facing=north;in_wall=false;open=false;powered=false minecraft:fence_gate facing=north;in_wall=false;open=false;powered=false minecraft:fence_gate facing=north;in_wall=true;open=false;powered=false +1715 minecraft:oak_fence_gate facing=east;in_wall=false;open=false;powered=false minecraft:fence_gate facing=east;in_wall=false;open=false;powered=false minecraft:fence_gate facing=east;in_wall=true;open=false;powered=false +1716 minecraft:oak_fence_gate facing=south;in_wall=false;open=true;powered=false minecraft:fence_gate facing=south;in_wall=false;open=true;powered=false minecraft:fence_gate facing=south;in_wall=true;open=true;powered=false +1717 minecraft:oak_fence_gate facing=west;in_wall=false;open=true;powered=false minecraft:fence_gate facing=west;in_wall=false;open=true;powered=false minecraft:fence_gate facing=west;in_wall=true;open=true;powered=false +1718 minecraft:oak_fence_gate facing=north;in_wall=false;open=true;powered=false minecraft:fence_gate facing=north;in_wall=false;open=true;powered=false minecraft:fence_gate facing=north;in_wall=true;open=true;powered=false +1719 minecraft:oak_fence_gate facing=east;in_wall=false;open=true;powered=false minecraft:fence_gate facing=east;in_wall=false;open=true;powered=false minecraft:fence_gate facing=east;in_wall=true;open=true;powered=false +1720 minecraft:oak_fence_gate facing=south;in_wall=false;open=false;powered=true minecraft:fence_gate facing=south;in_wall=false;open=false;powered=true minecraft:fence_gate facing=south;in_wall=true;open=false;powered=true +1721 minecraft:oak_fence_gate facing=west;in_wall=false;open=false;powered=true minecraft:fence_gate facing=west;in_wall=false;open=false;powered=true minecraft:fence_gate facing=west;in_wall=true;open=false;powered=true +1722 minecraft:oak_fence_gate facing=north;in_wall=false;open=false;powered=true minecraft:fence_gate facing=north;in_wall=false;open=false;powered=true minecraft:fence_gate facing=north;in_wall=true;open=false;powered=true +1723 minecraft:oak_fence_gate facing=east;in_wall=false;open=false;powered=true minecraft:fence_gate facing=east;in_wall=false;open=false;powered=true minecraft:fence_gate facing=east;in_wall=true;open=false;powered=true +1724 minecraft:oak_fence_gate facing=south;in_wall=false;open=true;powered=true minecraft:fence_gate facing=south;in_wall=false;open=true;powered=true minecraft:fence_gate facing=south;in_wall=true;open=true;powered=true +1725 minecraft:oak_fence_gate facing=west;in_wall=false;open=true;powered=true minecraft:fence_gate facing=west;in_wall=false;open=true;powered=true minecraft:fence_gate facing=west;in_wall=true;open=true;powered=true +1726 minecraft:oak_fence_gate facing=north;in_wall=false;open=true;powered=true minecraft:fence_gate facing=north;in_wall=false;open=true;powered=true minecraft:fence_gate facing=north;in_wall=true;open=true;powered=true +1727 minecraft:oak_fence_gate facing=east;in_wall=false;open=true;powered=true minecraft:fence_gate facing=east;in_wall=false;open=true;powered=true minecraft:fence_gate facing=east;in_wall=true;open=true;powered=true +1728 minecraft:brick_stairs facing=east;half=bottom;shape=straight minecraft:brick_stairs facing=east;half=bottom;shape=inner_left minecraft:brick_stairs facing=east;half=bottom;shape=inner_right minecraft:brick_stairs facing=east;half=bottom;shape=outer_left minecraft:brick_stairs facing=east;half=bottom;shape=outer_right minecraft:brick_stairs facing=east;half=bottom;shape=straight +1729 minecraft:brick_stairs facing=west;half=bottom;shape=straight minecraft:brick_stairs facing=west;half=bottom;shape=inner_left minecraft:brick_stairs facing=west;half=bottom;shape=inner_right minecraft:brick_stairs facing=west;half=bottom;shape=outer_left minecraft:brick_stairs facing=west;half=bottom;shape=outer_right minecraft:brick_stairs facing=west;half=bottom;shape=straight +1730 minecraft:brick_stairs facing=south;half=bottom;shape=straight minecraft:brick_stairs facing=south;half=bottom;shape=inner_left minecraft:brick_stairs facing=south;half=bottom;shape=inner_right minecraft:brick_stairs facing=south;half=bottom;shape=outer_left minecraft:brick_stairs facing=south;half=bottom;shape=outer_right minecraft:brick_stairs facing=south;half=bottom;shape=straight +1731 minecraft:brick_stairs facing=north;half=bottom;shape=straight minecraft:brick_stairs facing=north;half=bottom;shape=inner_left minecraft:brick_stairs facing=north;half=bottom;shape=inner_right minecraft:brick_stairs facing=north;half=bottom;shape=outer_left minecraft:brick_stairs facing=north;half=bottom;shape=outer_right minecraft:brick_stairs facing=north;half=bottom;shape=straight +1732 minecraft:brick_stairs facing=east;half=top;shape=straight minecraft:brick_stairs facing=east;half=top;shape=inner_left minecraft:brick_stairs facing=east;half=top;shape=inner_right minecraft:brick_stairs facing=east;half=top;shape=outer_left minecraft:brick_stairs facing=east;half=top;shape=outer_right minecraft:brick_stairs facing=east;half=top;shape=straight +1733 minecraft:brick_stairs facing=west;half=top;shape=straight minecraft:brick_stairs facing=west;half=top;shape=inner_left minecraft:brick_stairs facing=west;half=top;shape=inner_right minecraft:brick_stairs facing=west;half=top;shape=outer_left minecraft:brick_stairs facing=west;half=top;shape=outer_right minecraft:brick_stairs facing=west;half=top;shape=straight +1734 minecraft:brick_stairs facing=south;half=top;shape=straight minecraft:brick_stairs facing=south;half=top;shape=inner_left minecraft:brick_stairs facing=south;half=top;shape=inner_right minecraft:brick_stairs facing=south;half=top;shape=outer_left minecraft:brick_stairs facing=south;half=top;shape=outer_right minecraft:brick_stairs facing=south;half=top;shape=straight +1735 minecraft:brick_stairs facing=north;half=top;shape=straight minecraft:brick_stairs facing=north;half=top;shape=inner_left minecraft:brick_stairs facing=north;half=top;shape=inner_right minecraft:brick_stairs facing=north;half=top;shape=outer_left minecraft:brick_stairs facing=north;half=top;shape=outer_right minecraft:brick_stairs facing=north;half=top;shape=straight +1744 minecraft:stone_brick_stairs facing=east;half=bottom;shape=straight minecraft:stone_brick_stairs facing=east;half=bottom;shape=inner_left minecraft:stone_brick_stairs facing=east;half=bottom;shape=inner_right minecraft:stone_brick_stairs facing=east;half=bottom;shape=outer_left minecraft:stone_brick_stairs facing=east;half=bottom;shape=outer_right minecraft:stone_brick_stairs facing=east;half=bottom;shape=straight +1745 minecraft:stone_brick_stairs facing=west;half=bottom;shape=straight minecraft:stone_brick_stairs facing=west;half=bottom;shape=inner_left minecraft:stone_brick_stairs facing=west;half=bottom;shape=inner_right minecraft:stone_brick_stairs facing=west;half=bottom;shape=outer_left minecraft:stone_brick_stairs facing=west;half=bottom;shape=outer_right minecraft:stone_brick_stairs facing=west;half=bottom;shape=straight +1746 minecraft:stone_brick_stairs facing=south;half=bottom;shape=straight minecraft:stone_brick_stairs facing=south;half=bottom;shape=inner_left minecraft:stone_brick_stairs facing=south;half=bottom;shape=inner_right minecraft:stone_brick_stairs facing=south;half=bottom;shape=outer_left minecraft:stone_brick_stairs facing=south;half=bottom;shape=outer_right minecraft:stone_brick_stairs facing=south;half=bottom;shape=straight +1747 minecraft:stone_brick_stairs facing=north;half=bottom;shape=straight minecraft:stone_brick_stairs facing=north;half=bottom;shape=inner_left minecraft:stone_brick_stairs facing=north;half=bottom;shape=inner_right minecraft:stone_brick_stairs facing=north;half=bottom;shape=outer_left minecraft:stone_brick_stairs facing=north;half=bottom;shape=outer_right minecraft:stone_brick_stairs facing=north;half=bottom;shape=straight +1748 minecraft:stone_brick_stairs facing=east;half=top;shape=straight minecraft:stone_brick_stairs facing=east;half=top;shape=inner_left minecraft:stone_brick_stairs facing=east;half=top;shape=inner_right minecraft:stone_brick_stairs facing=east;half=top;shape=outer_left minecraft:stone_brick_stairs facing=east;half=top;shape=outer_right minecraft:stone_brick_stairs facing=east;half=top;shape=straight +1749 minecraft:stone_brick_stairs facing=west;half=top;shape=straight minecraft:stone_brick_stairs facing=west;half=top;shape=inner_left minecraft:stone_brick_stairs facing=west;half=top;shape=inner_right minecraft:stone_brick_stairs facing=west;half=top;shape=outer_left minecraft:stone_brick_stairs facing=west;half=top;shape=outer_right minecraft:stone_brick_stairs facing=west;half=top;shape=straight +1750 minecraft:stone_brick_stairs facing=south;half=top;shape=straight minecraft:stone_brick_stairs facing=south;half=top;shape=inner_left minecraft:stone_brick_stairs facing=south;half=top;shape=inner_right minecraft:stone_brick_stairs facing=south;half=top;shape=outer_left minecraft:stone_brick_stairs facing=south;half=top;shape=outer_right minecraft:stone_brick_stairs facing=south;half=top;shape=straight +1751 minecraft:stone_brick_stairs facing=north;half=top;shape=straight minecraft:stone_brick_stairs facing=north;half=top;shape=inner_left minecraft:stone_brick_stairs facing=north;half=top;shape=inner_right minecraft:stone_brick_stairs facing=north;half=top;shape=outer_left minecraft:stone_brick_stairs facing=north;half=top;shape=outer_right minecraft:stone_brick_stairs facing=north;half=top;shape=straight +1760 minecraft:mycelium snowy=false minecraft:mycelium snowy=false minecraft:mycelium snowy=true +1776 minecraft:lily_pad minecraft:waterlily +1792 minecraft:nether_bricks minecraft:nether_brick +1808 minecraft:nether_brick_fence east=false;north=false;south=false;west=false minecraft:nether_brick_fence east=false;north=false;south=false;west=false minecraft:nether_brick_fence east=false;north=false;south=false;west=true minecraft:nether_brick_fence east=false;north=false;south=true;west=false minecraft:nether_brick_fence east=false;north=false;south=true;west=true minecraft:nether_brick_fence east=false;north=true;south=false;west=false minecraft:nether_brick_fence east=false;north=true;south=false;west=true minecraft:nether_brick_fence east=false;north=true;south=true;west=false minecraft:nether_brick_fence east=false;north=true;south=true;west=true minecraft:nether_brick_fence east=true;north=false;south=false;west=false minecraft:nether_brick_fence east=true;north=false;south=false;west=true minecraft:nether_brick_fence east=true;north=false;south=true;west=false minecraft:nether_brick_fence east=true;north=false;south=true;west=true minecraft:nether_brick_fence east=true;north=true;south=false;west=false minecraft:nether_brick_fence east=true;north=true;south=false;west=true minecraft:nether_brick_fence east=true;north=true;south=true;west=false minecraft:nether_brick_fence east=true;north=true;south=true;west=true +1824 minecraft:nether_brick_stairs facing=east;half=bottom;shape=straight minecraft:nether_brick_stairs facing=east;half=bottom;shape=inner_left minecraft:nether_brick_stairs facing=east;half=bottom;shape=inner_right minecraft:nether_brick_stairs facing=east;half=bottom;shape=outer_left minecraft:nether_brick_stairs facing=east;half=bottom;shape=outer_right minecraft:nether_brick_stairs facing=east;half=bottom;shape=straight +1825 minecraft:nether_brick_stairs facing=west;half=bottom;shape=straight minecraft:nether_brick_stairs facing=west;half=bottom;shape=inner_left minecraft:nether_brick_stairs facing=west;half=bottom;shape=inner_right minecraft:nether_brick_stairs facing=west;half=bottom;shape=outer_left minecraft:nether_brick_stairs facing=west;half=bottom;shape=outer_right minecraft:nether_brick_stairs facing=west;half=bottom;shape=straight +1826 minecraft:nether_brick_stairs facing=south;half=bottom;shape=straight minecraft:nether_brick_stairs facing=south;half=bottom;shape=inner_left minecraft:nether_brick_stairs facing=south;half=bottom;shape=inner_right minecraft:nether_brick_stairs facing=south;half=bottom;shape=outer_left minecraft:nether_brick_stairs facing=south;half=bottom;shape=outer_right minecraft:nether_brick_stairs facing=south;half=bottom;shape=straight +1827 minecraft:nether_brick_stairs facing=north;half=bottom;shape=straight minecraft:nether_brick_stairs facing=north;half=bottom;shape=inner_left minecraft:nether_brick_stairs facing=north;half=bottom;shape=inner_right minecraft:nether_brick_stairs facing=north;half=bottom;shape=outer_left minecraft:nether_brick_stairs facing=north;half=bottom;shape=outer_right minecraft:nether_brick_stairs facing=north;half=bottom;shape=straight +1828 minecraft:nether_brick_stairs facing=east;half=top;shape=straight minecraft:nether_brick_stairs facing=east;half=top;shape=inner_left minecraft:nether_brick_stairs facing=east;half=top;shape=inner_right minecraft:nether_brick_stairs facing=east;half=top;shape=outer_left minecraft:nether_brick_stairs facing=east;half=top;shape=outer_right minecraft:nether_brick_stairs facing=east;half=top;shape=straight +1829 minecraft:nether_brick_stairs facing=west;half=top;shape=straight minecraft:nether_brick_stairs facing=west;half=top;shape=inner_left minecraft:nether_brick_stairs facing=west;half=top;shape=inner_right minecraft:nether_brick_stairs facing=west;half=top;shape=outer_left minecraft:nether_brick_stairs facing=west;half=top;shape=outer_right minecraft:nether_brick_stairs facing=west;half=top;shape=straight +1830 minecraft:nether_brick_stairs facing=south;half=top;shape=straight minecraft:nether_brick_stairs facing=south;half=top;shape=inner_left minecraft:nether_brick_stairs facing=south;half=top;shape=inner_right minecraft:nether_brick_stairs facing=south;half=top;shape=outer_left minecraft:nether_brick_stairs facing=south;half=top;shape=outer_right minecraft:nether_brick_stairs facing=south;half=top;shape=straight +1831 minecraft:nether_brick_stairs facing=north;half=top;shape=straight minecraft:nether_brick_stairs facing=north;half=top;shape=inner_left minecraft:nether_brick_stairs facing=north;half=top;shape=inner_right minecraft:nether_brick_stairs facing=north;half=top;shape=outer_left minecraft:nether_brick_stairs facing=north;half=top;shape=outer_right minecraft:nether_brick_stairs facing=north;half=top;shape=straight +1840 minecraft:nether_wart age=0 minecraft:nether_wart age=0 +1841 minecraft:nether_wart age=1 minecraft:nether_wart age=1 +1842 minecraft:nether_wart age=2 minecraft:nether_wart age=2 +1843 minecraft:nether_wart age=3 minecraft:nether_wart age=3 +1856 minecraft:enchanting_table minecraft:enchanting_table +1872 minecraft:brewing_stand has_bottle_0=false;has_bottle_1=false;has_bottle_2=false minecraft:brewing_stand has_bottle_0=false;has_bottle_1=false;has_bottle_2=false +1873 minecraft:brewing_stand has_bottle_0=true;has_bottle_1=false;has_bottle_2=false minecraft:brewing_stand has_bottle_0=true;has_bottle_1=false;has_bottle_2=false +1874 minecraft:brewing_stand has_bottle_0=false;has_bottle_1=true;has_bottle_2=false minecraft:brewing_stand has_bottle_0=false;has_bottle_1=true;has_bottle_2=false +1875 minecraft:brewing_stand has_bottle_0=true;has_bottle_1=true;has_bottle_2=false minecraft:brewing_stand has_bottle_0=true;has_bottle_1=true;has_bottle_2=false +1876 minecraft:brewing_stand has_bottle_0=false;has_bottle_1=false;has_bottle_2=true minecraft:brewing_stand has_bottle_0=false;has_bottle_1=false;has_bottle_2=true +1877 minecraft:brewing_stand has_bottle_0=true;has_bottle_1=false;has_bottle_2=true minecraft:brewing_stand has_bottle_0=true;has_bottle_1=false;has_bottle_2=true +1878 minecraft:brewing_stand has_bottle_0=false;has_bottle_1=true;has_bottle_2=true minecraft:brewing_stand has_bottle_0=false;has_bottle_1=true;has_bottle_2=true +1879 minecraft:brewing_stand has_bottle_0=true;has_bottle_1=true;has_bottle_2=true minecraft:brewing_stand has_bottle_0=true;has_bottle_1=true;has_bottle_2=true +1888 minecraft:cauldron level=0 minecraft:cauldron level=0 +1889 minecraft:cauldron level=1 minecraft:cauldron level=1 +1890 minecraft:cauldron level=2 minecraft:cauldron level=2 +1891 minecraft:cauldron level=3 minecraft:cauldron level=3 +1904 minecraft:end_portal minecraft:end_portal +1920 minecraft:end_portal_frame eye=false;facing=south minecraft:end_portal_frame eye=false;facing=south +1921 minecraft:end_portal_frame eye=false;facing=west minecraft:end_portal_frame eye=false;facing=west +1922 minecraft:end_portal_frame eye=false;facing=north minecraft:end_portal_frame eye=false;facing=north +1923 minecraft:end_portal_frame eye=false;facing=east minecraft:end_portal_frame eye=false;facing=east +1924 minecraft:end_portal_frame eye=true;facing=south minecraft:end_portal_frame eye=true;facing=south +1925 minecraft:end_portal_frame eye=true;facing=west minecraft:end_portal_frame eye=true;facing=west +1926 minecraft:end_portal_frame eye=true;facing=north minecraft:end_portal_frame eye=true;facing=north +1927 minecraft:end_portal_frame eye=true;facing=east minecraft:end_portal_frame eye=true;facing=east +1936 minecraft:end_stone minecraft:end_stone +1952 minecraft:dragon_egg minecraft:dragon_egg +1968 minecraft:redstone_lamp lit=false minecraft:redstone_lamp +1984 minecraft:redstone_lamp lit=true minecraft:lit_redstone_lamp +2000 minecraft:oak_slab type=double minecraft:double_wooden_slab variant=oak +2001 minecraft:spruce_slab type=double minecraft:double_wooden_slab variant=spruce +2002 minecraft:birch_slab type=double minecraft:double_wooden_slab variant=birch +2003 minecraft:jungle_slab type=double minecraft:double_wooden_slab variant=jungle +2004 minecraft:acacia_slab type=double minecraft:double_wooden_slab variant=acacia +2005 minecraft:dark_oak_slab type=double minecraft:double_wooden_slab variant=dark_oak +2016 minecraft:oak_slab type=bottom minecraft:wooden_slab half=bottom;variant=oak +2017 minecraft:spruce_slab type=bottom minecraft:wooden_slab half=bottom;variant=spruce +2018 minecraft:birch_slab type=bottom minecraft:wooden_slab half=bottom;variant=birch +2019 minecraft:jungle_slab type=bottom minecraft:wooden_slab half=bottom;variant=jungle +2020 minecraft:acacia_slab type=bottom minecraft:wooden_slab half=bottom;variant=acacia +2021 minecraft:dark_oak_slab type=bottom minecraft:wooden_slab half=bottom;variant=dark_oak +2024 minecraft:oak_slab type=top minecraft:wooden_slab half=top;variant=oak +2025 minecraft:spruce_slab type=top minecraft:wooden_slab half=top;variant=spruce +2026 minecraft:birch_slab type=top minecraft:wooden_slab half=top;variant=birch +2027 minecraft:jungle_slab type=top minecraft:wooden_slab half=top;variant=jungle +2028 minecraft:acacia_slab type=top minecraft:wooden_slab half=top;variant=acacia +2029 minecraft:dark_oak_slab type=top minecraft:wooden_slab half=top;variant=dark_oak +2032 minecraft:cocoa age=0;facing=south minecraft:cocoa age=0;facing=south +2033 minecraft:cocoa age=0;facing=west minecraft:cocoa age=0;facing=west +2034 minecraft:cocoa age=0;facing=north minecraft:cocoa age=0;facing=north +2035 minecraft:cocoa age=0;facing=east minecraft:cocoa age=0;facing=east +2036 minecraft:cocoa age=1;facing=south minecraft:cocoa age=1;facing=south +2037 minecraft:cocoa age=1;facing=west minecraft:cocoa age=1;facing=west +2038 minecraft:cocoa age=1;facing=north minecraft:cocoa age=1;facing=north +2039 minecraft:cocoa age=1;facing=east minecraft:cocoa age=1;facing=east +2040 minecraft:cocoa age=2;facing=south minecraft:cocoa age=2;facing=south +2041 minecraft:cocoa age=2;facing=west minecraft:cocoa age=2;facing=west +2042 minecraft:cocoa age=2;facing=north minecraft:cocoa age=2;facing=north +2043 minecraft:cocoa age=2;facing=east minecraft:cocoa age=2;facing=east +2048 minecraft:sandstone_stairs facing=east;half=bottom;shape=straight minecraft:sandstone_stairs facing=east;half=bottom;shape=inner_left minecraft:sandstone_stairs facing=east;half=bottom;shape=inner_right minecraft:sandstone_stairs facing=east;half=bottom;shape=outer_left minecraft:sandstone_stairs facing=east;half=bottom;shape=outer_right minecraft:sandstone_stairs facing=east;half=bottom;shape=straight +2049 minecraft:sandstone_stairs facing=west;half=bottom;shape=straight minecraft:sandstone_stairs facing=west;half=bottom;shape=inner_left minecraft:sandstone_stairs facing=west;half=bottom;shape=inner_right minecraft:sandstone_stairs facing=west;half=bottom;shape=outer_left minecraft:sandstone_stairs facing=west;half=bottom;shape=outer_right minecraft:sandstone_stairs facing=west;half=bottom;shape=straight +2050 minecraft:sandstone_stairs facing=south;half=bottom;shape=straight minecraft:sandstone_stairs facing=south;half=bottom;shape=inner_left minecraft:sandstone_stairs facing=south;half=bottom;shape=inner_right minecraft:sandstone_stairs facing=south;half=bottom;shape=outer_left minecraft:sandstone_stairs facing=south;half=bottom;shape=outer_right minecraft:sandstone_stairs facing=south;half=bottom;shape=straight +2051 minecraft:sandstone_stairs facing=north;half=bottom;shape=straight minecraft:sandstone_stairs facing=north;half=bottom;shape=inner_left minecraft:sandstone_stairs facing=north;half=bottom;shape=inner_right minecraft:sandstone_stairs facing=north;half=bottom;shape=outer_left minecraft:sandstone_stairs facing=north;half=bottom;shape=outer_right minecraft:sandstone_stairs facing=north;half=bottom;shape=straight +2052 minecraft:sandstone_stairs facing=east;half=top;shape=straight minecraft:sandstone_stairs facing=east;half=top;shape=inner_left minecraft:sandstone_stairs facing=east;half=top;shape=inner_right minecraft:sandstone_stairs facing=east;half=top;shape=outer_left minecraft:sandstone_stairs facing=east;half=top;shape=outer_right minecraft:sandstone_stairs facing=east;half=top;shape=straight +2053 minecraft:sandstone_stairs facing=west;half=top;shape=straight minecraft:sandstone_stairs facing=west;half=top;shape=inner_left minecraft:sandstone_stairs facing=west;half=top;shape=inner_right minecraft:sandstone_stairs facing=west;half=top;shape=outer_left minecraft:sandstone_stairs facing=west;half=top;shape=outer_right minecraft:sandstone_stairs facing=west;half=top;shape=straight +2054 minecraft:sandstone_stairs facing=south;half=top;shape=straight minecraft:sandstone_stairs facing=south;half=top;shape=inner_left minecraft:sandstone_stairs facing=south;half=top;shape=inner_right minecraft:sandstone_stairs facing=south;half=top;shape=outer_left minecraft:sandstone_stairs facing=south;half=top;shape=outer_right minecraft:sandstone_stairs facing=south;half=top;shape=straight +2055 minecraft:sandstone_stairs facing=north;half=top;shape=straight minecraft:sandstone_stairs facing=north;half=top;shape=inner_left minecraft:sandstone_stairs facing=north;half=top;shape=inner_right minecraft:sandstone_stairs facing=north;half=top;shape=outer_left minecraft:sandstone_stairs facing=north;half=top;shape=outer_right minecraft:sandstone_stairs facing=north;half=top;shape=straight +2064 minecraft:emerald_ore minecraft:emerald_ore +2082 minecraft:ender_chest facing=north minecraft:ender_chest facing=north +2083 minecraft:ender_chest facing=south minecraft:ender_chest facing=south +2084 minecraft:ender_chest facing=west minecraft:ender_chest facing=west +2085 minecraft:ender_chest facing=east minecraft:ender_chest facing=east +2096 minecraft:tripwire_hook attached=false;facing=south;powered=false minecraft:tripwire_hook attached=false;facing=south;powered=false +2097 minecraft:tripwire_hook attached=false;facing=west;powered=false minecraft:tripwire_hook attached=false;facing=west;powered=false +2098 minecraft:tripwire_hook attached=false;facing=north;powered=false minecraft:tripwire_hook attached=false;facing=north;powered=false +2099 minecraft:tripwire_hook attached=false;facing=east;powered=false minecraft:tripwire_hook attached=false;facing=east;powered=false +2100 minecraft:tripwire_hook attached=true;facing=south;powered=false minecraft:tripwire_hook attached=true;facing=south;powered=false +2101 minecraft:tripwire_hook attached=true;facing=west;powered=false minecraft:tripwire_hook attached=true;facing=west;powered=false +2102 minecraft:tripwire_hook attached=true;facing=north;powered=false minecraft:tripwire_hook attached=true;facing=north;powered=false +2103 minecraft:tripwire_hook attached=true;facing=east;powered=false minecraft:tripwire_hook attached=true;facing=east;powered=false +2104 minecraft:tripwire_hook attached=false;facing=south;powered=true minecraft:tripwire_hook attached=false;facing=south;powered=true +2105 minecraft:tripwire_hook attached=false;facing=west;powered=true minecraft:tripwire_hook attached=false;facing=west;powered=true +2106 minecraft:tripwire_hook attached=false;facing=north;powered=true minecraft:tripwire_hook attached=false;facing=north;powered=true +2107 minecraft:tripwire_hook attached=false;facing=east;powered=true minecraft:tripwire_hook attached=false;facing=east;powered=true +2108 minecraft:tripwire_hook attached=true;facing=south;powered=true minecraft:tripwire_hook attached=true;facing=south;powered=true +2109 minecraft:tripwire_hook attached=true;facing=west;powered=true minecraft:tripwire_hook attached=true;facing=west;powered=true +2110 minecraft:tripwire_hook attached=true;facing=north;powered=true minecraft:tripwire_hook attached=true;facing=north;powered=true +2111 minecraft:tripwire_hook attached=true;facing=east;powered=true minecraft:tripwire_hook attached=true;facing=east;powered=true +2112 minecraft:tripwire attached=false;disarmed=false;east=false;north=false;powered=false;south=false;west=false minecraft:tripwire attached=false;disarmed=false;east=false;north=false;powered=false;south=false;west=false minecraft:tripwire attached=false;disarmed=false;east=false;north=false;powered=false;south=false;west=true minecraft:tripwire attached=false;disarmed=false;east=false;north=false;powered=false;south=true;west=false minecraft:tripwire attached=false;disarmed=false;east=false;north=false;powered=false;south=true;west=true minecraft:tripwire attached=false;disarmed=false;east=false;north=true;powered=false;south=false;west=false minecraft:tripwire attached=false;disarmed=false;east=false;north=true;powered=false;south=false;west=true minecraft:tripwire attached=false;disarmed=false;east=false;north=true;powered=false;south=true;west=false minecraft:tripwire attached=false;disarmed=false;east=false;north=true;powered=false;south=true;west=true minecraft:tripwire attached=false;disarmed=false;east=true;north=false;powered=false;south=false;west=false minecraft:tripwire attached=false;disarmed=false;east=true;north=false;powered=false;south=false;west=true minecraft:tripwire attached=false;disarmed=false;east=true;north=false;powered=false;south=true;west=false minecraft:tripwire attached=false;disarmed=false;east=true;north=false;powered=false;south=true;west=true minecraft:tripwire attached=false;disarmed=false;east=true;north=true;powered=false;south=false;west=false minecraft:tripwire attached=false;disarmed=false;east=true;north=true;powered=false;south=false;west=true minecraft:tripwire attached=false;disarmed=false;east=true;north=true;powered=false;south=true;west=false minecraft:tripwire attached=false;disarmed=false;east=true;north=true;powered=false;south=true;west=true +2113 minecraft:tripwire attached=false;disarmed=false;east=false;north=false;powered=true;south=false;west=false minecraft:tripwire attached=false;disarmed=false;east=false;north=false;powered=true;south=false;west=false minecraft:tripwire attached=false;disarmed=false;east=false;north=false;powered=true;south=false;west=true minecraft:tripwire attached=false;disarmed=false;east=false;north=false;powered=true;south=true;west=false minecraft:tripwire attached=false;disarmed=false;east=false;north=false;powered=true;south=true;west=true minecraft:tripwire attached=false;disarmed=false;east=false;north=true;powered=true;south=false;west=false minecraft:tripwire attached=false;disarmed=false;east=false;north=true;powered=true;south=false;west=true minecraft:tripwire attached=false;disarmed=false;east=false;north=true;powered=true;south=true;west=false minecraft:tripwire attached=false;disarmed=false;east=false;north=true;powered=true;south=true;west=true minecraft:tripwire attached=false;disarmed=false;east=true;north=false;powered=true;south=false;west=false minecraft:tripwire attached=false;disarmed=false;east=true;north=false;powered=true;south=false;west=true minecraft:tripwire attached=false;disarmed=false;east=true;north=false;powered=true;south=true;west=false minecraft:tripwire attached=false;disarmed=false;east=true;north=false;powered=true;south=true;west=true minecraft:tripwire attached=false;disarmed=false;east=true;north=true;powered=true;south=false;west=false minecraft:tripwire attached=false;disarmed=false;east=true;north=true;powered=true;south=false;west=true minecraft:tripwire attached=false;disarmed=false;east=true;north=true;powered=true;south=true;west=false minecraft:tripwire attached=false;disarmed=false;east=true;north=true;powered=true;south=true;west=true +2114 minecraft:tripwire attached=false;disarmed=false;east=false;north=false;powered=false;south=false;west=false +2115 minecraft:tripwire attached=false;disarmed=false;east=false;north=false;powered=true;south=false;west=false +2116 minecraft:tripwire attached=true;disarmed=false;east=false;north=false;powered=false;south=false;west=false minecraft:tripwire attached=true;disarmed=false;east=false;north=false;powered=false;south=false;west=false minecraft:tripwire attached=true;disarmed=false;east=false;north=false;powered=false;south=false;west=true minecraft:tripwire attached=true;disarmed=false;east=false;north=false;powered=false;south=true;west=false minecraft:tripwire attached=true;disarmed=false;east=false;north=false;powered=false;south=true;west=true minecraft:tripwire attached=true;disarmed=false;east=false;north=true;powered=false;south=false;west=false minecraft:tripwire attached=true;disarmed=false;east=false;north=true;powered=false;south=false;west=true minecraft:tripwire attached=true;disarmed=false;east=false;north=true;powered=false;south=true;west=false minecraft:tripwire attached=true;disarmed=false;east=false;north=true;powered=false;south=true;west=true minecraft:tripwire attached=true;disarmed=false;east=true;north=false;powered=false;south=false;west=false minecraft:tripwire attached=true;disarmed=false;east=true;north=false;powered=false;south=false;west=true minecraft:tripwire attached=true;disarmed=false;east=true;north=false;powered=false;south=true;west=false minecraft:tripwire attached=true;disarmed=false;east=true;north=false;powered=false;south=true;west=true minecraft:tripwire attached=true;disarmed=false;east=true;north=true;powered=false;south=false;west=false minecraft:tripwire attached=true;disarmed=false;east=true;north=true;powered=false;south=false;west=true minecraft:tripwire attached=true;disarmed=false;east=true;north=true;powered=false;south=true;west=false minecraft:tripwire attached=true;disarmed=false;east=true;north=true;powered=false;south=true;west=true +2117 minecraft:tripwire attached=true;disarmed=false;east=false;north=false;powered=true;south=false;west=false minecraft:tripwire attached=true;disarmed=false;east=false;north=false;powered=true;south=false;west=false minecraft:tripwire attached=true;disarmed=false;east=false;north=false;powered=true;south=false;west=true minecraft:tripwire attached=true;disarmed=false;east=false;north=false;powered=true;south=true;west=false minecraft:tripwire attached=true;disarmed=false;east=false;north=false;powered=true;south=true;west=true minecraft:tripwire attached=true;disarmed=false;east=false;north=true;powered=true;south=false;west=false minecraft:tripwire attached=true;disarmed=false;east=false;north=true;powered=true;south=false;west=true minecraft:tripwire attached=true;disarmed=false;east=false;north=true;powered=true;south=true;west=false minecraft:tripwire attached=true;disarmed=false;east=false;north=true;powered=true;south=true;west=true minecraft:tripwire attached=true;disarmed=false;east=true;north=false;powered=true;south=false;west=false minecraft:tripwire attached=true;disarmed=false;east=true;north=false;powered=true;south=false;west=true minecraft:tripwire attached=true;disarmed=false;east=true;north=false;powered=true;south=true;west=false minecraft:tripwire attached=true;disarmed=false;east=true;north=false;powered=true;south=true;west=true minecraft:tripwire attached=true;disarmed=false;east=true;north=true;powered=true;south=false;west=false minecraft:tripwire attached=true;disarmed=false;east=true;north=true;powered=true;south=false;west=true minecraft:tripwire attached=true;disarmed=false;east=true;north=true;powered=true;south=true;west=false minecraft:tripwire attached=true;disarmed=false;east=true;north=true;powered=true;south=true;west=true +2118 minecraft:tripwire attached=true;disarmed=false;east=false;north=false;powered=false;south=false;west=false +2119 minecraft:tripwire attached=true;disarmed=false;east=false;north=false;powered=true;south=false;west=false +2120 minecraft:tripwire attached=false;disarmed=true;east=false;north=false;powered=false;south=false;west=false minecraft:tripwire attached=false;disarmed=true;east=false;north=false;powered=false;south=false;west=false minecraft:tripwire attached=false;disarmed=true;east=false;north=false;powered=false;south=false;west=true minecraft:tripwire attached=false;disarmed=true;east=false;north=false;powered=false;south=true;west=false minecraft:tripwire attached=false;disarmed=true;east=false;north=false;powered=false;south=true;west=true minecraft:tripwire attached=false;disarmed=true;east=false;north=true;powered=false;south=false;west=false minecraft:tripwire attached=false;disarmed=true;east=false;north=true;powered=false;south=false;west=true minecraft:tripwire attached=false;disarmed=true;east=false;north=true;powered=false;south=true;west=false minecraft:tripwire attached=false;disarmed=true;east=false;north=true;powered=false;south=true;west=true minecraft:tripwire attached=false;disarmed=true;east=true;north=false;powered=false;south=false;west=false minecraft:tripwire attached=false;disarmed=true;east=true;north=false;powered=false;south=false;west=true minecraft:tripwire attached=false;disarmed=true;east=true;north=false;powered=false;south=true;west=false minecraft:tripwire attached=false;disarmed=true;east=true;north=false;powered=false;south=true;west=true minecraft:tripwire attached=false;disarmed=true;east=true;north=true;powered=false;south=false;west=false minecraft:tripwire attached=false;disarmed=true;east=true;north=true;powered=false;south=false;west=true minecraft:tripwire attached=false;disarmed=true;east=true;north=true;powered=false;south=true;west=false minecraft:tripwire attached=false;disarmed=true;east=true;north=true;powered=false;south=true;west=true +2121 minecraft:tripwire attached=false;disarmed=true;east=false;north=false;powered=true;south=false;west=false minecraft:tripwire attached=false;disarmed=true;east=false;north=false;powered=true;south=false;west=false minecraft:tripwire attached=false;disarmed=true;east=false;north=false;powered=true;south=false;west=true minecraft:tripwire attached=false;disarmed=true;east=false;north=false;powered=true;south=true;west=false minecraft:tripwire attached=false;disarmed=true;east=false;north=false;powered=true;south=true;west=true minecraft:tripwire attached=false;disarmed=true;east=false;north=true;powered=true;south=false;west=false minecraft:tripwire attached=false;disarmed=true;east=false;north=true;powered=true;south=false;west=true minecraft:tripwire attached=false;disarmed=true;east=false;north=true;powered=true;south=true;west=false minecraft:tripwire attached=false;disarmed=true;east=false;north=true;powered=true;south=true;west=true minecraft:tripwire attached=false;disarmed=true;east=true;north=false;powered=true;south=false;west=false minecraft:tripwire attached=false;disarmed=true;east=true;north=false;powered=true;south=false;west=true minecraft:tripwire attached=false;disarmed=true;east=true;north=false;powered=true;south=true;west=false minecraft:tripwire attached=false;disarmed=true;east=true;north=false;powered=true;south=true;west=true minecraft:tripwire attached=false;disarmed=true;east=true;north=true;powered=true;south=false;west=false minecraft:tripwire attached=false;disarmed=true;east=true;north=true;powered=true;south=false;west=true minecraft:tripwire attached=false;disarmed=true;east=true;north=true;powered=true;south=true;west=false minecraft:tripwire attached=false;disarmed=true;east=true;north=true;powered=true;south=true;west=true +2122 minecraft:tripwire attached=false;disarmed=true;east=false;north=false;powered=false;south=false;west=false +2123 minecraft:tripwire attached=false;disarmed=true;east=false;north=false;powered=true;south=false;west=false +2124 minecraft:tripwire attached=true;disarmed=true;east=false;north=false;powered=false;south=false;west=false minecraft:tripwire attached=true;disarmed=true;east=false;north=false;powered=false;south=false;west=false minecraft:tripwire attached=true;disarmed=true;east=false;north=false;powered=false;south=false;west=true minecraft:tripwire attached=true;disarmed=true;east=false;north=false;powered=false;south=true;west=false minecraft:tripwire attached=true;disarmed=true;east=false;north=false;powered=false;south=true;west=true minecraft:tripwire attached=true;disarmed=true;east=false;north=true;powered=false;south=false;west=false minecraft:tripwire attached=true;disarmed=true;east=false;north=true;powered=false;south=false;west=true minecraft:tripwire attached=true;disarmed=true;east=false;north=true;powered=false;south=true;west=false minecraft:tripwire attached=true;disarmed=true;east=false;north=true;powered=false;south=true;west=true minecraft:tripwire attached=true;disarmed=true;east=true;north=false;powered=false;south=false;west=false minecraft:tripwire attached=true;disarmed=true;east=true;north=false;powered=false;south=false;west=true minecraft:tripwire attached=true;disarmed=true;east=true;north=false;powered=false;south=true;west=false minecraft:tripwire attached=true;disarmed=true;east=true;north=false;powered=false;south=true;west=true minecraft:tripwire attached=true;disarmed=true;east=true;north=true;powered=false;south=false;west=false minecraft:tripwire attached=true;disarmed=true;east=true;north=true;powered=false;south=false;west=true minecraft:tripwire attached=true;disarmed=true;east=true;north=true;powered=false;south=true;west=false minecraft:tripwire attached=true;disarmed=true;east=true;north=true;powered=false;south=true;west=true +2125 minecraft:tripwire attached=true;disarmed=true;east=false;north=false;powered=true;south=false;west=false minecraft:tripwire attached=true;disarmed=true;east=false;north=false;powered=true;south=false;west=false minecraft:tripwire attached=true;disarmed=true;east=false;north=false;powered=true;south=false;west=true minecraft:tripwire attached=true;disarmed=true;east=false;north=false;powered=true;south=true;west=false minecraft:tripwire attached=true;disarmed=true;east=false;north=false;powered=true;south=true;west=true minecraft:tripwire attached=true;disarmed=true;east=false;north=true;powered=true;south=false;west=false minecraft:tripwire attached=true;disarmed=true;east=false;north=true;powered=true;south=false;west=true minecraft:tripwire attached=true;disarmed=true;east=false;north=true;powered=true;south=true;west=false minecraft:tripwire attached=true;disarmed=true;east=false;north=true;powered=true;south=true;west=true minecraft:tripwire attached=true;disarmed=true;east=true;north=false;powered=true;south=false;west=false minecraft:tripwire attached=true;disarmed=true;east=true;north=false;powered=true;south=false;west=true minecraft:tripwire attached=true;disarmed=true;east=true;north=false;powered=true;south=true;west=false minecraft:tripwire attached=true;disarmed=true;east=true;north=false;powered=true;south=true;west=true minecraft:tripwire attached=true;disarmed=true;east=true;north=true;powered=true;south=false;west=false minecraft:tripwire attached=true;disarmed=true;east=true;north=true;powered=true;south=false;west=true minecraft:tripwire attached=true;disarmed=true;east=true;north=true;powered=true;south=true;west=false minecraft:tripwire attached=true;disarmed=true;east=true;north=true;powered=true;south=true;west=true +2126 minecraft:tripwire attached=true;disarmed=true;east=false;north=false;powered=false;south=false;west=false +2128 minecraft:emerald_block minecraft:emerald_block +2144 minecraft:spruce_stairs facing=east;half=bottom;shape=straight minecraft:spruce_stairs facing=east;half=bottom;shape=inner_left minecraft:spruce_stairs facing=east;half=bottom;shape=inner_right minecraft:spruce_stairs facing=east;half=bottom;shape=outer_left minecraft:spruce_stairs facing=east;half=bottom;shape=outer_right minecraft:spruce_stairs facing=east;half=bottom;shape=straight +2145 minecraft:spruce_stairs facing=west;half=bottom;shape=straight minecraft:spruce_stairs facing=west;half=bottom;shape=inner_left minecraft:spruce_stairs facing=west;half=bottom;shape=inner_right minecraft:spruce_stairs facing=west;half=bottom;shape=outer_left minecraft:spruce_stairs facing=west;half=bottom;shape=outer_right minecraft:spruce_stairs facing=west;half=bottom;shape=straight +2146 minecraft:spruce_stairs facing=south;half=bottom;shape=straight minecraft:spruce_stairs facing=south;half=bottom;shape=inner_left minecraft:spruce_stairs facing=south;half=bottom;shape=inner_right minecraft:spruce_stairs facing=south;half=bottom;shape=outer_left minecraft:spruce_stairs facing=south;half=bottom;shape=outer_right minecraft:spruce_stairs facing=south;half=bottom;shape=straight +2147 minecraft:spruce_stairs facing=north;half=bottom;shape=straight minecraft:spruce_stairs facing=north;half=bottom;shape=inner_left minecraft:spruce_stairs facing=north;half=bottom;shape=inner_right minecraft:spruce_stairs facing=north;half=bottom;shape=outer_left minecraft:spruce_stairs facing=north;half=bottom;shape=outer_right minecraft:spruce_stairs facing=north;half=bottom;shape=straight +2148 minecraft:spruce_stairs facing=east;half=top;shape=straight minecraft:spruce_stairs facing=east;half=top;shape=inner_left minecraft:spruce_stairs facing=east;half=top;shape=inner_right minecraft:spruce_stairs facing=east;half=top;shape=outer_left minecraft:spruce_stairs facing=east;half=top;shape=outer_right minecraft:spruce_stairs facing=east;half=top;shape=straight +2149 minecraft:spruce_stairs facing=west;half=top;shape=straight minecraft:spruce_stairs facing=west;half=top;shape=inner_left minecraft:spruce_stairs facing=west;half=top;shape=inner_right minecraft:spruce_stairs facing=west;half=top;shape=outer_left minecraft:spruce_stairs facing=west;half=top;shape=outer_right minecraft:spruce_stairs facing=west;half=top;shape=straight +2150 minecraft:spruce_stairs facing=south;half=top;shape=straight minecraft:spruce_stairs facing=south;half=top;shape=inner_left minecraft:spruce_stairs facing=south;half=top;shape=inner_right minecraft:spruce_stairs facing=south;half=top;shape=outer_left minecraft:spruce_stairs facing=south;half=top;shape=outer_right minecraft:spruce_stairs facing=south;half=top;shape=straight +2151 minecraft:spruce_stairs facing=north;half=top;shape=straight minecraft:spruce_stairs facing=north;half=top;shape=inner_left minecraft:spruce_stairs facing=north;half=top;shape=inner_right minecraft:spruce_stairs facing=north;half=top;shape=outer_left minecraft:spruce_stairs facing=north;half=top;shape=outer_right minecraft:spruce_stairs facing=north;half=top;shape=straight +2160 minecraft:birch_stairs facing=east;half=bottom;shape=straight minecraft:birch_stairs facing=east;half=bottom;shape=inner_left minecraft:birch_stairs facing=east;half=bottom;shape=inner_right minecraft:birch_stairs facing=east;half=bottom;shape=outer_left minecraft:birch_stairs facing=east;half=bottom;shape=outer_right minecraft:birch_stairs facing=east;half=bottom;shape=straight +2161 minecraft:birch_stairs facing=west;half=bottom;shape=straight minecraft:birch_stairs facing=west;half=bottom;shape=inner_left minecraft:birch_stairs facing=west;half=bottom;shape=inner_right minecraft:birch_stairs facing=west;half=bottom;shape=outer_left minecraft:birch_stairs facing=west;half=bottom;shape=outer_right minecraft:birch_stairs facing=west;half=bottom;shape=straight +2162 minecraft:birch_stairs facing=south;half=bottom;shape=straight minecraft:birch_stairs facing=south;half=bottom;shape=inner_left minecraft:birch_stairs facing=south;half=bottom;shape=inner_right minecraft:birch_stairs facing=south;half=bottom;shape=outer_left minecraft:birch_stairs facing=south;half=bottom;shape=outer_right minecraft:birch_stairs facing=south;half=bottom;shape=straight +2163 minecraft:birch_stairs facing=north;half=bottom;shape=straight minecraft:birch_stairs facing=north;half=bottom;shape=inner_left minecraft:birch_stairs facing=north;half=bottom;shape=inner_right minecraft:birch_stairs facing=north;half=bottom;shape=outer_left minecraft:birch_stairs facing=north;half=bottom;shape=outer_right minecraft:birch_stairs facing=north;half=bottom;shape=straight +2164 minecraft:birch_stairs facing=east;half=top;shape=straight minecraft:birch_stairs facing=east;half=top;shape=inner_left minecraft:birch_stairs facing=east;half=top;shape=inner_right minecraft:birch_stairs facing=east;half=top;shape=outer_left minecraft:birch_stairs facing=east;half=top;shape=outer_right minecraft:birch_stairs facing=east;half=top;shape=straight +2165 minecraft:birch_stairs facing=west;half=top;shape=straight minecraft:birch_stairs facing=west;half=top;shape=inner_left minecraft:birch_stairs facing=west;half=top;shape=inner_right minecraft:birch_stairs facing=west;half=top;shape=outer_left minecraft:birch_stairs facing=west;half=top;shape=outer_right minecraft:birch_stairs facing=west;half=top;shape=straight +2166 minecraft:birch_stairs facing=south;half=top;shape=straight minecraft:birch_stairs facing=south;half=top;shape=inner_left minecraft:birch_stairs facing=south;half=top;shape=inner_right minecraft:birch_stairs facing=south;half=top;shape=outer_left minecraft:birch_stairs facing=south;half=top;shape=outer_right minecraft:birch_stairs facing=south;half=top;shape=straight +2167 minecraft:birch_stairs facing=north;half=top;shape=straight minecraft:birch_stairs facing=north;half=top;shape=inner_left minecraft:birch_stairs facing=north;half=top;shape=inner_right minecraft:birch_stairs facing=north;half=top;shape=outer_left minecraft:birch_stairs facing=north;half=top;shape=outer_right minecraft:birch_stairs facing=north;half=top;shape=straight +2176 minecraft:jungle_stairs facing=east;half=bottom;shape=straight minecraft:jungle_stairs facing=east;half=bottom;shape=inner_left minecraft:jungle_stairs facing=east;half=bottom;shape=inner_right minecraft:jungle_stairs facing=east;half=bottom;shape=outer_left minecraft:jungle_stairs facing=east;half=bottom;shape=outer_right minecraft:jungle_stairs facing=east;half=bottom;shape=straight +2177 minecraft:jungle_stairs facing=west;half=bottom;shape=straight minecraft:jungle_stairs facing=west;half=bottom;shape=inner_left minecraft:jungle_stairs facing=west;half=bottom;shape=inner_right minecraft:jungle_stairs facing=west;half=bottom;shape=outer_left minecraft:jungle_stairs facing=west;half=bottom;shape=outer_right minecraft:jungle_stairs facing=west;half=bottom;shape=straight +2178 minecraft:jungle_stairs facing=south;half=bottom;shape=straight minecraft:jungle_stairs facing=south;half=bottom;shape=inner_left minecraft:jungle_stairs facing=south;half=bottom;shape=inner_right minecraft:jungle_stairs facing=south;half=bottom;shape=outer_left minecraft:jungle_stairs facing=south;half=bottom;shape=outer_right minecraft:jungle_stairs facing=south;half=bottom;shape=straight +2179 minecraft:jungle_stairs facing=north;half=bottom;shape=straight minecraft:jungle_stairs facing=north;half=bottom;shape=inner_left minecraft:jungle_stairs facing=north;half=bottom;shape=inner_right minecraft:jungle_stairs facing=north;half=bottom;shape=outer_left minecraft:jungle_stairs facing=north;half=bottom;shape=outer_right minecraft:jungle_stairs facing=north;half=bottom;shape=straight +2180 minecraft:jungle_stairs facing=east;half=top;shape=straight minecraft:jungle_stairs facing=east;half=top;shape=inner_left minecraft:jungle_stairs facing=east;half=top;shape=inner_right minecraft:jungle_stairs facing=east;half=top;shape=outer_left minecraft:jungle_stairs facing=east;half=top;shape=outer_right minecraft:jungle_stairs facing=east;half=top;shape=straight +2181 minecraft:jungle_stairs facing=west;half=top;shape=straight minecraft:jungle_stairs facing=west;half=top;shape=inner_left minecraft:jungle_stairs facing=west;half=top;shape=inner_right minecraft:jungle_stairs facing=west;half=top;shape=outer_left minecraft:jungle_stairs facing=west;half=top;shape=outer_right minecraft:jungle_stairs facing=west;half=top;shape=straight +2182 minecraft:jungle_stairs facing=south;half=top;shape=straight minecraft:jungle_stairs facing=south;half=top;shape=inner_left minecraft:jungle_stairs facing=south;half=top;shape=inner_right minecraft:jungle_stairs facing=south;half=top;shape=outer_left minecraft:jungle_stairs facing=south;half=top;shape=outer_right minecraft:jungle_stairs facing=south;half=top;shape=straight +2183 minecraft:jungle_stairs facing=north;half=top;shape=straight minecraft:jungle_stairs facing=north;half=top;shape=inner_left minecraft:jungle_stairs facing=north;half=top;shape=inner_right minecraft:jungle_stairs facing=north;half=top;shape=outer_left minecraft:jungle_stairs facing=north;half=top;shape=outer_right minecraft:jungle_stairs facing=north;half=top;shape=straight +2192 minecraft:command_block conditional=false;facing=down minecraft:command_block conditional=false;facing=down +2193 minecraft:command_block conditional=false;facing=up minecraft:command_block conditional=false;facing=up +2194 minecraft:command_block conditional=false;facing=north minecraft:command_block conditional=false;facing=north +2195 minecraft:command_block conditional=false;facing=south minecraft:command_block conditional=false;facing=south +2196 minecraft:command_block conditional=false;facing=west minecraft:command_block conditional=false;facing=west +2197 minecraft:command_block conditional=false;facing=east minecraft:command_block conditional=false;facing=east +2200 minecraft:command_block conditional=true;facing=down minecraft:command_block conditional=true;facing=down +2201 minecraft:command_block conditional=true;facing=up minecraft:command_block conditional=true;facing=up +2202 minecraft:command_block conditional=true;facing=north minecraft:command_block conditional=true;facing=north +2203 minecraft:command_block conditional=true;facing=south minecraft:command_block conditional=true;facing=south +2204 minecraft:command_block conditional=true;facing=west minecraft:command_block conditional=true;facing=west +2205 minecraft:command_block conditional=true;facing=east minecraft:command_block conditional=true;facing=east +2208 minecraft:beacon minecraft:beacon +2224 minecraft:cobblestone_wall east=false;north=false;south=false;up=false;west=false minecraft:cobblestone_wall east=false;north=false;south=false;up=false;variant=cobblestone;west=false minecraft:cobblestone_wall east=false;north=false;south=false;up=false;variant=cobblestone;west=true minecraft:cobblestone_wall east=false;north=false;south=false;up=true;variant=cobblestone;west=false minecraft:cobblestone_wall east=false;north=false;south=false;up=true;variant=cobblestone;west=true minecraft:cobblestone_wall east=false;north=false;south=true;up=false;variant=cobblestone;west=false minecraft:cobblestone_wall east=false;north=false;south=true;up=false;variant=cobblestone;west=true minecraft:cobblestone_wall east=false;north=false;south=true;up=true;variant=cobblestone;west=false minecraft:cobblestone_wall east=false;north=false;south=true;up=true;variant=cobblestone;west=true minecraft:cobblestone_wall east=false;north=true;south=false;up=false;variant=cobblestone;west=false minecraft:cobblestone_wall east=false;north=true;south=false;up=false;variant=cobblestone;west=true minecraft:cobblestone_wall east=false;north=true;south=false;up=true;variant=cobblestone;west=false minecraft:cobblestone_wall east=false;north=true;south=false;up=true;variant=cobblestone;west=true minecraft:cobblestone_wall east=false;north=true;south=true;up=false;variant=cobblestone;west=false minecraft:cobblestone_wall east=false;north=true;south=true;up=false;variant=cobblestone;west=true minecraft:cobblestone_wall east=false;north=true;south=true;up=true;variant=cobblestone;west=false minecraft:cobblestone_wall east=false;north=true;south=true;up=true;variant=cobblestone;west=true minecraft:cobblestone_wall east=true;north=false;south=false;up=false;variant=cobblestone;west=false minecraft:cobblestone_wall east=true;north=false;south=false;up=false;variant=cobblestone;west=true minecraft:cobblestone_wall east=true;north=false;south=false;up=true;variant=cobblestone;west=false minecraft:cobblestone_wall east=true;north=false;south=false;up=true;variant=cobblestone;west=true minecraft:cobblestone_wall east=true;north=false;south=true;up=false;variant=cobblestone;west=false minecraft:cobblestone_wall east=true;north=false;south=true;up=false;variant=cobblestone;west=true minecraft:cobblestone_wall east=true;north=false;south=true;up=true;variant=cobblestone;west=false minecraft:cobblestone_wall east=true;north=false;south=true;up=true;variant=cobblestone;west=true minecraft:cobblestone_wall east=true;north=true;south=false;up=false;variant=cobblestone;west=false minecraft:cobblestone_wall east=true;north=true;south=false;up=false;variant=cobblestone;west=true minecraft:cobblestone_wall east=true;north=true;south=false;up=true;variant=cobblestone;west=false minecraft:cobblestone_wall east=true;north=true;south=false;up=true;variant=cobblestone;west=true minecraft:cobblestone_wall east=true;north=true;south=true;up=false;variant=cobblestone;west=false minecraft:cobblestone_wall east=true;north=true;south=true;up=false;variant=cobblestone;west=true minecraft:cobblestone_wall east=true;north=true;south=true;up=true;variant=cobblestone;west=false minecraft:cobblestone_wall east=true;north=true;south=true;up=true;variant=cobblestone;west=true +2225 minecraft:mossy_cobblestone_wall east=false;north=false;south=false;up=false;west=false minecraft:cobblestone_wall east=false;north=false;south=false;up=false;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=false;north=false;south=false;up=false;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=false;north=false;south=false;up=true;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=false;north=false;south=false;up=true;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=false;north=false;south=true;up=false;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=false;north=false;south=true;up=false;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=false;north=false;south=true;up=true;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=false;north=false;south=true;up=true;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=false;north=true;south=false;up=false;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=false;north=true;south=false;up=false;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=false;north=true;south=false;up=true;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=false;north=true;south=false;up=true;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=false;north=true;south=true;up=false;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=false;north=true;south=true;up=false;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=false;north=true;south=true;up=true;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=false;north=true;south=true;up=true;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=true;north=false;south=false;up=false;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=true;north=false;south=false;up=false;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=true;north=false;south=false;up=true;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=true;north=false;south=false;up=true;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=true;north=false;south=true;up=false;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=true;north=false;south=true;up=false;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=true;north=false;south=true;up=true;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=true;north=false;south=true;up=true;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=true;north=true;south=false;up=false;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=true;north=true;south=false;up=false;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=true;north=true;south=false;up=true;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=true;north=true;south=false;up=true;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=true;north=true;south=true;up=false;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=true;north=true;south=true;up=false;variant=mossy_cobblestone;west=true minecraft:cobblestone_wall east=true;north=true;south=true;up=true;variant=mossy_cobblestone;west=false minecraft:cobblestone_wall east=true;north=true;south=true;up=true;variant=mossy_cobblestone;west=true +2240 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=0 minecraft:flower_pot contents=allium;legacy_data=0 minecraft:flower_pot contents=birch_sapling;legacy_data=0 minecraft:flower_pot contents=blue_orchid;legacy_data=0 minecraft:flower_pot contents=cactus;legacy_data=0 minecraft:flower_pot contents=dandelion;legacy_data=0 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=0 minecraft:flower_pot contents=dead_bush;legacy_data=0 minecraft:flower_pot contents=empty;legacy_data=0 minecraft:flower_pot contents=fern;legacy_data=0 minecraft:flower_pot contents=houstonia;legacy_data=0 minecraft:flower_pot contents=jungle_sapling;legacy_data=0 minecraft:flower_pot contents=mushroom_brown;legacy_data=0 minecraft:flower_pot contents=mushroom_red;legacy_data=0 minecraft:flower_pot contents=oak_sapling;legacy_data=0 minecraft:flower_pot contents=orange_tulip;legacy_data=0 minecraft:flower_pot contents=oxeye_daisy;legacy_data=0 minecraft:flower_pot contents=pink_tulip;legacy_data=0 minecraft:flower_pot contents=red_tulip;legacy_data=0 minecraft:flower_pot contents=rose;legacy_data=0 minecraft:flower_pot contents=spruce_sapling;legacy_data=0 minecraft:flower_pot contents=white_tulip;legacy_data=0 +2241 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=1 minecraft:flower_pot contents=allium;legacy_data=1 minecraft:flower_pot contents=birch_sapling;legacy_data=1 minecraft:flower_pot contents=blue_orchid;legacy_data=1 minecraft:flower_pot contents=cactus;legacy_data=1 minecraft:flower_pot contents=dandelion;legacy_data=1 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=1 minecraft:flower_pot contents=dead_bush;legacy_data=1 minecraft:flower_pot contents=empty;legacy_data=1 minecraft:flower_pot contents=fern;legacy_data=1 minecraft:flower_pot contents=houstonia;legacy_data=1 minecraft:flower_pot contents=jungle_sapling;legacy_data=1 minecraft:flower_pot contents=mushroom_brown;legacy_data=1 minecraft:flower_pot contents=mushroom_red;legacy_data=1 minecraft:flower_pot contents=oak_sapling;legacy_data=1 minecraft:flower_pot contents=orange_tulip;legacy_data=1 minecraft:flower_pot contents=oxeye_daisy;legacy_data=1 minecraft:flower_pot contents=pink_tulip;legacy_data=1 minecraft:flower_pot contents=red_tulip;legacy_data=1 minecraft:flower_pot contents=rose;legacy_data=1 minecraft:flower_pot contents=spruce_sapling;legacy_data=1 minecraft:flower_pot contents=white_tulip;legacy_data=1 +2242 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=2 minecraft:flower_pot contents=allium;legacy_data=2 minecraft:flower_pot contents=birch_sapling;legacy_data=2 minecraft:flower_pot contents=blue_orchid;legacy_data=2 minecraft:flower_pot contents=cactus;legacy_data=2 minecraft:flower_pot contents=dandelion;legacy_data=2 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=2 minecraft:flower_pot contents=dead_bush;legacy_data=2 minecraft:flower_pot contents=empty;legacy_data=2 minecraft:flower_pot contents=fern;legacy_data=2 minecraft:flower_pot contents=houstonia;legacy_data=2 minecraft:flower_pot contents=jungle_sapling;legacy_data=2 minecraft:flower_pot contents=mushroom_brown;legacy_data=2 minecraft:flower_pot contents=mushroom_red;legacy_data=2 minecraft:flower_pot contents=oak_sapling;legacy_data=2 minecraft:flower_pot contents=orange_tulip;legacy_data=2 minecraft:flower_pot contents=oxeye_daisy;legacy_data=2 minecraft:flower_pot contents=pink_tulip;legacy_data=2 minecraft:flower_pot contents=red_tulip;legacy_data=2 minecraft:flower_pot contents=rose;legacy_data=2 minecraft:flower_pot contents=spruce_sapling;legacy_data=2 minecraft:flower_pot contents=white_tulip;legacy_data=2 +2243 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=3 minecraft:flower_pot contents=allium;legacy_data=3 minecraft:flower_pot contents=birch_sapling;legacy_data=3 minecraft:flower_pot contents=blue_orchid;legacy_data=3 minecraft:flower_pot contents=cactus;legacy_data=3 minecraft:flower_pot contents=dandelion;legacy_data=3 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=3 minecraft:flower_pot contents=dead_bush;legacy_data=3 minecraft:flower_pot contents=empty;legacy_data=3 minecraft:flower_pot contents=fern;legacy_data=3 minecraft:flower_pot contents=houstonia;legacy_data=3 minecraft:flower_pot contents=jungle_sapling;legacy_data=3 minecraft:flower_pot contents=mushroom_brown;legacy_data=3 minecraft:flower_pot contents=mushroom_red;legacy_data=3 minecraft:flower_pot contents=oak_sapling;legacy_data=3 minecraft:flower_pot contents=orange_tulip;legacy_data=3 minecraft:flower_pot contents=oxeye_daisy;legacy_data=3 minecraft:flower_pot contents=pink_tulip;legacy_data=3 minecraft:flower_pot contents=red_tulip;legacy_data=3 minecraft:flower_pot contents=rose;legacy_data=3 minecraft:flower_pot contents=spruce_sapling;legacy_data=3 minecraft:flower_pot contents=white_tulip;legacy_data=3 +2244 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=4 minecraft:flower_pot contents=allium;legacy_data=4 minecraft:flower_pot contents=birch_sapling;legacy_data=4 minecraft:flower_pot contents=blue_orchid;legacy_data=4 minecraft:flower_pot contents=cactus;legacy_data=4 minecraft:flower_pot contents=dandelion;legacy_data=4 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=4 minecraft:flower_pot contents=dead_bush;legacy_data=4 minecraft:flower_pot contents=empty;legacy_data=4 minecraft:flower_pot contents=fern;legacy_data=4 minecraft:flower_pot contents=houstonia;legacy_data=4 minecraft:flower_pot contents=jungle_sapling;legacy_data=4 minecraft:flower_pot contents=mushroom_brown;legacy_data=4 minecraft:flower_pot contents=mushroom_red;legacy_data=4 minecraft:flower_pot contents=oak_sapling;legacy_data=4 minecraft:flower_pot contents=orange_tulip;legacy_data=4 minecraft:flower_pot contents=oxeye_daisy;legacy_data=4 minecraft:flower_pot contents=pink_tulip;legacy_data=4 minecraft:flower_pot contents=red_tulip;legacy_data=4 minecraft:flower_pot contents=rose;legacy_data=4 minecraft:flower_pot contents=spruce_sapling;legacy_data=4 minecraft:flower_pot contents=white_tulip;legacy_data=4 +2245 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=5 minecraft:flower_pot contents=allium;legacy_data=5 minecraft:flower_pot contents=birch_sapling;legacy_data=5 minecraft:flower_pot contents=blue_orchid;legacy_data=5 minecraft:flower_pot contents=cactus;legacy_data=5 minecraft:flower_pot contents=dandelion;legacy_data=5 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=5 minecraft:flower_pot contents=dead_bush;legacy_data=5 minecraft:flower_pot contents=empty;legacy_data=5 minecraft:flower_pot contents=fern;legacy_data=5 minecraft:flower_pot contents=houstonia;legacy_data=5 minecraft:flower_pot contents=jungle_sapling;legacy_data=5 minecraft:flower_pot contents=mushroom_brown;legacy_data=5 minecraft:flower_pot contents=mushroom_red;legacy_data=5 minecraft:flower_pot contents=oak_sapling;legacy_data=5 minecraft:flower_pot contents=orange_tulip;legacy_data=5 minecraft:flower_pot contents=oxeye_daisy;legacy_data=5 minecraft:flower_pot contents=pink_tulip;legacy_data=5 minecraft:flower_pot contents=red_tulip;legacy_data=5 minecraft:flower_pot contents=rose;legacy_data=5 minecraft:flower_pot contents=spruce_sapling;legacy_data=5 minecraft:flower_pot contents=white_tulip;legacy_data=5 +2246 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=6 minecraft:flower_pot contents=allium;legacy_data=6 minecraft:flower_pot contents=birch_sapling;legacy_data=6 minecraft:flower_pot contents=blue_orchid;legacy_data=6 minecraft:flower_pot contents=cactus;legacy_data=6 minecraft:flower_pot contents=dandelion;legacy_data=6 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=6 minecraft:flower_pot contents=dead_bush;legacy_data=6 minecraft:flower_pot contents=empty;legacy_data=6 minecraft:flower_pot contents=fern;legacy_data=6 minecraft:flower_pot contents=houstonia;legacy_data=6 minecraft:flower_pot contents=jungle_sapling;legacy_data=6 minecraft:flower_pot contents=mushroom_brown;legacy_data=6 minecraft:flower_pot contents=mushroom_red;legacy_data=6 minecraft:flower_pot contents=oak_sapling;legacy_data=6 minecraft:flower_pot contents=orange_tulip;legacy_data=6 minecraft:flower_pot contents=oxeye_daisy;legacy_data=6 minecraft:flower_pot contents=pink_tulip;legacy_data=6 minecraft:flower_pot contents=red_tulip;legacy_data=6 minecraft:flower_pot contents=rose;legacy_data=6 minecraft:flower_pot contents=spruce_sapling;legacy_data=6 minecraft:flower_pot contents=white_tulip;legacy_data=6 +2247 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=7 minecraft:flower_pot contents=allium;legacy_data=7 minecraft:flower_pot contents=birch_sapling;legacy_data=7 minecraft:flower_pot contents=blue_orchid;legacy_data=7 minecraft:flower_pot contents=cactus;legacy_data=7 minecraft:flower_pot contents=dandelion;legacy_data=7 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=7 minecraft:flower_pot contents=dead_bush;legacy_data=7 minecraft:flower_pot contents=empty;legacy_data=7 minecraft:flower_pot contents=fern;legacy_data=7 minecraft:flower_pot contents=houstonia;legacy_data=7 minecraft:flower_pot contents=jungle_sapling;legacy_data=7 minecraft:flower_pot contents=mushroom_brown;legacy_data=7 minecraft:flower_pot contents=mushroom_red;legacy_data=7 minecraft:flower_pot contents=oak_sapling;legacy_data=7 minecraft:flower_pot contents=orange_tulip;legacy_data=7 minecraft:flower_pot contents=oxeye_daisy;legacy_data=7 minecraft:flower_pot contents=pink_tulip;legacy_data=7 minecraft:flower_pot contents=red_tulip;legacy_data=7 minecraft:flower_pot contents=rose;legacy_data=7 minecraft:flower_pot contents=spruce_sapling;legacy_data=7 minecraft:flower_pot contents=white_tulip;legacy_data=7 +2248 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=8 minecraft:flower_pot contents=allium;legacy_data=8 minecraft:flower_pot contents=birch_sapling;legacy_data=8 minecraft:flower_pot contents=blue_orchid;legacy_data=8 minecraft:flower_pot contents=cactus;legacy_data=8 minecraft:flower_pot contents=dandelion;legacy_data=8 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=8 minecraft:flower_pot contents=dead_bush;legacy_data=8 minecraft:flower_pot contents=empty;legacy_data=8 minecraft:flower_pot contents=fern;legacy_data=8 minecraft:flower_pot contents=houstonia;legacy_data=8 minecraft:flower_pot contents=jungle_sapling;legacy_data=8 minecraft:flower_pot contents=mushroom_brown;legacy_data=8 minecraft:flower_pot contents=mushroom_red;legacy_data=8 minecraft:flower_pot contents=oak_sapling;legacy_data=8 minecraft:flower_pot contents=orange_tulip;legacy_data=8 minecraft:flower_pot contents=oxeye_daisy;legacy_data=8 minecraft:flower_pot contents=pink_tulip;legacy_data=8 minecraft:flower_pot contents=red_tulip;legacy_data=8 minecraft:flower_pot contents=rose;legacy_data=8 minecraft:flower_pot contents=spruce_sapling;legacy_data=8 minecraft:flower_pot contents=white_tulip;legacy_data=8 +2249 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=9 minecraft:flower_pot contents=allium;legacy_data=9 minecraft:flower_pot contents=birch_sapling;legacy_data=9 minecraft:flower_pot contents=blue_orchid;legacy_data=9 minecraft:flower_pot contents=cactus;legacy_data=9 minecraft:flower_pot contents=dandelion;legacy_data=9 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=9 minecraft:flower_pot contents=dead_bush;legacy_data=9 minecraft:flower_pot contents=empty;legacy_data=9 minecraft:flower_pot contents=fern;legacy_data=9 minecraft:flower_pot contents=houstonia;legacy_data=9 minecraft:flower_pot contents=jungle_sapling;legacy_data=9 minecraft:flower_pot contents=mushroom_brown;legacy_data=9 minecraft:flower_pot contents=mushroom_red;legacy_data=9 minecraft:flower_pot contents=oak_sapling;legacy_data=9 minecraft:flower_pot contents=orange_tulip;legacy_data=9 minecraft:flower_pot contents=oxeye_daisy;legacy_data=9 minecraft:flower_pot contents=pink_tulip;legacy_data=9 minecraft:flower_pot contents=red_tulip;legacy_data=9 minecraft:flower_pot contents=rose;legacy_data=9 minecraft:flower_pot contents=spruce_sapling;legacy_data=9 minecraft:flower_pot contents=white_tulip;legacy_data=9 +2250 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=10 minecraft:flower_pot contents=allium;legacy_data=10 minecraft:flower_pot contents=birch_sapling;legacy_data=10 minecraft:flower_pot contents=blue_orchid;legacy_data=10 minecraft:flower_pot contents=cactus;legacy_data=10 minecraft:flower_pot contents=dandelion;legacy_data=10 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=10 minecraft:flower_pot contents=dead_bush;legacy_data=10 minecraft:flower_pot contents=empty;legacy_data=10 minecraft:flower_pot contents=fern;legacy_data=10 minecraft:flower_pot contents=houstonia;legacy_data=10 minecraft:flower_pot contents=jungle_sapling;legacy_data=10 minecraft:flower_pot contents=mushroom_brown;legacy_data=10 minecraft:flower_pot contents=mushroom_red;legacy_data=10 minecraft:flower_pot contents=oak_sapling;legacy_data=10 minecraft:flower_pot contents=orange_tulip;legacy_data=10 minecraft:flower_pot contents=oxeye_daisy;legacy_data=10 minecraft:flower_pot contents=pink_tulip;legacy_data=10 minecraft:flower_pot contents=red_tulip;legacy_data=10 minecraft:flower_pot contents=rose;legacy_data=10 minecraft:flower_pot contents=spruce_sapling;legacy_data=10 minecraft:flower_pot contents=white_tulip;legacy_data=10 +2251 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=11 minecraft:flower_pot contents=allium;legacy_data=11 minecraft:flower_pot contents=birch_sapling;legacy_data=11 minecraft:flower_pot contents=blue_orchid;legacy_data=11 minecraft:flower_pot contents=cactus;legacy_data=11 minecraft:flower_pot contents=dandelion;legacy_data=11 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=11 minecraft:flower_pot contents=dead_bush;legacy_data=11 minecraft:flower_pot contents=empty;legacy_data=11 minecraft:flower_pot contents=fern;legacy_data=11 minecraft:flower_pot contents=houstonia;legacy_data=11 minecraft:flower_pot contents=jungle_sapling;legacy_data=11 minecraft:flower_pot contents=mushroom_brown;legacy_data=11 minecraft:flower_pot contents=mushroom_red;legacy_data=11 minecraft:flower_pot contents=oak_sapling;legacy_data=11 minecraft:flower_pot contents=orange_tulip;legacy_data=11 minecraft:flower_pot contents=oxeye_daisy;legacy_data=11 minecraft:flower_pot contents=pink_tulip;legacy_data=11 minecraft:flower_pot contents=red_tulip;legacy_data=11 minecraft:flower_pot contents=rose;legacy_data=11 minecraft:flower_pot contents=spruce_sapling;legacy_data=11 minecraft:flower_pot contents=white_tulip;legacy_data=11 +2252 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=12 minecraft:flower_pot contents=allium;legacy_data=12 minecraft:flower_pot contents=birch_sapling;legacy_data=12 minecraft:flower_pot contents=blue_orchid;legacy_data=12 minecraft:flower_pot contents=cactus;legacy_data=12 minecraft:flower_pot contents=dandelion;legacy_data=12 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=12 minecraft:flower_pot contents=dead_bush;legacy_data=12 minecraft:flower_pot contents=empty;legacy_data=12 minecraft:flower_pot contents=fern;legacy_data=12 minecraft:flower_pot contents=houstonia;legacy_data=12 minecraft:flower_pot contents=jungle_sapling;legacy_data=12 minecraft:flower_pot contents=mushroom_brown;legacy_data=12 minecraft:flower_pot contents=mushroom_red;legacy_data=12 minecraft:flower_pot contents=oak_sapling;legacy_data=12 minecraft:flower_pot contents=orange_tulip;legacy_data=12 minecraft:flower_pot contents=oxeye_daisy;legacy_data=12 minecraft:flower_pot contents=pink_tulip;legacy_data=12 minecraft:flower_pot contents=red_tulip;legacy_data=12 minecraft:flower_pot contents=rose;legacy_data=12 minecraft:flower_pot contents=spruce_sapling;legacy_data=12 minecraft:flower_pot contents=white_tulip;legacy_data=12 +2253 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=13 minecraft:flower_pot contents=allium;legacy_data=13 minecraft:flower_pot contents=birch_sapling;legacy_data=13 minecraft:flower_pot contents=blue_orchid;legacy_data=13 minecraft:flower_pot contents=cactus;legacy_data=13 minecraft:flower_pot contents=dandelion;legacy_data=13 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=13 minecraft:flower_pot contents=dead_bush;legacy_data=13 minecraft:flower_pot contents=empty;legacy_data=13 minecraft:flower_pot contents=fern;legacy_data=13 minecraft:flower_pot contents=houstonia;legacy_data=13 minecraft:flower_pot contents=jungle_sapling;legacy_data=13 minecraft:flower_pot contents=mushroom_brown;legacy_data=13 minecraft:flower_pot contents=mushroom_red;legacy_data=13 minecraft:flower_pot contents=oak_sapling;legacy_data=13 minecraft:flower_pot contents=orange_tulip;legacy_data=13 minecraft:flower_pot contents=oxeye_daisy;legacy_data=13 minecraft:flower_pot contents=pink_tulip;legacy_data=13 minecraft:flower_pot contents=red_tulip;legacy_data=13 minecraft:flower_pot contents=rose;legacy_data=13 minecraft:flower_pot contents=spruce_sapling;legacy_data=13 minecraft:flower_pot contents=white_tulip;legacy_data=13 +2254 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=14 minecraft:flower_pot contents=allium;legacy_data=14 minecraft:flower_pot contents=birch_sapling;legacy_data=14 minecraft:flower_pot contents=blue_orchid;legacy_data=14 minecraft:flower_pot contents=cactus;legacy_data=14 minecraft:flower_pot contents=dandelion;legacy_data=14 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=14 minecraft:flower_pot contents=dead_bush;legacy_data=14 minecraft:flower_pot contents=empty;legacy_data=14 minecraft:flower_pot contents=fern;legacy_data=14 minecraft:flower_pot contents=houstonia;legacy_data=14 minecraft:flower_pot contents=jungle_sapling;legacy_data=14 minecraft:flower_pot contents=mushroom_brown;legacy_data=14 minecraft:flower_pot contents=mushroom_red;legacy_data=14 minecraft:flower_pot contents=oak_sapling;legacy_data=14 minecraft:flower_pot contents=orange_tulip;legacy_data=14 minecraft:flower_pot contents=oxeye_daisy;legacy_data=14 minecraft:flower_pot contents=pink_tulip;legacy_data=14 minecraft:flower_pot contents=red_tulip;legacy_data=14 minecraft:flower_pot contents=rose;legacy_data=14 minecraft:flower_pot contents=spruce_sapling;legacy_data=14 minecraft:flower_pot contents=white_tulip;legacy_data=14 +2255 minecraft:potted_cactus minecraft:flower_pot contents=acacia_sapling;legacy_data=15 minecraft:flower_pot contents=allium;legacy_data=15 minecraft:flower_pot contents=birch_sapling;legacy_data=15 minecraft:flower_pot contents=blue_orchid;legacy_data=15 minecraft:flower_pot contents=cactus;legacy_data=15 minecraft:flower_pot contents=dandelion;legacy_data=15 minecraft:flower_pot contents=dark_oak_sapling;legacy_data=15 minecraft:flower_pot contents=dead_bush;legacy_data=15 minecraft:flower_pot contents=empty;legacy_data=15 minecraft:flower_pot contents=fern;legacy_data=15 minecraft:flower_pot contents=houstonia;legacy_data=15 minecraft:flower_pot contents=jungle_sapling;legacy_data=15 minecraft:flower_pot contents=mushroom_brown;legacy_data=15 minecraft:flower_pot contents=mushroom_red;legacy_data=15 minecraft:flower_pot contents=oak_sapling;legacy_data=15 minecraft:flower_pot contents=orange_tulip;legacy_data=15 minecraft:flower_pot contents=oxeye_daisy;legacy_data=15 minecraft:flower_pot contents=pink_tulip;legacy_data=15 minecraft:flower_pot contents=red_tulip;legacy_data=15 minecraft:flower_pot contents=rose;legacy_data=15 minecraft:flower_pot contents=spruce_sapling;legacy_data=15 minecraft:flower_pot contents=white_tulip;legacy_data=15 +2256 minecraft:carrots age=0 minecraft:carrots age=0 +2257 minecraft:carrots age=1 minecraft:carrots age=1 +2258 minecraft:carrots age=2 minecraft:carrots age=2 +2259 minecraft:carrots age=3 minecraft:carrots age=3 +2260 minecraft:carrots age=4 minecraft:carrots age=4 +2261 minecraft:carrots age=5 minecraft:carrots age=5 +2262 minecraft:carrots age=6 minecraft:carrots age=6 +2263 minecraft:carrots age=7 minecraft:carrots age=7 +2272 minecraft:potatoes age=0 minecraft:potatoes age=0 +2273 minecraft:potatoes age=1 minecraft:potatoes age=1 +2274 minecraft:potatoes age=2 minecraft:potatoes age=2 +2275 minecraft:potatoes age=3 minecraft:potatoes age=3 +2276 minecraft:potatoes age=4 minecraft:potatoes age=4 +2277 minecraft:potatoes age=5 minecraft:potatoes age=5 +2278 minecraft:potatoes age=6 minecraft:potatoes age=6 +2279 minecraft:potatoes age=7 minecraft:potatoes age=7 +2288 minecraft:oak_button face=ceiling;facing=north;powered=false minecraft:wooden_button facing=down;powered=false +2289 minecraft:oak_button face=wall;facing=east;powered=false minecraft:wooden_button facing=east;powered=false +2290 minecraft:oak_button face=wall;facing=west;powered=false minecraft:wooden_button facing=west;powered=false +2291 minecraft:oak_button face=wall;facing=south;powered=false minecraft:wooden_button facing=south;powered=false +2292 minecraft:oak_button face=wall;facing=north;powered=false minecraft:wooden_button facing=north;powered=false +2293 minecraft:oak_button face=floor;facing=north;powered=false minecraft:wooden_button facing=up;powered=false +2296 minecraft:oak_button face=ceiling;facing=north;powered=true minecraft:wooden_button facing=down;powered=true +2297 minecraft:oak_button face=wall;facing=east;powered=true minecraft:wooden_button facing=east;powered=true +2298 minecraft:oak_button face=wall;facing=west;powered=true minecraft:wooden_button facing=west;powered=true +2299 minecraft:oak_button face=wall;facing=south;powered=true minecraft:wooden_button facing=south;powered=true +2300 minecraft:oak_button face=wall;facing=north;powered=true minecraft:wooden_button facing=north;powered=true +2301 minecraft:oak_button face=floor;facing=north;powered=true minecraft:wooden_button facing=up;powered=true +2304 %%FILTER_ME%% facing=down;nodrop=false minecraft:skull facing=down;nodrop=false +2305 %%FILTER_ME%% facing=up;nodrop=false minecraft:skull facing=up;nodrop=false +2306 %%FILTER_ME%% facing=north;nodrop=false minecraft:skull facing=north;nodrop=false +2307 %%FILTER_ME%% facing=south;nodrop=false minecraft:skull facing=south;nodrop=false +2308 %%FILTER_ME%% facing=west;nodrop=false minecraft:skull facing=west;nodrop=false +2309 %%FILTER_ME%% facing=east;nodrop=false minecraft:skull facing=east;nodrop=false +2312 %%FILTER_ME%% facing=down;nodrop=true minecraft:skull facing=down;nodrop=true +2313 %%FILTER_ME%% facing=up;nodrop=true minecraft:skull facing=up;nodrop=true +2314 %%FILTER_ME%% facing=north;nodrop=true minecraft:skull facing=north;nodrop=true +2315 %%FILTER_ME%% facing=south;nodrop=true minecraft:skull facing=south;nodrop=true +2316 %%FILTER_ME%% facing=west;nodrop=true minecraft:skull facing=west;nodrop=true +2317 %%FILTER_ME%% facing=east;nodrop=true minecraft:skull facing=east;nodrop=true +2320 minecraft:anvil facing=south minecraft:anvil damage=0;facing=south +2321 minecraft:anvil facing=west minecraft:anvil damage=0;facing=west +2322 minecraft:anvil facing=north minecraft:anvil damage=0;facing=north +2323 minecraft:anvil facing=east minecraft:anvil damage=0;facing=east +2324 minecraft:chipped_anvil facing=south minecraft:anvil damage=1;facing=south +2325 minecraft:chipped_anvil facing=west minecraft:anvil damage=1;facing=west +2326 minecraft:chipped_anvil facing=north minecraft:anvil damage=1;facing=north +2327 minecraft:chipped_anvil facing=east minecraft:anvil damage=1;facing=east +2328 minecraft:damaged_anvil facing=south minecraft:anvil damage=2;facing=south +2329 minecraft:damaged_anvil facing=west minecraft:anvil damage=2;facing=west +2330 minecraft:damaged_anvil facing=north minecraft:anvil damage=2;facing=north +2331 minecraft:damaged_anvil facing=east minecraft:anvil damage=2;facing=east +2338 minecraft:trapped_chest facing=north;type=single minecraft:trapped_chest facing=north +2339 minecraft:trapped_chest facing=south;type=single minecraft:trapped_chest facing=south +2340 minecraft:trapped_chest facing=west;type=single minecraft:trapped_chest facing=west +2341 minecraft:trapped_chest facing=east;type=single minecraft:trapped_chest facing=east +2352 minecraft:light_weighted_pressure_plate power=0 minecraft:light_weighted_pressure_plate power=0 +2353 minecraft:light_weighted_pressure_plate power=1 minecraft:light_weighted_pressure_plate power=1 +2354 minecraft:light_weighted_pressure_plate power=2 minecraft:light_weighted_pressure_plate power=2 +2355 minecraft:light_weighted_pressure_plate power=3 minecraft:light_weighted_pressure_plate power=3 +2356 minecraft:light_weighted_pressure_plate power=4 minecraft:light_weighted_pressure_plate power=4 +2357 minecraft:light_weighted_pressure_plate power=5 minecraft:light_weighted_pressure_plate power=5 +2358 minecraft:light_weighted_pressure_plate power=6 minecraft:light_weighted_pressure_plate power=6 +2359 minecraft:light_weighted_pressure_plate power=7 minecraft:light_weighted_pressure_plate power=7 +2360 minecraft:light_weighted_pressure_plate power=8 minecraft:light_weighted_pressure_plate power=8 +2361 minecraft:light_weighted_pressure_plate power=9 minecraft:light_weighted_pressure_plate power=9 +2362 minecraft:light_weighted_pressure_plate power=10 minecraft:light_weighted_pressure_plate power=10 +2363 minecraft:light_weighted_pressure_plate power=11 minecraft:light_weighted_pressure_plate power=11 +2364 minecraft:light_weighted_pressure_plate power=12 minecraft:light_weighted_pressure_plate power=12 +2365 minecraft:light_weighted_pressure_plate power=13 minecraft:light_weighted_pressure_plate power=13 +2366 minecraft:light_weighted_pressure_plate power=14 minecraft:light_weighted_pressure_plate power=14 +2367 minecraft:light_weighted_pressure_plate power=15 minecraft:light_weighted_pressure_plate power=15 +2368 minecraft:heavy_weighted_pressure_plate power=0 minecraft:heavy_weighted_pressure_plate power=0 +2369 minecraft:heavy_weighted_pressure_plate power=1 minecraft:heavy_weighted_pressure_plate power=1 +2370 minecraft:heavy_weighted_pressure_plate power=2 minecraft:heavy_weighted_pressure_plate power=2 +2371 minecraft:heavy_weighted_pressure_plate power=3 minecraft:heavy_weighted_pressure_plate power=3 +2372 minecraft:heavy_weighted_pressure_plate power=4 minecraft:heavy_weighted_pressure_plate power=4 +2373 minecraft:heavy_weighted_pressure_plate power=5 minecraft:heavy_weighted_pressure_plate power=5 +2374 minecraft:heavy_weighted_pressure_plate power=6 minecraft:heavy_weighted_pressure_plate power=6 +2375 minecraft:heavy_weighted_pressure_plate power=7 minecraft:heavy_weighted_pressure_plate power=7 +2376 minecraft:heavy_weighted_pressure_plate power=8 minecraft:heavy_weighted_pressure_plate power=8 +2377 minecraft:heavy_weighted_pressure_plate power=9 minecraft:heavy_weighted_pressure_plate power=9 +2378 minecraft:heavy_weighted_pressure_plate power=10 minecraft:heavy_weighted_pressure_plate power=10 +2379 minecraft:heavy_weighted_pressure_plate power=11 minecraft:heavy_weighted_pressure_plate power=11 +2380 minecraft:heavy_weighted_pressure_plate power=12 minecraft:heavy_weighted_pressure_plate power=12 +2381 minecraft:heavy_weighted_pressure_plate power=13 minecraft:heavy_weighted_pressure_plate power=13 +2382 minecraft:heavy_weighted_pressure_plate power=14 minecraft:heavy_weighted_pressure_plate power=14 +2383 minecraft:heavy_weighted_pressure_plate power=15 minecraft:heavy_weighted_pressure_plate power=15 +2384 minecraft:comparator facing=south;mode=compare;powered=false minecraft:unpowered_comparator facing=south;mode=compare;powered=false +2385 minecraft:comparator facing=west;mode=compare;powered=false minecraft:unpowered_comparator facing=west;mode=compare;powered=false +2386 minecraft:comparator facing=north;mode=compare;powered=false minecraft:unpowered_comparator facing=north;mode=compare;powered=false +2387 minecraft:comparator facing=east;mode=compare;powered=false minecraft:unpowered_comparator facing=east;mode=compare;powered=false +2388 minecraft:comparator facing=south;mode=subtract;powered=false minecraft:unpowered_comparator facing=south;mode=subtract;powered=false +2389 minecraft:comparator facing=west;mode=subtract;powered=false minecraft:unpowered_comparator facing=west;mode=subtract;powered=false +2390 minecraft:comparator facing=north;mode=subtract;powered=false minecraft:unpowered_comparator facing=north;mode=subtract;powered=false +2391 minecraft:comparator facing=east;mode=subtract;powered=false minecraft:unpowered_comparator facing=east;mode=subtract;powered=false +2392 minecraft:comparator facing=south;mode=compare;powered=true minecraft:unpowered_comparator facing=south;mode=compare;powered=true +2393 minecraft:comparator facing=west;mode=compare;powered=true minecraft:unpowered_comparator facing=west;mode=compare;powered=true +2394 minecraft:comparator facing=north;mode=compare;powered=true minecraft:unpowered_comparator facing=north;mode=compare;powered=true +2395 minecraft:comparator facing=east;mode=compare;powered=true minecraft:unpowered_comparator facing=east;mode=compare;powered=true +2396 minecraft:comparator facing=south;mode=subtract;powered=true minecraft:unpowered_comparator facing=south;mode=subtract;powered=true +2397 minecraft:comparator facing=west;mode=subtract;powered=true minecraft:unpowered_comparator facing=west;mode=subtract;powered=true +2398 minecraft:comparator facing=north;mode=subtract;powered=true minecraft:unpowered_comparator facing=north;mode=subtract;powered=true +2399 minecraft:comparator facing=east;mode=subtract;powered=true minecraft:unpowered_comparator facing=east;mode=subtract;powered=true +2400 minecraft:comparator facing=south;mode=compare;powered=false minecraft:powered_comparator facing=south;mode=compare;powered=false +2401 minecraft:comparator facing=west;mode=compare;powered=false minecraft:powered_comparator facing=west;mode=compare;powered=false +2402 minecraft:comparator facing=north;mode=compare;powered=false minecraft:powered_comparator facing=north;mode=compare;powered=false +2403 minecraft:comparator facing=east;mode=compare;powered=false minecraft:powered_comparator facing=east;mode=compare;powered=false +2404 minecraft:comparator facing=south;mode=subtract;powered=false minecraft:powered_comparator facing=south;mode=subtract;powered=false +2405 minecraft:comparator facing=west;mode=subtract;powered=false minecraft:powered_comparator facing=west;mode=subtract;powered=false +2406 minecraft:comparator facing=north;mode=subtract;powered=false minecraft:powered_comparator facing=north;mode=subtract;powered=false +2407 minecraft:comparator facing=east;mode=subtract;powered=false minecraft:powered_comparator facing=east;mode=subtract;powered=false +2408 minecraft:comparator facing=south;mode=compare;powered=true minecraft:powered_comparator facing=south;mode=compare;powered=true +2409 minecraft:comparator facing=west;mode=compare;powered=true minecraft:powered_comparator facing=west;mode=compare;powered=true +2410 minecraft:comparator facing=north;mode=compare;powered=true minecraft:powered_comparator facing=north;mode=compare;powered=true +2411 minecraft:comparator facing=east;mode=compare;powered=true minecraft:powered_comparator facing=east;mode=compare;powered=true +2412 minecraft:comparator facing=south;mode=subtract;powered=true minecraft:powered_comparator facing=south;mode=subtract;powered=true +2413 minecraft:comparator facing=west;mode=subtract;powered=true minecraft:powered_comparator facing=west;mode=subtract;powered=true +2414 minecraft:comparator facing=north;mode=subtract;powered=true minecraft:powered_comparator facing=north;mode=subtract;powered=true +2415 minecraft:comparator facing=east;mode=subtract;powered=true minecraft:powered_comparator facing=east;mode=subtract;powered=true +2416 minecraft:daylight_detector inverted=false;power=0 minecraft:daylight_detector power=0 +2417 minecraft:daylight_detector inverted=false;power=1 minecraft:daylight_detector power=1 +2418 minecraft:daylight_detector inverted=false;power=2 minecraft:daylight_detector power=2 +2419 minecraft:daylight_detector inverted=false;power=3 minecraft:daylight_detector power=3 +2420 minecraft:daylight_detector inverted=false;power=4 minecraft:daylight_detector power=4 +2421 minecraft:daylight_detector inverted=false;power=5 minecraft:daylight_detector power=5 +2422 minecraft:daylight_detector inverted=false;power=6 minecraft:daylight_detector power=6 +2423 minecraft:daylight_detector inverted=false;power=7 minecraft:daylight_detector power=7 +2424 minecraft:daylight_detector inverted=false;power=8 minecraft:daylight_detector power=8 +2425 minecraft:daylight_detector inverted=false;power=9 minecraft:daylight_detector power=9 +2426 minecraft:daylight_detector inverted=false;power=10 minecraft:daylight_detector power=10 +2427 minecraft:daylight_detector inverted=false;power=11 minecraft:daylight_detector power=11 +2428 minecraft:daylight_detector inverted=false;power=12 minecraft:daylight_detector power=12 +2429 minecraft:daylight_detector inverted=false;power=13 minecraft:daylight_detector power=13 +2430 minecraft:daylight_detector inverted=false;power=14 minecraft:daylight_detector power=14 +2431 minecraft:daylight_detector inverted=false;power=15 minecraft:daylight_detector power=15 +2432 minecraft:redstone_block minecraft:redstone_block +2448 minecraft:nether_quartz_ore minecraft:quartz_ore +2464 minecraft:hopper enabled=true;facing=down minecraft:hopper enabled=true;facing=down +2466 minecraft:hopper enabled=true;facing=north minecraft:hopper enabled=true;facing=north +2467 minecraft:hopper enabled=true;facing=south minecraft:hopper enabled=true;facing=south +2468 minecraft:hopper enabled=true;facing=west minecraft:hopper enabled=true;facing=west +2469 minecraft:hopper enabled=true;facing=east minecraft:hopper enabled=true;facing=east +2472 minecraft:hopper enabled=false;facing=down minecraft:hopper enabled=false;facing=down +2474 minecraft:hopper enabled=false;facing=north minecraft:hopper enabled=false;facing=north +2475 minecraft:hopper enabled=false;facing=south minecraft:hopper enabled=false;facing=south +2476 minecraft:hopper enabled=false;facing=west minecraft:hopper enabled=false;facing=west +2477 minecraft:hopper enabled=false;facing=east minecraft:hopper enabled=false;facing=east +2480 minecraft:quartz_block minecraft:quartz_block variant=default +2481 minecraft:chiseled_quartz_block minecraft:quartz_block variant=chiseled +2482 minecraft:quartz_pillar axis=y minecraft:quartz_block variant=lines_y +2483 minecraft:quartz_pillar axis=x minecraft:quartz_block variant=lines_x +2484 minecraft:quartz_pillar axis=z minecraft:quartz_block variant=lines_z +2496 minecraft:quartz_stairs facing=east;half=bottom;shape=straight minecraft:quartz_stairs facing=east;half=bottom;shape=inner_left minecraft:quartz_stairs facing=east;half=bottom;shape=inner_right minecraft:quartz_stairs facing=east;half=bottom;shape=outer_left minecraft:quartz_stairs facing=east;half=bottom;shape=outer_right minecraft:quartz_stairs facing=east;half=bottom;shape=straight +2497 minecraft:quartz_stairs facing=west;half=bottom;shape=straight minecraft:quartz_stairs facing=west;half=bottom;shape=inner_left minecraft:quartz_stairs facing=west;half=bottom;shape=inner_right minecraft:quartz_stairs facing=west;half=bottom;shape=outer_left minecraft:quartz_stairs facing=west;half=bottom;shape=outer_right minecraft:quartz_stairs facing=west;half=bottom;shape=straight +2498 minecraft:quartz_stairs facing=south;half=bottom;shape=straight minecraft:quartz_stairs facing=south;half=bottom;shape=inner_left minecraft:quartz_stairs facing=south;half=bottom;shape=inner_right minecraft:quartz_stairs facing=south;half=bottom;shape=outer_left minecraft:quartz_stairs facing=south;half=bottom;shape=outer_right minecraft:quartz_stairs facing=south;half=bottom;shape=straight +2499 minecraft:quartz_stairs facing=north;half=bottom;shape=straight minecraft:quartz_stairs facing=north;half=bottom;shape=inner_left minecraft:quartz_stairs facing=north;half=bottom;shape=inner_right minecraft:quartz_stairs facing=north;half=bottom;shape=outer_left minecraft:quartz_stairs facing=north;half=bottom;shape=outer_right minecraft:quartz_stairs facing=north;half=bottom;shape=straight +2500 minecraft:quartz_stairs facing=east;half=top;shape=straight minecraft:quartz_stairs facing=east;half=top;shape=inner_left minecraft:quartz_stairs facing=east;half=top;shape=inner_right minecraft:quartz_stairs facing=east;half=top;shape=outer_left minecraft:quartz_stairs facing=east;half=top;shape=outer_right minecraft:quartz_stairs facing=east;half=top;shape=straight +2501 minecraft:quartz_stairs facing=west;half=top;shape=straight minecraft:quartz_stairs facing=west;half=top;shape=inner_left minecraft:quartz_stairs facing=west;half=top;shape=inner_right minecraft:quartz_stairs facing=west;half=top;shape=outer_left minecraft:quartz_stairs facing=west;half=top;shape=outer_right minecraft:quartz_stairs facing=west;half=top;shape=straight +2502 minecraft:quartz_stairs facing=south;half=top;shape=straight minecraft:quartz_stairs facing=south;half=top;shape=inner_left minecraft:quartz_stairs facing=south;half=top;shape=inner_right minecraft:quartz_stairs facing=south;half=top;shape=outer_left minecraft:quartz_stairs facing=south;half=top;shape=outer_right minecraft:quartz_stairs facing=south;half=top;shape=straight +2503 minecraft:quartz_stairs facing=north;half=top;shape=straight minecraft:quartz_stairs facing=north;half=top;shape=inner_left minecraft:quartz_stairs facing=north;half=top;shape=inner_right minecraft:quartz_stairs facing=north;half=top;shape=outer_left minecraft:quartz_stairs facing=north;half=top;shape=outer_right minecraft:quartz_stairs facing=north;half=top;shape=straight +2512 minecraft:activator_rail powered=false;shape=north_south minecraft:activator_rail powered=false;shape=north_south +2513 minecraft:activator_rail powered=false;shape=east_west minecraft:activator_rail powered=false;shape=east_west +2514 minecraft:activator_rail powered=false;shape=ascending_east minecraft:activator_rail powered=false;shape=ascending_east +2515 minecraft:activator_rail powered=false;shape=ascending_west minecraft:activator_rail powered=false;shape=ascending_west +2516 minecraft:activator_rail powered=false;shape=ascending_north minecraft:activator_rail powered=false;shape=ascending_north +2517 minecraft:activator_rail powered=false;shape=ascending_south minecraft:activator_rail powered=false;shape=ascending_south +2520 minecraft:activator_rail powered=true;shape=north_south minecraft:activator_rail powered=true;shape=north_south +2521 minecraft:activator_rail powered=true;shape=east_west minecraft:activator_rail powered=true;shape=east_west +2522 minecraft:activator_rail powered=true;shape=ascending_east minecraft:activator_rail powered=true;shape=ascending_east +2523 minecraft:activator_rail powered=true;shape=ascending_west minecraft:activator_rail powered=true;shape=ascending_west +2524 minecraft:activator_rail powered=true;shape=ascending_north minecraft:activator_rail powered=true;shape=ascending_north +2525 minecraft:activator_rail powered=true;shape=ascending_south minecraft:activator_rail powered=true;shape=ascending_south +2528 minecraft:dropper facing=down;triggered=false minecraft:dropper facing=down;triggered=false +2529 minecraft:dropper facing=up;triggered=false minecraft:dropper facing=up;triggered=false +2530 minecraft:dropper facing=north;triggered=false minecraft:dropper facing=north;triggered=false +2531 minecraft:dropper facing=south;triggered=false minecraft:dropper facing=south;triggered=false +2532 minecraft:dropper facing=west;triggered=false minecraft:dropper facing=west;triggered=false +2533 minecraft:dropper facing=east;triggered=false minecraft:dropper facing=east;triggered=false +2536 minecraft:dropper facing=down;triggered=true minecraft:dropper facing=down;triggered=true +2537 minecraft:dropper facing=up;triggered=true minecraft:dropper facing=up;triggered=true +2538 minecraft:dropper facing=north;triggered=true minecraft:dropper facing=north;triggered=true +2539 minecraft:dropper facing=south;triggered=true minecraft:dropper facing=south;triggered=true +2540 minecraft:dropper facing=west;triggered=true minecraft:dropper facing=west;triggered=true +2541 minecraft:dropper facing=east;triggered=true minecraft:dropper facing=east;triggered=true +2544 minecraft:white_terracotta minecraft:stained_hardened_clay color=white +2545 minecraft:orange_terracotta minecraft:stained_hardened_clay color=orange +2546 minecraft:magenta_terracotta minecraft:stained_hardened_clay color=magenta +2547 minecraft:light_blue_terracotta minecraft:stained_hardened_clay color=light_blue +2548 minecraft:yellow_terracotta minecraft:stained_hardened_clay color=yellow +2549 minecraft:lime_terracotta minecraft:stained_hardened_clay color=lime +2550 minecraft:pink_terracotta minecraft:stained_hardened_clay color=pink +2551 minecraft:gray_terracotta minecraft:stained_hardened_clay color=gray +2552 minecraft:light_gray_terracotta minecraft:stained_hardened_clay color=silver +2553 minecraft:cyan_terracotta minecraft:stained_hardened_clay color=cyan +2554 minecraft:purple_terracotta minecraft:stained_hardened_clay color=purple +2555 minecraft:blue_terracotta minecraft:stained_hardened_clay color=blue +2556 minecraft:brown_terracotta minecraft:stained_hardened_clay color=brown +2557 minecraft:green_terracotta minecraft:stained_hardened_clay color=green +2558 minecraft:red_terracotta minecraft:stained_hardened_clay color=red +2559 minecraft:black_terracotta minecraft:stained_hardened_clay color=black +2560 minecraft:white_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=white;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=white;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=white;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=white;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=white;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=white;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=white;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=white;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=white;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=white;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=white;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=white;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=white;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=white;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=white;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=white;east=true;north=true;south=true;west=true +2561 minecraft:orange_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=orange;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=orange;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=orange;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=orange;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=orange;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=orange;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=orange;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=orange;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=orange;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=orange;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=orange;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=orange;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=orange;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=orange;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=orange;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=orange;east=true;north=true;south=true;west=true +2562 minecraft:magenta_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=magenta;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=magenta;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=magenta;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=magenta;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=magenta;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=magenta;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=magenta;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=magenta;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=magenta;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=magenta;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=magenta;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=magenta;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=magenta;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=magenta;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=magenta;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=magenta;east=true;north=true;south=true;west=true +2563 minecraft:light_blue_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=light_blue;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=light_blue;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=light_blue;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=light_blue;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=light_blue;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=light_blue;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=light_blue;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=light_blue;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=light_blue;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=light_blue;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=light_blue;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=light_blue;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=light_blue;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=light_blue;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=light_blue;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=light_blue;east=true;north=true;south=true;west=true +2564 minecraft:yellow_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=yellow;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=yellow;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=yellow;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=yellow;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=yellow;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=yellow;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=yellow;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=yellow;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=yellow;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=yellow;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=yellow;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=yellow;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=yellow;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=yellow;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=yellow;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=yellow;east=true;north=true;south=true;west=true +2565 minecraft:lime_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=lime;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=lime;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=lime;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=lime;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=lime;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=lime;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=lime;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=lime;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=lime;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=lime;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=lime;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=lime;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=lime;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=lime;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=lime;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=lime;east=true;north=true;south=true;west=true +2566 minecraft:pink_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=pink;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=pink;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=pink;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=pink;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=pink;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=pink;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=pink;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=pink;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=pink;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=pink;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=pink;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=pink;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=pink;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=pink;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=pink;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=pink;east=true;north=true;south=true;west=true +2567 minecraft:gray_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=gray;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=gray;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=gray;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=gray;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=gray;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=gray;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=gray;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=gray;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=gray;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=gray;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=gray;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=gray;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=gray;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=gray;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=gray;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=gray;east=true;north=true;south=true;west=true +2568 minecraft:light_gray_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=silver;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=silver;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=silver;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=silver;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=silver;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=silver;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=silver;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=silver;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=silver;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=silver;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=silver;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=silver;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=silver;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=silver;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=silver;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=silver;east=true;north=true;south=true;west=true +2569 minecraft:cyan_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=cyan;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=cyan;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=cyan;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=cyan;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=cyan;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=cyan;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=cyan;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=cyan;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=cyan;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=cyan;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=cyan;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=cyan;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=cyan;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=cyan;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=cyan;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=cyan;east=true;north=true;south=true;west=true +2570 minecraft:purple_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=purple;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=purple;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=purple;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=purple;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=purple;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=purple;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=purple;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=purple;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=purple;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=purple;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=purple;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=purple;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=purple;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=purple;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=purple;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=purple;east=true;north=true;south=true;west=true +2571 minecraft:blue_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=blue;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=blue;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=blue;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=blue;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=blue;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=blue;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=blue;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=blue;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=blue;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=blue;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=blue;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=blue;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=blue;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=blue;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=blue;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=blue;east=true;north=true;south=true;west=true +2572 minecraft:brown_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=brown;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=brown;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=brown;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=brown;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=brown;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=brown;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=brown;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=brown;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=brown;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=brown;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=brown;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=brown;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=brown;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=brown;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=brown;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=brown;east=true;north=true;south=true;west=true +2573 minecraft:green_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=green;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=green;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=green;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=green;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=green;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=green;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=green;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=green;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=green;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=green;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=green;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=green;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=green;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=green;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=green;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=green;east=true;north=true;south=true;west=true +2574 minecraft:red_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=red;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=red;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=red;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=red;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=red;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=red;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=red;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=red;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=red;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=red;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=red;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=red;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=red;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=red;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=red;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=red;east=true;north=true;south=true;west=true +2575 minecraft:black_stained_glass_pane east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=black;east=false;north=false;south=false;west=false minecraft:stained_glass_pane color=black;east=false;north=false;south=false;west=true minecraft:stained_glass_pane color=black;east=false;north=false;south=true;west=false minecraft:stained_glass_pane color=black;east=false;north=false;south=true;west=true minecraft:stained_glass_pane color=black;east=false;north=true;south=false;west=false minecraft:stained_glass_pane color=black;east=false;north=true;south=false;west=true minecraft:stained_glass_pane color=black;east=false;north=true;south=true;west=false minecraft:stained_glass_pane color=black;east=false;north=true;south=true;west=true minecraft:stained_glass_pane color=black;east=true;north=false;south=false;west=false minecraft:stained_glass_pane color=black;east=true;north=false;south=false;west=true minecraft:stained_glass_pane color=black;east=true;north=false;south=true;west=false minecraft:stained_glass_pane color=black;east=true;north=false;south=true;west=true minecraft:stained_glass_pane color=black;east=true;north=true;south=false;west=false minecraft:stained_glass_pane color=black;east=true;north=true;south=false;west=true minecraft:stained_glass_pane color=black;east=true;north=true;south=true;west=false minecraft:stained_glass_pane color=black;east=true;north=true;south=true;west=true +2576 minecraft:acacia_leaves check_decay=false;decayable=true minecraft:leaves2 check_decay=false;decayable=true;variant=acacia +2577 minecraft:dark_oak_leaves check_decay=false;decayable=true minecraft:leaves2 check_decay=false;decayable=true;variant=dark_oak +2580 minecraft:acacia_leaves check_decay=false;decayable=false minecraft:leaves2 check_decay=false;decayable=false;variant=acacia +2581 minecraft:dark_oak_leaves check_decay=false;decayable=false minecraft:leaves2 check_decay=false;decayable=false;variant=dark_oak +2584 minecraft:acacia_leaves check_decay=true;decayable=true minecraft:leaves2 check_decay=true;decayable=true;variant=acacia +2585 minecraft:dark_oak_leaves check_decay=true;decayable=true minecraft:leaves2 check_decay=true;decayable=true;variant=dark_oak +2588 minecraft:acacia_leaves check_decay=true;decayable=false minecraft:leaves2 check_decay=true;decayable=false;variant=acacia +2589 minecraft:dark_oak_leaves check_decay=true;decayable=false minecraft:leaves2 check_decay=true;decayable=false;variant=dark_oak +2592 minecraft:acacia_log axis=y minecraft:log2 axis=y;variant=acacia +2593 minecraft:dark_oak_log axis=y minecraft:log2 axis=y;variant=dark_oak +2596 minecraft:acacia_log axis=x minecraft:log2 axis=x;variant=acacia +2597 minecraft:dark_oak_log axis=x minecraft:log2 axis=x;variant=dark_oak +2600 minecraft:acacia_log axis=z minecraft:log2 axis=z;variant=acacia +2601 minecraft:dark_oak_log axis=z minecraft:log2 axis=z;variant=dark_oak +2604 minecraft:acacia_bark minecraft:log2 axis=none;variant=acacia +2605 minecraft:dark_oak_bark minecraft:log2 axis=none;variant=dark_oak +2608 minecraft:acacia_stairs facing=east;half=bottom;shape=straight minecraft:acacia_stairs facing=east;half=bottom;shape=inner_left minecraft:acacia_stairs facing=east;half=bottom;shape=inner_right minecraft:acacia_stairs facing=east;half=bottom;shape=outer_left minecraft:acacia_stairs facing=east;half=bottom;shape=outer_right minecraft:acacia_stairs facing=east;half=bottom;shape=straight +2609 minecraft:acacia_stairs facing=west;half=bottom;shape=straight minecraft:acacia_stairs facing=west;half=bottom;shape=inner_left minecraft:acacia_stairs facing=west;half=bottom;shape=inner_right minecraft:acacia_stairs facing=west;half=bottom;shape=outer_left minecraft:acacia_stairs facing=west;half=bottom;shape=outer_right minecraft:acacia_stairs facing=west;half=bottom;shape=straight +2610 minecraft:acacia_stairs facing=south;half=bottom;shape=straight minecraft:acacia_stairs facing=south;half=bottom;shape=inner_left minecraft:acacia_stairs facing=south;half=bottom;shape=inner_right minecraft:acacia_stairs facing=south;half=bottom;shape=outer_left minecraft:acacia_stairs facing=south;half=bottom;shape=outer_right minecraft:acacia_stairs facing=south;half=bottom;shape=straight +2611 minecraft:acacia_stairs facing=north;half=bottom;shape=straight minecraft:acacia_stairs facing=north;half=bottom;shape=inner_left minecraft:acacia_stairs facing=north;half=bottom;shape=inner_right minecraft:acacia_stairs facing=north;half=bottom;shape=outer_left minecraft:acacia_stairs facing=north;half=bottom;shape=outer_right minecraft:acacia_stairs facing=north;half=bottom;shape=straight +2612 minecraft:acacia_stairs facing=east;half=top;shape=straight minecraft:acacia_stairs facing=east;half=top;shape=inner_left minecraft:acacia_stairs facing=east;half=top;shape=inner_right minecraft:acacia_stairs facing=east;half=top;shape=outer_left minecraft:acacia_stairs facing=east;half=top;shape=outer_right minecraft:acacia_stairs facing=east;half=top;shape=straight +2613 minecraft:acacia_stairs facing=west;half=top;shape=straight minecraft:acacia_stairs facing=west;half=top;shape=inner_left minecraft:acacia_stairs facing=west;half=top;shape=inner_right minecraft:acacia_stairs facing=west;half=top;shape=outer_left minecraft:acacia_stairs facing=west;half=top;shape=outer_right minecraft:acacia_stairs facing=west;half=top;shape=straight +2614 minecraft:acacia_stairs facing=south;half=top;shape=straight minecraft:acacia_stairs facing=south;half=top;shape=inner_left minecraft:acacia_stairs facing=south;half=top;shape=inner_right minecraft:acacia_stairs facing=south;half=top;shape=outer_left minecraft:acacia_stairs facing=south;half=top;shape=outer_right minecraft:acacia_stairs facing=south;half=top;shape=straight +2615 minecraft:acacia_stairs facing=north;half=top;shape=straight minecraft:acacia_stairs facing=north;half=top;shape=inner_left minecraft:acacia_stairs facing=north;half=top;shape=inner_right minecraft:acacia_stairs facing=north;half=top;shape=outer_left minecraft:acacia_stairs facing=north;half=top;shape=outer_right minecraft:acacia_stairs facing=north;half=top;shape=straight +2624 minecraft:dark_oak_stairs facing=east;half=bottom;shape=straight minecraft:dark_oak_stairs facing=east;half=bottom;shape=inner_left minecraft:dark_oak_stairs facing=east;half=bottom;shape=inner_right minecraft:dark_oak_stairs facing=east;half=bottom;shape=outer_left minecraft:dark_oak_stairs facing=east;half=bottom;shape=outer_right minecraft:dark_oak_stairs facing=east;half=bottom;shape=straight +2625 minecraft:dark_oak_stairs facing=west;half=bottom;shape=straight minecraft:dark_oak_stairs facing=west;half=bottom;shape=inner_left minecraft:dark_oak_stairs facing=west;half=bottom;shape=inner_right minecraft:dark_oak_stairs facing=west;half=bottom;shape=outer_left minecraft:dark_oak_stairs facing=west;half=bottom;shape=outer_right minecraft:dark_oak_stairs facing=west;half=bottom;shape=straight +2626 minecraft:dark_oak_stairs facing=south;half=bottom;shape=straight minecraft:dark_oak_stairs facing=south;half=bottom;shape=inner_left minecraft:dark_oak_stairs facing=south;half=bottom;shape=inner_right minecraft:dark_oak_stairs facing=south;half=bottom;shape=outer_left minecraft:dark_oak_stairs facing=south;half=bottom;shape=outer_right minecraft:dark_oak_stairs facing=south;half=bottom;shape=straight +2627 minecraft:dark_oak_stairs facing=north;half=bottom;shape=straight minecraft:dark_oak_stairs facing=north;half=bottom;shape=inner_left minecraft:dark_oak_stairs facing=north;half=bottom;shape=inner_right minecraft:dark_oak_stairs facing=north;half=bottom;shape=outer_left minecraft:dark_oak_stairs facing=north;half=bottom;shape=outer_right minecraft:dark_oak_stairs facing=north;half=bottom;shape=straight +2628 minecraft:dark_oak_stairs facing=east;half=top;shape=straight minecraft:dark_oak_stairs facing=east;half=top;shape=inner_left minecraft:dark_oak_stairs facing=east;half=top;shape=inner_right minecraft:dark_oak_stairs facing=east;half=top;shape=outer_left minecraft:dark_oak_stairs facing=east;half=top;shape=outer_right minecraft:dark_oak_stairs facing=east;half=top;shape=straight +2629 minecraft:dark_oak_stairs facing=west;half=top;shape=straight minecraft:dark_oak_stairs facing=west;half=top;shape=inner_left minecraft:dark_oak_stairs facing=west;half=top;shape=inner_right minecraft:dark_oak_stairs facing=west;half=top;shape=outer_left minecraft:dark_oak_stairs facing=west;half=top;shape=outer_right minecraft:dark_oak_stairs facing=west;half=top;shape=straight +2630 minecraft:dark_oak_stairs facing=south;half=top;shape=straight minecraft:dark_oak_stairs facing=south;half=top;shape=inner_left minecraft:dark_oak_stairs facing=south;half=top;shape=inner_right minecraft:dark_oak_stairs facing=south;half=top;shape=outer_left minecraft:dark_oak_stairs facing=south;half=top;shape=outer_right minecraft:dark_oak_stairs facing=south;half=top;shape=straight +2631 minecraft:dark_oak_stairs facing=north;half=top;shape=straight minecraft:dark_oak_stairs facing=north;half=top;shape=inner_left minecraft:dark_oak_stairs facing=north;half=top;shape=inner_right minecraft:dark_oak_stairs facing=north;half=top;shape=outer_left minecraft:dark_oak_stairs facing=north;half=top;shape=outer_right minecraft:dark_oak_stairs facing=north;half=top;shape=straight +2640 minecraft:slime_block minecraft:slime +2656 minecraft:barrier minecraft:barrier +2672 minecraft:iron_trapdoor facing=north;half=bottom;open=false minecraft:iron_trapdoor facing=north;half=bottom;open=false +2673 minecraft:iron_trapdoor facing=south;half=bottom;open=false minecraft:iron_trapdoor facing=south;half=bottom;open=false +2674 minecraft:iron_trapdoor facing=west;half=bottom;open=false minecraft:iron_trapdoor facing=west;half=bottom;open=false +2675 minecraft:iron_trapdoor facing=east;half=bottom;open=false minecraft:iron_trapdoor facing=east;half=bottom;open=false +2676 minecraft:iron_trapdoor facing=north;half=bottom;open=true minecraft:iron_trapdoor facing=north;half=bottom;open=true +2677 minecraft:iron_trapdoor facing=south;half=bottom;open=true minecraft:iron_trapdoor facing=south;half=bottom;open=true +2678 minecraft:iron_trapdoor facing=west;half=bottom;open=true minecraft:iron_trapdoor facing=west;half=bottom;open=true +2679 minecraft:iron_trapdoor facing=east;half=bottom;open=true minecraft:iron_trapdoor facing=east;half=bottom;open=true +2680 minecraft:iron_trapdoor facing=north;half=top;open=false minecraft:iron_trapdoor facing=north;half=top;open=false +2681 minecraft:iron_trapdoor facing=south;half=top;open=false minecraft:iron_trapdoor facing=south;half=top;open=false +2682 minecraft:iron_trapdoor facing=west;half=top;open=false minecraft:iron_trapdoor facing=west;half=top;open=false +2683 minecraft:iron_trapdoor facing=east;half=top;open=false minecraft:iron_trapdoor facing=east;half=top;open=false +2684 minecraft:iron_trapdoor facing=north;half=top;open=true minecraft:iron_trapdoor facing=north;half=top;open=true +2685 minecraft:iron_trapdoor facing=south;half=top;open=true minecraft:iron_trapdoor facing=south;half=top;open=true +2686 minecraft:iron_trapdoor facing=west;half=top;open=true minecraft:iron_trapdoor facing=west;half=top;open=true +2687 minecraft:iron_trapdoor facing=east;half=top;open=true minecraft:iron_trapdoor facing=east;half=top;open=true +2688 minecraft:prismarine minecraft:prismarine variant=prismarine +2689 minecraft:prismarine_bricks minecraft:prismarine variant=prismarine_bricks +2690 minecraft:dark_prismarine minecraft:prismarine variant=dark_prismarine +2704 minecraft:sea_lantern minecraft:sea_lantern +2720 minecraft:hay_block axis=y minecraft:hay_block axis=y +2724 minecraft:hay_block axis=x minecraft:hay_block axis=x +2728 minecraft:hay_block axis=z minecraft:hay_block axis=z +2736 minecraft:white_carpet minecraft:carpet color=white +2737 minecraft:orange_carpet minecraft:carpet color=orange +2738 minecraft:magenta_carpet minecraft:carpet color=magenta +2739 minecraft:light_blue_carpet minecraft:carpet color=light_blue +2740 minecraft:yellow_carpet minecraft:carpet color=yellow +2741 minecraft:lime_carpet minecraft:carpet color=lime +2742 minecraft:pink_carpet minecraft:carpet color=pink +2743 minecraft:gray_carpet minecraft:carpet color=gray +2744 minecraft:light_gray_carpet minecraft:carpet color=silver +2745 minecraft:cyan_carpet minecraft:carpet color=cyan +2746 minecraft:purple_carpet minecraft:carpet color=purple +2747 minecraft:blue_carpet minecraft:carpet color=blue +2748 minecraft:brown_carpet minecraft:carpet color=brown +2749 minecraft:green_carpet minecraft:carpet color=green +2750 minecraft:red_carpet minecraft:carpet color=red +2751 minecraft:black_carpet minecraft:carpet color=black +2752 minecraft:terracotta minecraft:hardened_clay +2768 minecraft:coal_block minecraft:coal_block +2784 minecraft:packed_ice minecraft:packed_ice +2800 minecraft:sunflower half=lower minecraft:double_plant facing=east;half=lower;variant=sunflower minecraft:double_plant facing=north;half=lower;variant=sunflower minecraft:double_plant facing=south;half=lower;variant=sunflower minecraft:double_plant facing=west;half=lower;variant=sunflower +2801 minecraft:lilac half=lower minecraft:double_plant facing=east;half=lower;variant=syringa minecraft:double_plant facing=north;half=lower;variant=syringa minecraft:double_plant facing=south;half=lower;variant=syringa minecraft:double_plant facing=west;half=lower;variant=syringa +2802 minecraft:tall_grass half=lower minecraft:double_plant facing=east;half=lower;variant=double_grass minecraft:double_plant facing=north;half=lower;variant=double_grass minecraft:double_plant facing=south;half=lower;variant=double_grass minecraft:double_plant facing=west;half=lower;variant=double_grass +2803 minecraft:large_fern half=lower minecraft:double_plant facing=east;half=lower;variant=double_fern minecraft:double_plant facing=north;half=lower;variant=double_fern minecraft:double_plant facing=south;half=lower;variant=double_fern minecraft:double_plant facing=west;half=lower;variant=double_fern +2804 minecraft:rose_bush half=lower minecraft:double_plant facing=east;half=lower;variant=double_rose minecraft:double_plant facing=north;half=lower;variant=double_rose minecraft:double_plant facing=south;half=lower;variant=double_rose minecraft:double_plant facing=west;half=lower;variant=double_rose +2805 minecraft:peony half=lower minecraft:double_plant facing=east;half=lower;variant=paeonia minecraft:double_plant facing=north;half=lower;variant=paeonia minecraft:double_plant facing=south;half=lower;variant=paeonia minecraft:double_plant facing=west;half=lower;variant=paeonia +2808 minecraft:peony half=upper minecraft:double_plant facing=south;half=upper;variant=double_fern minecraft:double_plant facing=south;half=upper;variant=double_grass minecraft:double_plant facing=south;half=upper;variant=double_rose minecraft:double_plant facing=south;half=upper;variant=paeonia minecraft:double_plant facing=south;half=upper;variant=sunflower minecraft:double_plant facing=south;half=upper;variant=syringa +2809 minecraft:peony half=upper minecraft:double_plant facing=west;half=upper;variant=double_fern minecraft:double_plant facing=west;half=upper;variant=double_grass minecraft:double_plant facing=west;half=upper;variant=double_rose minecraft:double_plant facing=west;half=upper;variant=paeonia minecraft:double_plant facing=west;half=upper;variant=sunflower minecraft:double_plant facing=west;half=upper;variant=syringa +2810 minecraft:peony half=upper minecraft:double_plant facing=north;half=upper;variant=double_fern minecraft:double_plant facing=north;half=upper;variant=double_grass minecraft:double_plant facing=north;half=upper;variant=double_rose minecraft:double_plant facing=north;half=upper;variant=paeonia minecraft:double_plant facing=north;half=upper;variant=sunflower minecraft:double_plant facing=north;half=upper;variant=syringa +2811 minecraft:peony half=upper minecraft:double_plant facing=east;half=upper;variant=double_fern minecraft:double_plant facing=east;half=upper;variant=double_grass minecraft:double_plant facing=east;half=upper;variant=double_rose minecraft:double_plant facing=east;half=upper;variant=paeonia minecraft:double_plant facing=east;half=upper;variant=sunflower minecraft:double_plant facing=east;half=upper;variant=syringa +2816 minecraft:white_banner rotation=0 minecraft:standing_banner rotation=0 +2817 minecraft:white_banner rotation=1 minecraft:standing_banner rotation=1 +2818 minecraft:white_banner rotation=2 minecraft:standing_banner rotation=2 +2819 minecraft:white_banner rotation=3 minecraft:standing_banner rotation=3 +2820 minecraft:white_banner rotation=4 minecraft:standing_banner rotation=4 +2821 minecraft:white_banner rotation=5 minecraft:standing_banner rotation=5 +2822 minecraft:white_banner rotation=6 minecraft:standing_banner rotation=6 +2823 minecraft:white_banner rotation=7 minecraft:standing_banner rotation=7 +2824 minecraft:white_banner rotation=8 minecraft:standing_banner rotation=8 +2825 minecraft:white_banner rotation=9 minecraft:standing_banner rotation=9 +2826 minecraft:white_banner rotation=10 minecraft:standing_banner rotation=10 +2827 minecraft:white_banner rotation=11 minecraft:standing_banner rotation=11 +2828 minecraft:white_banner rotation=12 minecraft:standing_banner rotation=12 +2829 minecraft:white_banner rotation=13 minecraft:standing_banner rotation=13 +2830 minecraft:white_banner rotation=14 minecraft:standing_banner rotation=14 +2831 minecraft:white_banner rotation=15 minecraft:standing_banner rotation=15 +2834 minecraft:white_wall_banner facing=north minecraft:wall_banner facing=north +2835 minecraft:white_wall_banner facing=south minecraft:wall_banner facing=south +2836 minecraft:white_wall_banner facing=west minecraft:wall_banner facing=west +2837 minecraft:white_wall_banner facing=east minecraft:wall_banner facing=east +2848 minecraft:daylight_detector inverted=true;power=0 minecraft:daylight_detector_inverted power=0 +2849 minecraft:daylight_detector inverted=true;power=1 minecraft:daylight_detector_inverted power=1 +2850 minecraft:daylight_detector inverted=true;power=2 minecraft:daylight_detector_inverted power=2 +2851 minecraft:daylight_detector inverted=true;power=3 minecraft:daylight_detector_inverted power=3 +2852 minecraft:daylight_detector inverted=true;power=4 minecraft:daylight_detector_inverted power=4 +2853 minecraft:daylight_detector inverted=true;power=5 minecraft:daylight_detector_inverted power=5 +2854 minecraft:daylight_detector inverted=true;power=6 minecraft:daylight_detector_inverted power=6 +2855 minecraft:daylight_detector inverted=true;power=7 minecraft:daylight_detector_inverted power=7 +2856 minecraft:daylight_detector inverted=true;power=8 minecraft:daylight_detector_inverted power=8 +2857 minecraft:daylight_detector inverted=true;power=9 minecraft:daylight_detector_inverted power=9 +2858 minecraft:daylight_detector inverted=true;power=10 minecraft:daylight_detector_inverted power=10 +2859 minecraft:daylight_detector inverted=true;power=11 minecraft:daylight_detector_inverted power=11 +2860 minecraft:daylight_detector inverted=true;power=12 minecraft:daylight_detector_inverted power=12 +2861 minecraft:daylight_detector inverted=true;power=13 minecraft:daylight_detector_inverted power=13 +2862 minecraft:daylight_detector inverted=true;power=14 minecraft:daylight_detector_inverted power=14 +2863 minecraft:daylight_detector inverted=true;power=15 minecraft:daylight_detector_inverted power=15 +2864 minecraft:red_sandstone minecraft:red_sandstone type=red_sandstone +2865 minecraft:chiseled_red_sandstone minecraft:red_sandstone type=chiseled_red_sandstone +2866 minecraft:cut_red_sandstone minecraft:red_sandstone type=smooth_red_sandstone +2880 minecraft:red_sandstone_stairs facing=east;half=bottom;shape=straight minecraft:red_sandstone_stairs facing=east;half=bottom;shape=inner_left minecraft:red_sandstone_stairs facing=east;half=bottom;shape=inner_right minecraft:red_sandstone_stairs facing=east;half=bottom;shape=outer_left minecraft:red_sandstone_stairs facing=east;half=bottom;shape=outer_right minecraft:red_sandstone_stairs facing=east;half=bottom;shape=straight +2881 minecraft:red_sandstone_stairs facing=west;half=bottom;shape=straight minecraft:red_sandstone_stairs facing=west;half=bottom;shape=inner_left minecraft:red_sandstone_stairs facing=west;half=bottom;shape=inner_right minecraft:red_sandstone_stairs facing=west;half=bottom;shape=outer_left minecraft:red_sandstone_stairs facing=west;half=bottom;shape=outer_right minecraft:red_sandstone_stairs facing=west;half=bottom;shape=straight +2882 minecraft:red_sandstone_stairs facing=south;half=bottom;shape=straight minecraft:red_sandstone_stairs facing=south;half=bottom;shape=inner_left minecraft:red_sandstone_stairs facing=south;half=bottom;shape=inner_right minecraft:red_sandstone_stairs facing=south;half=bottom;shape=outer_left minecraft:red_sandstone_stairs facing=south;half=bottom;shape=outer_right minecraft:red_sandstone_stairs facing=south;half=bottom;shape=straight +2883 minecraft:red_sandstone_stairs facing=north;half=bottom;shape=straight minecraft:red_sandstone_stairs facing=north;half=bottom;shape=inner_left minecraft:red_sandstone_stairs facing=north;half=bottom;shape=inner_right minecraft:red_sandstone_stairs facing=north;half=bottom;shape=outer_left minecraft:red_sandstone_stairs facing=north;half=bottom;shape=outer_right minecraft:red_sandstone_stairs facing=north;half=bottom;shape=straight +2884 minecraft:red_sandstone_stairs facing=east;half=top;shape=straight minecraft:red_sandstone_stairs facing=east;half=top;shape=inner_left minecraft:red_sandstone_stairs facing=east;half=top;shape=inner_right minecraft:red_sandstone_stairs facing=east;half=top;shape=outer_left minecraft:red_sandstone_stairs facing=east;half=top;shape=outer_right minecraft:red_sandstone_stairs facing=east;half=top;shape=straight +2885 minecraft:red_sandstone_stairs facing=west;half=top;shape=straight minecraft:red_sandstone_stairs facing=west;half=top;shape=inner_left minecraft:red_sandstone_stairs facing=west;half=top;shape=inner_right minecraft:red_sandstone_stairs facing=west;half=top;shape=outer_left minecraft:red_sandstone_stairs facing=west;half=top;shape=outer_right minecraft:red_sandstone_stairs facing=west;half=top;shape=straight +2886 minecraft:red_sandstone_stairs facing=south;half=top;shape=straight minecraft:red_sandstone_stairs facing=south;half=top;shape=inner_left minecraft:red_sandstone_stairs facing=south;half=top;shape=inner_right minecraft:red_sandstone_stairs facing=south;half=top;shape=outer_left minecraft:red_sandstone_stairs facing=south;half=top;shape=outer_right minecraft:red_sandstone_stairs facing=south;half=top;shape=straight +2887 minecraft:red_sandstone_stairs facing=north;half=top;shape=straight minecraft:red_sandstone_stairs facing=north;half=top;shape=inner_left minecraft:red_sandstone_stairs facing=north;half=top;shape=inner_right minecraft:red_sandstone_stairs facing=north;half=top;shape=outer_left minecraft:red_sandstone_stairs facing=north;half=top;shape=outer_right minecraft:red_sandstone_stairs facing=north;half=top;shape=straight +2896 minecraft:red_sandstone_slab type=double minecraft:double_stone_slab2 seamless=false;variant=red_sandstone +2904 minecraft:smooth_red_sandstone minecraft:double_stone_slab2 seamless=true;variant=red_sandstone +2912 minecraft:red_sandstone_slab type=bottom minecraft:stone_slab2 half=bottom;variant=red_sandstone +2920 minecraft:red_sandstone_slab type=top minecraft:stone_slab2 half=top;variant=red_sandstone +2928 minecraft:spruce_fence_gate facing=south;in_wall=false;open=false;powered=false minecraft:spruce_fence_gate facing=south;in_wall=false;open=false;powered=false minecraft:spruce_fence_gate facing=south;in_wall=true;open=false;powered=false +2929 minecraft:spruce_fence_gate facing=west;in_wall=false;open=false;powered=false minecraft:spruce_fence_gate facing=west;in_wall=false;open=false;powered=false minecraft:spruce_fence_gate facing=west;in_wall=true;open=false;powered=false +2930 minecraft:spruce_fence_gate facing=north;in_wall=false;open=false;powered=false minecraft:spruce_fence_gate facing=north;in_wall=false;open=false;powered=false minecraft:spruce_fence_gate facing=north;in_wall=true;open=false;powered=false +2931 minecraft:spruce_fence_gate facing=east;in_wall=false;open=false;powered=false minecraft:spruce_fence_gate facing=east;in_wall=false;open=false;powered=false minecraft:spruce_fence_gate facing=east;in_wall=true;open=false;powered=false +2932 minecraft:spruce_fence_gate facing=south;in_wall=false;open=true;powered=false minecraft:spruce_fence_gate facing=south;in_wall=false;open=true;powered=false minecraft:spruce_fence_gate facing=south;in_wall=true;open=true;powered=false +2933 minecraft:spruce_fence_gate facing=west;in_wall=false;open=true;powered=false minecraft:spruce_fence_gate facing=west;in_wall=false;open=true;powered=false minecraft:spruce_fence_gate facing=west;in_wall=true;open=true;powered=false +2934 minecraft:spruce_fence_gate facing=north;in_wall=false;open=true;powered=false minecraft:spruce_fence_gate facing=north;in_wall=false;open=true;powered=false minecraft:spruce_fence_gate facing=north;in_wall=true;open=true;powered=false +2935 minecraft:spruce_fence_gate facing=east;in_wall=false;open=true;powered=false minecraft:spruce_fence_gate facing=east;in_wall=false;open=true;powered=false minecraft:spruce_fence_gate facing=east;in_wall=true;open=true;powered=false +2936 minecraft:spruce_fence_gate facing=south;in_wall=false;open=false;powered=true minecraft:spruce_fence_gate facing=south;in_wall=false;open=false;powered=true minecraft:spruce_fence_gate facing=south;in_wall=true;open=false;powered=true +2937 minecraft:spruce_fence_gate facing=west;in_wall=false;open=false;powered=true minecraft:spruce_fence_gate facing=west;in_wall=false;open=false;powered=true minecraft:spruce_fence_gate facing=west;in_wall=true;open=false;powered=true +2938 minecraft:spruce_fence_gate facing=north;in_wall=false;open=false;powered=true minecraft:spruce_fence_gate facing=north;in_wall=false;open=false;powered=true minecraft:spruce_fence_gate facing=north;in_wall=true;open=false;powered=true +2939 minecraft:spruce_fence_gate facing=east;in_wall=false;open=false;powered=true minecraft:spruce_fence_gate facing=east;in_wall=false;open=false;powered=true minecraft:spruce_fence_gate facing=east;in_wall=true;open=false;powered=true +2940 minecraft:spruce_fence_gate facing=south;in_wall=false;open=true;powered=true minecraft:spruce_fence_gate facing=south;in_wall=false;open=true;powered=true minecraft:spruce_fence_gate facing=south;in_wall=true;open=true;powered=true +2941 minecraft:spruce_fence_gate facing=west;in_wall=false;open=true;powered=true minecraft:spruce_fence_gate facing=west;in_wall=false;open=true;powered=true minecraft:spruce_fence_gate facing=west;in_wall=true;open=true;powered=true +2942 minecraft:spruce_fence_gate facing=north;in_wall=false;open=true;powered=true minecraft:spruce_fence_gate facing=north;in_wall=false;open=true;powered=true minecraft:spruce_fence_gate facing=north;in_wall=true;open=true;powered=true +2943 minecraft:spruce_fence_gate facing=east;in_wall=false;open=true;powered=true minecraft:spruce_fence_gate facing=east;in_wall=false;open=true;powered=true minecraft:spruce_fence_gate facing=east;in_wall=true;open=true;powered=true +2944 minecraft:birch_fence_gate facing=south;in_wall=false;open=false;powered=false minecraft:birch_fence_gate facing=south;in_wall=false;open=false;powered=false minecraft:birch_fence_gate facing=south;in_wall=true;open=false;powered=false +2945 minecraft:birch_fence_gate facing=west;in_wall=false;open=false;powered=false minecraft:birch_fence_gate facing=west;in_wall=false;open=false;powered=false minecraft:birch_fence_gate facing=west;in_wall=true;open=false;powered=false +2946 minecraft:birch_fence_gate facing=north;in_wall=false;open=false;powered=false minecraft:birch_fence_gate facing=north;in_wall=false;open=false;powered=false minecraft:birch_fence_gate facing=north;in_wall=true;open=false;powered=false +2947 minecraft:birch_fence_gate facing=east;in_wall=false;open=false;powered=false minecraft:birch_fence_gate facing=east;in_wall=false;open=false;powered=false minecraft:birch_fence_gate facing=east;in_wall=true;open=false;powered=false +2948 minecraft:birch_fence_gate facing=south;in_wall=false;open=true;powered=false minecraft:birch_fence_gate facing=south;in_wall=false;open=true;powered=false minecraft:birch_fence_gate facing=south;in_wall=true;open=true;powered=false +2949 minecraft:birch_fence_gate facing=west;in_wall=false;open=true;powered=false minecraft:birch_fence_gate facing=west;in_wall=false;open=true;powered=false minecraft:birch_fence_gate facing=west;in_wall=true;open=true;powered=false +2950 minecraft:birch_fence_gate facing=north;in_wall=false;open=true;powered=false minecraft:birch_fence_gate facing=north;in_wall=false;open=true;powered=false minecraft:birch_fence_gate facing=north;in_wall=true;open=true;powered=false +2951 minecraft:birch_fence_gate facing=east;in_wall=false;open=true;powered=false minecraft:birch_fence_gate facing=east;in_wall=false;open=true;powered=false minecraft:birch_fence_gate facing=east;in_wall=true;open=true;powered=false +2952 minecraft:birch_fence_gate facing=south;in_wall=false;open=false;powered=true minecraft:birch_fence_gate facing=south;in_wall=false;open=false;powered=true minecraft:birch_fence_gate facing=south;in_wall=true;open=false;powered=true +2953 minecraft:birch_fence_gate facing=west;in_wall=false;open=false;powered=true minecraft:birch_fence_gate facing=west;in_wall=false;open=false;powered=true minecraft:birch_fence_gate facing=west;in_wall=true;open=false;powered=true +2954 minecraft:birch_fence_gate facing=north;in_wall=false;open=false;powered=true minecraft:birch_fence_gate facing=north;in_wall=false;open=false;powered=true minecraft:birch_fence_gate facing=north;in_wall=true;open=false;powered=true +2955 minecraft:birch_fence_gate facing=east;in_wall=false;open=false;powered=true minecraft:birch_fence_gate facing=east;in_wall=false;open=false;powered=true minecraft:birch_fence_gate facing=east;in_wall=true;open=false;powered=true +2956 minecraft:birch_fence_gate facing=south;in_wall=false;open=true;powered=true minecraft:birch_fence_gate facing=south;in_wall=false;open=true;powered=true minecraft:birch_fence_gate facing=south;in_wall=true;open=true;powered=true +2957 minecraft:birch_fence_gate facing=west;in_wall=false;open=true;powered=true minecraft:birch_fence_gate facing=west;in_wall=false;open=true;powered=true minecraft:birch_fence_gate facing=west;in_wall=true;open=true;powered=true +2958 minecraft:birch_fence_gate facing=north;in_wall=false;open=true;powered=true minecraft:birch_fence_gate facing=north;in_wall=false;open=true;powered=true minecraft:birch_fence_gate facing=north;in_wall=true;open=true;powered=true +2959 minecraft:birch_fence_gate facing=east;in_wall=false;open=true;powered=true minecraft:birch_fence_gate facing=east;in_wall=false;open=true;powered=true minecraft:birch_fence_gate facing=east;in_wall=true;open=true;powered=true +2960 minecraft:jungle_fence_gate facing=south;in_wall=false;open=false;powered=false minecraft:jungle_fence_gate facing=south;in_wall=false;open=false;powered=false minecraft:jungle_fence_gate facing=south;in_wall=true;open=false;powered=false +2961 minecraft:jungle_fence_gate facing=west;in_wall=false;open=false;powered=false minecraft:jungle_fence_gate facing=west;in_wall=false;open=false;powered=false minecraft:jungle_fence_gate facing=west;in_wall=true;open=false;powered=false +2962 minecraft:jungle_fence_gate facing=north;in_wall=false;open=false;powered=false minecraft:jungle_fence_gate facing=north;in_wall=false;open=false;powered=false minecraft:jungle_fence_gate facing=north;in_wall=true;open=false;powered=false +2963 minecraft:jungle_fence_gate facing=east;in_wall=false;open=false;powered=false minecraft:jungle_fence_gate facing=east;in_wall=false;open=false;powered=false minecraft:jungle_fence_gate facing=east;in_wall=true;open=false;powered=false +2964 minecraft:jungle_fence_gate facing=south;in_wall=false;open=true;powered=false minecraft:jungle_fence_gate facing=south;in_wall=false;open=true;powered=false minecraft:jungle_fence_gate facing=south;in_wall=true;open=true;powered=false +2965 minecraft:jungle_fence_gate facing=west;in_wall=false;open=true;powered=false minecraft:jungle_fence_gate facing=west;in_wall=false;open=true;powered=false minecraft:jungle_fence_gate facing=west;in_wall=true;open=true;powered=false +2966 minecraft:jungle_fence_gate facing=north;in_wall=false;open=true;powered=false minecraft:jungle_fence_gate facing=north;in_wall=false;open=true;powered=false minecraft:jungle_fence_gate facing=north;in_wall=true;open=true;powered=false +2967 minecraft:jungle_fence_gate facing=east;in_wall=false;open=true;powered=false minecraft:jungle_fence_gate facing=east;in_wall=false;open=true;powered=false minecraft:jungle_fence_gate facing=east;in_wall=true;open=true;powered=false +2968 minecraft:jungle_fence_gate facing=south;in_wall=false;open=false;powered=true minecraft:jungle_fence_gate facing=south;in_wall=false;open=false;powered=true minecraft:jungle_fence_gate facing=south;in_wall=true;open=false;powered=true +2969 minecraft:jungle_fence_gate facing=west;in_wall=false;open=false;powered=true minecraft:jungle_fence_gate facing=west;in_wall=false;open=false;powered=true minecraft:jungle_fence_gate facing=west;in_wall=true;open=false;powered=true +2970 minecraft:jungle_fence_gate facing=north;in_wall=false;open=false;powered=true minecraft:jungle_fence_gate facing=north;in_wall=false;open=false;powered=true minecraft:jungle_fence_gate facing=north;in_wall=true;open=false;powered=true +2971 minecraft:jungle_fence_gate facing=east;in_wall=false;open=false;powered=true minecraft:jungle_fence_gate facing=east;in_wall=false;open=false;powered=true minecraft:jungle_fence_gate facing=east;in_wall=true;open=false;powered=true +2972 minecraft:jungle_fence_gate facing=south;in_wall=false;open=true;powered=true minecraft:jungle_fence_gate facing=south;in_wall=false;open=true;powered=true minecraft:jungle_fence_gate facing=south;in_wall=true;open=true;powered=true +2973 minecraft:jungle_fence_gate facing=west;in_wall=false;open=true;powered=true minecraft:jungle_fence_gate facing=west;in_wall=false;open=true;powered=true minecraft:jungle_fence_gate facing=west;in_wall=true;open=true;powered=true +2974 minecraft:jungle_fence_gate facing=north;in_wall=false;open=true;powered=true minecraft:jungle_fence_gate facing=north;in_wall=false;open=true;powered=true minecraft:jungle_fence_gate facing=north;in_wall=true;open=true;powered=true +2975 minecraft:jungle_fence_gate facing=east;in_wall=false;open=true;powered=true minecraft:jungle_fence_gate facing=east;in_wall=false;open=true;powered=true minecraft:jungle_fence_gate facing=east;in_wall=true;open=true;powered=true +2976 minecraft:dark_oak_fence_gate facing=south;in_wall=false;open=false;powered=false minecraft:dark_oak_fence_gate facing=south;in_wall=false;open=false;powered=false minecraft:dark_oak_fence_gate facing=south;in_wall=true;open=false;powered=false +2977 minecraft:dark_oak_fence_gate facing=west;in_wall=false;open=false;powered=false minecraft:dark_oak_fence_gate facing=west;in_wall=false;open=false;powered=false minecraft:dark_oak_fence_gate facing=west;in_wall=true;open=false;powered=false +2978 minecraft:dark_oak_fence_gate facing=north;in_wall=false;open=false;powered=false minecraft:dark_oak_fence_gate facing=north;in_wall=false;open=false;powered=false minecraft:dark_oak_fence_gate facing=north;in_wall=true;open=false;powered=false +2979 minecraft:dark_oak_fence_gate facing=east;in_wall=false;open=false;powered=false minecraft:dark_oak_fence_gate facing=east;in_wall=false;open=false;powered=false minecraft:dark_oak_fence_gate facing=east;in_wall=true;open=false;powered=false +2980 minecraft:dark_oak_fence_gate facing=south;in_wall=false;open=true;powered=false minecraft:dark_oak_fence_gate facing=south;in_wall=false;open=true;powered=false minecraft:dark_oak_fence_gate facing=south;in_wall=true;open=true;powered=false +2981 minecraft:dark_oak_fence_gate facing=west;in_wall=false;open=true;powered=false minecraft:dark_oak_fence_gate facing=west;in_wall=false;open=true;powered=false minecraft:dark_oak_fence_gate facing=west;in_wall=true;open=true;powered=false +2982 minecraft:dark_oak_fence_gate facing=north;in_wall=false;open=true;powered=false minecraft:dark_oak_fence_gate facing=north;in_wall=false;open=true;powered=false minecraft:dark_oak_fence_gate facing=north;in_wall=true;open=true;powered=false +2983 minecraft:dark_oak_fence_gate facing=east;in_wall=false;open=true;powered=false minecraft:dark_oak_fence_gate facing=east;in_wall=false;open=true;powered=false minecraft:dark_oak_fence_gate facing=east;in_wall=true;open=true;powered=false +2984 minecraft:dark_oak_fence_gate facing=south;in_wall=false;open=false;powered=true minecraft:dark_oak_fence_gate facing=south;in_wall=false;open=false;powered=true minecraft:dark_oak_fence_gate facing=south;in_wall=true;open=false;powered=true +2985 minecraft:dark_oak_fence_gate facing=west;in_wall=false;open=false;powered=true minecraft:dark_oak_fence_gate facing=west;in_wall=false;open=false;powered=true minecraft:dark_oak_fence_gate facing=west;in_wall=true;open=false;powered=true +2986 minecraft:dark_oak_fence_gate facing=north;in_wall=false;open=false;powered=true minecraft:dark_oak_fence_gate facing=north;in_wall=false;open=false;powered=true minecraft:dark_oak_fence_gate facing=north;in_wall=true;open=false;powered=true +2987 minecraft:dark_oak_fence_gate facing=east;in_wall=false;open=false;powered=true minecraft:dark_oak_fence_gate facing=east;in_wall=false;open=false;powered=true minecraft:dark_oak_fence_gate facing=east;in_wall=true;open=false;powered=true +2988 minecraft:dark_oak_fence_gate facing=south;in_wall=false;open=true;powered=true minecraft:dark_oak_fence_gate facing=south;in_wall=false;open=true;powered=true minecraft:dark_oak_fence_gate facing=south;in_wall=true;open=true;powered=true +2989 minecraft:dark_oak_fence_gate facing=west;in_wall=false;open=true;powered=true minecraft:dark_oak_fence_gate facing=west;in_wall=false;open=true;powered=true minecraft:dark_oak_fence_gate facing=west;in_wall=true;open=true;powered=true +2990 minecraft:dark_oak_fence_gate facing=north;in_wall=false;open=true;powered=true minecraft:dark_oak_fence_gate facing=north;in_wall=false;open=true;powered=true minecraft:dark_oak_fence_gate facing=north;in_wall=true;open=true;powered=true +2991 minecraft:dark_oak_fence_gate facing=east;in_wall=false;open=true;powered=true minecraft:dark_oak_fence_gate facing=east;in_wall=false;open=true;powered=true minecraft:dark_oak_fence_gate facing=east;in_wall=true;open=true;powered=true +2992 minecraft:acacia_fence_gate facing=south;in_wall=false;open=false;powered=false minecraft:acacia_fence_gate facing=south;in_wall=false;open=false;powered=false minecraft:acacia_fence_gate facing=south;in_wall=true;open=false;powered=false +2993 minecraft:acacia_fence_gate facing=west;in_wall=false;open=false;powered=false minecraft:acacia_fence_gate facing=west;in_wall=false;open=false;powered=false minecraft:acacia_fence_gate facing=west;in_wall=true;open=false;powered=false +2994 minecraft:acacia_fence_gate facing=north;in_wall=false;open=false;powered=false minecraft:acacia_fence_gate facing=north;in_wall=false;open=false;powered=false minecraft:acacia_fence_gate facing=north;in_wall=true;open=false;powered=false +2995 minecraft:acacia_fence_gate facing=east;in_wall=false;open=false;powered=false minecraft:acacia_fence_gate facing=east;in_wall=false;open=false;powered=false minecraft:acacia_fence_gate facing=east;in_wall=true;open=false;powered=false +2996 minecraft:acacia_fence_gate facing=south;in_wall=false;open=true;powered=false minecraft:acacia_fence_gate facing=south;in_wall=false;open=true;powered=false minecraft:acacia_fence_gate facing=south;in_wall=true;open=true;powered=false +2997 minecraft:acacia_fence_gate facing=west;in_wall=false;open=true;powered=false minecraft:acacia_fence_gate facing=west;in_wall=false;open=true;powered=false minecraft:acacia_fence_gate facing=west;in_wall=true;open=true;powered=false +2998 minecraft:acacia_fence_gate facing=north;in_wall=false;open=true;powered=false minecraft:acacia_fence_gate facing=north;in_wall=false;open=true;powered=false minecraft:acacia_fence_gate facing=north;in_wall=true;open=true;powered=false +2999 minecraft:acacia_fence_gate facing=east;in_wall=false;open=true;powered=false minecraft:acacia_fence_gate facing=east;in_wall=false;open=true;powered=false minecraft:acacia_fence_gate facing=east;in_wall=true;open=true;powered=false +3000 minecraft:acacia_fence_gate facing=south;in_wall=false;open=false;powered=true minecraft:acacia_fence_gate facing=south;in_wall=false;open=false;powered=true minecraft:acacia_fence_gate facing=south;in_wall=true;open=false;powered=true +3001 minecraft:acacia_fence_gate facing=west;in_wall=false;open=false;powered=true minecraft:acacia_fence_gate facing=west;in_wall=false;open=false;powered=true minecraft:acacia_fence_gate facing=west;in_wall=true;open=false;powered=true +3002 minecraft:acacia_fence_gate facing=north;in_wall=false;open=false;powered=true minecraft:acacia_fence_gate facing=north;in_wall=false;open=false;powered=true minecraft:acacia_fence_gate facing=north;in_wall=true;open=false;powered=true +3003 minecraft:acacia_fence_gate facing=east;in_wall=false;open=false;powered=true minecraft:acacia_fence_gate facing=east;in_wall=false;open=false;powered=true minecraft:acacia_fence_gate facing=east;in_wall=true;open=false;powered=true +3004 minecraft:acacia_fence_gate facing=south;in_wall=false;open=true;powered=true minecraft:acacia_fence_gate facing=south;in_wall=false;open=true;powered=true minecraft:acacia_fence_gate facing=south;in_wall=true;open=true;powered=true +3005 minecraft:acacia_fence_gate facing=west;in_wall=false;open=true;powered=true minecraft:acacia_fence_gate facing=west;in_wall=false;open=true;powered=true minecraft:acacia_fence_gate facing=west;in_wall=true;open=true;powered=true +3006 minecraft:acacia_fence_gate facing=north;in_wall=false;open=true;powered=true minecraft:acacia_fence_gate facing=north;in_wall=false;open=true;powered=true minecraft:acacia_fence_gate facing=north;in_wall=true;open=true;powered=true +3007 minecraft:acacia_fence_gate facing=east;in_wall=false;open=true;powered=true minecraft:acacia_fence_gate facing=east;in_wall=false;open=true;powered=true minecraft:acacia_fence_gate facing=east;in_wall=true;open=true;powered=true +3008 minecraft:spruce_fence east=false;north=false;south=false;west=false minecraft:spruce_fence east=false;north=false;south=false;west=false minecraft:spruce_fence east=false;north=false;south=false;west=true minecraft:spruce_fence east=false;north=false;south=true;west=false minecraft:spruce_fence east=false;north=false;south=true;west=true minecraft:spruce_fence east=false;north=true;south=false;west=false minecraft:spruce_fence east=false;north=true;south=false;west=true minecraft:spruce_fence east=false;north=true;south=true;west=false minecraft:spruce_fence east=false;north=true;south=true;west=true minecraft:spruce_fence east=true;north=false;south=false;west=false minecraft:spruce_fence east=true;north=false;south=false;west=true minecraft:spruce_fence east=true;north=false;south=true;west=false minecraft:spruce_fence east=true;north=false;south=true;west=true minecraft:spruce_fence east=true;north=true;south=false;west=false minecraft:spruce_fence east=true;north=true;south=false;west=true minecraft:spruce_fence east=true;north=true;south=true;west=false minecraft:spruce_fence east=true;north=true;south=true;west=true +3024 minecraft:birch_fence east=false;north=false;south=false;west=false minecraft:birch_fence east=false;north=false;south=false;west=false minecraft:birch_fence east=false;north=false;south=false;west=true minecraft:birch_fence east=false;north=false;south=true;west=false minecraft:birch_fence east=false;north=false;south=true;west=true minecraft:birch_fence east=false;north=true;south=false;west=false minecraft:birch_fence east=false;north=true;south=false;west=true minecraft:birch_fence east=false;north=true;south=true;west=false minecraft:birch_fence east=false;north=true;south=true;west=true minecraft:birch_fence east=true;north=false;south=false;west=false minecraft:birch_fence east=true;north=false;south=false;west=true minecraft:birch_fence east=true;north=false;south=true;west=false minecraft:birch_fence east=true;north=false;south=true;west=true minecraft:birch_fence east=true;north=true;south=false;west=false minecraft:birch_fence east=true;north=true;south=false;west=true minecraft:birch_fence east=true;north=true;south=true;west=false minecraft:birch_fence east=true;north=true;south=true;west=true +3040 minecraft:jungle_fence east=false;north=false;south=false;west=false minecraft:jungle_fence east=false;north=false;south=false;west=false minecraft:jungle_fence east=false;north=false;south=false;west=true minecraft:jungle_fence east=false;north=false;south=true;west=false minecraft:jungle_fence east=false;north=false;south=true;west=true minecraft:jungle_fence east=false;north=true;south=false;west=false minecraft:jungle_fence east=false;north=true;south=false;west=true minecraft:jungle_fence east=false;north=true;south=true;west=false minecraft:jungle_fence east=false;north=true;south=true;west=true minecraft:jungle_fence east=true;north=false;south=false;west=false minecraft:jungle_fence east=true;north=false;south=false;west=true minecraft:jungle_fence east=true;north=false;south=true;west=false minecraft:jungle_fence east=true;north=false;south=true;west=true minecraft:jungle_fence east=true;north=true;south=false;west=false minecraft:jungle_fence east=true;north=true;south=false;west=true minecraft:jungle_fence east=true;north=true;south=true;west=false minecraft:jungle_fence east=true;north=true;south=true;west=true +3056 minecraft:dark_oak_fence east=false;north=false;south=false;west=false minecraft:dark_oak_fence east=false;north=false;south=false;west=false minecraft:dark_oak_fence east=false;north=false;south=false;west=true minecraft:dark_oak_fence east=false;north=false;south=true;west=false minecraft:dark_oak_fence east=false;north=false;south=true;west=true minecraft:dark_oak_fence east=false;north=true;south=false;west=false minecraft:dark_oak_fence east=false;north=true;south=false;west=true minecraft:dark_oak_fence east=false;north=true;south=true;west=false minecraft:dark_oak_fence east=false;north=true;south=true;west=true minecraft:dark_oak_fence east=true;north=false;south=false;west=false minecraft:dark_oak_fence east=true;north=false;south=false;west=true minecraft:dark_oak_fence east=true;north=false;south=true;west=false minecraft:dark_oak_fence east=true;north=false;south=true;west=true minecraft:dark_oak_fence east=true;north=true;south=false;west=false minecraft:dark_oak_fence east=true;north=true;south=false;west=true minecraft:dark_oak_fence east=true;north=true;south=true;west=false minecraft:dark_oak_fence east=true;north=true;south=true;west=true +3072 minecraft:acacia_fence east=false;north=false;south=false;west=false minecraft:acacia_fence east=false;north=false;south=false;west=false minecraft:acacia_fence east=false;north=false;south=false;west=true minecraft:acacia_fence east=false;north=false;south=true;west=false minecraft:acacia_fence east=false;north=false;south=true;west=true minecraft:acacia_fence east=false;north=true;south=false;west=false minecraft:acacia_fence east=false;north=true;south=false;west=true minecraft:acacia_fence east=false;north=true;south=true;west=false minecraft:acacia_fence east=false;north=true;south=true;west=true minecraft:acacia_fence east=true;north=false;south=false;west=false minecraft:acacia_fence east=true;north=false;south=false;west=true minecraft:acacia_fence east=true;north=false;south=true;west=false minecraft:acacia_fence east=true;north=false;south=true;west=true minecraft:acacia_fence east=true;north=true;south=false;west=false minecraft:acacia_fence east=true;north=true;south=false;west=true minecraft:acacia_fence east=true;north=true;south=true;west=false minecraft:acacia_fence east=true;north=true;south=true;west=true +3088 minecraft:spruce_door facing=east;half=lower;hinge=right;open=false;powered=false minecraft:spruce_door facing=east;half=lower;hinge=left;open=false;powered=false minecraft:spruce_door facing=east;half=lower;hinge=left;open=false;powered=true minecraft:spruce_door facing=east;half=lower;hinge=right;open=false;powered=false minecraft:spruce_door facing=east;half=lower;hinge=right;open=false;powered=true +3089 minecraft:spruce_door facing=south;half=lower;hinge=right;open=false;powered=false minecraft:spruce_door facing=south;half=lower;hinge=left;open=false;powered=false minecraft:spruce_door facing=south;half=lower;hinge=left;open=false;powered=true minecraft:spruce_door facing=south;half=lower;hinge=right;open=false;powered=false minecraft:spruce_door facing=south;half=lower;hinge=right;open=false;powered=true +3090 minecraft:spruce_door facing=west;half=lower;hinge=right;open=false;powered=false minecraft:spruce_door facing=west;half=lower;hinge=left;open=false;powered=false minecraft:spruce_door facing=west;half=lower;hinge=left;open=false;powered=true minecraft:spruce_door facing=west;half=lower;hinge=right;open=false;powered=false minecraft:spruce_door facing=west;half=lower;hinge=right;open=false;powered=true +3091 minecraft:spruce_door facing=north;half=lower;hinge=right;open=false;powered=false minecraft:spruce_door facing=north;half=lower;hinge=left;open=false;powered=false minecraft:spruce_door facing=north;half=lower;hinge=left;open=false;powered=true minecraft:spruce_door facing=north;half=lower;hinge=right;open=false;powered=false minecraft:spruce_door facing=north;half=lower;hinge=right;open=false;powered=true +3092 minecraft:spruce_door facing=east;half=lower;hinge=right;open=true;powered=false minecraft:spruce_door facing=east;half=lower;hinge=left;open=true;powered=false minecraft:spruce_door facing=east;half=lower;hinge=left;open=true;powered=true minecraft:spruce_door facing=east;half=lower;hinge=right;open=true;powered=false minecraft:spruce_door facing=east;half=lower;hinge=right;open=true;powered=true +3093 minecraft:spruce_door facing=south;half=lower;hinge=right;open=true;powered=false minecraft:spruce_door facing=south;half=lower;hinge=left;open=true;powered=false minecraft:spruce_door facing=south;half=lower;hinge=left;open=true;powered=true minecraft:spruce_door facing=south;half=lower;hinge=right;open=true;powered=false minecraft:spruce_door facing=south;half=lower;hinge=right;open=true;powered=true +3094 minecraft:spruce_door facing=west;half=lower;hinge=right;open=true;powered=false minecraft:spruce_door facing=west;half=lower;hinge=left;open=true;powered=false minecraft:spruce_door facing=west;half=lower;hinge=left;open=true;powered=true minecraft:spruce_door facing=west;half=lower;hinge=right;open=true;powered=false minecraft:spruce_door facing=west;half=lower;hinge=right;open=true;powered=true +3095 minecraft:spruce_door facing=north;half=lower;hinge=right;open=true;powered=false minecraft:spruce_door facing=north;half=lower;hinge=left;open=true;powered=false minecraft:spruce_door facing=north;half=lower;hinge=left;open=true;powered=true minecraft:spruce_door facing=north;half=lower;hinge=right;open=true;powered=false minecraft:spruce_door facing=north;half=lower;hinge=right;open=true;powered=true +3096 minecraft:spruce_door facing=east;half=upper;hinge=left;open=false;powered=false minecraft:spruce_door facing=east;half=upper;hinge=left;open=false;powered=false minecraft:spruce_door facing=east;half=upper;hinge=left;open=true;powered=false minecraft:spruce_door facing=north;half=upper;hinge=left;open=false;powered=false minecraft:spruce_door facing=north;half=upper;hinge=left;open=true;powered=false minecraft:spruce_door facing=south;half=upper;hinge=left;open=false;powered=false minecraft:spruce_door facing=south;half=upper;hinge=left;open=true;powered=false minecraft:spruce_door facing=west;half=upper;hinge=left;open=false;powered=false minecraft:spruce_door facing=west;half=upper;hinge=left;open=true;powered=false +3097 minecraft:spruce_door facing=east;half=upper;hinge=right;open=false;powered=false minecraft:spruce_door facing=east;half=upper;hinge=right;open=false;powered=false minecraft:spruce_door facing=east;half=upper;hinge=right;open=true;powered=false minecraft:spruce_door facing=north;half=upper;hinge=right;open=false;powered=false minecraft:spruce_door facing=north;half=upper;hinge=right;open=true;powered=false minecraft:spruce_door facing=south;half=upper;hinge=right;open=false;powered=false minecraft:spruce_door facing=south;half=upper;hinge=right;open=true;powered=false minecraft:spruce_door facing=west;half=upper;hinge=right;open=false;powered=false minecraft:spruce_door facing=west;half=upper;hinge=right;open=true;powered=false +3098 minecraft:spruce_door facing=east;half=upper;hinge=left;open=false;powered=true minecraft:spruce_door facing=east;half=upper;hinge=left;open=false;powered=true minecraft:spruce_door facing=east;half=upper;hinge=left;open=true;powered=true minecraft:spruce_door facing=north;half=upper;hinge=left;open=false;powered=true minecraft:spruce_door facing=north;half=upper;hinge=left;open=true;powered=true minecraft:spruce_door facing=south;half=upper;hinge=left;open=false;powered=true minecraft:spruce_door facing=south;half=upper;hinge=left;open=true;powered=true minecraft:spruce_door facing=west;half=upper;hinge=left;open=false;powered=true minecraft:spruce_door facing=west;half=upper;hinge=left;open=true;powered=true +3099 minecraft:spruce_door facing=east;half=upper;hinge=right;open=false;powered=true minecraft:spruce_door facing=east;half=upper;hinge=right;open=false;powered=true minecraft:spruce_door facing=east;half=upper;hinge=right;open=true;powered=true minecraft:spruce_door facing=north;half=upper;hinge=right;open=false;powered=true minecraft:spruce_door facing=north;half=upper;hinge=right;open=true;powered=true minecraft:spruce_door facing=south;half=upper;hinge=right;open=false;powered=true minecraft:spruce_door facing=south;half=upper;hinge=right;open=true;powered=true minecraft:spruce_door facing=west;half=upper;hinge=right;open=false;powered=true minecraft:spruce_door facing=west;half=upper;hinge=right;open=true;powered=true +3104 minecraft:birch_door facing=east;half=lower;hinge=right;open=false;powered=false minecraft:birch_door facing=east;half=lower;hinge=left;open=false;powered=false minecraft:birch_door facing=east;half=lower;hinge=left;open=false;powered=true minecraft:birch_door facing=east;half=lower;hinge=right;open=false;powered=false minecraft:birch_door facing=east;half=lower;hinge=right;open=false;powered=true +3105 minecraft:birch_door facing=south;half=lower;hinge=right;open=false;powered=false minecraft:birch_door facing=south;half=lower;hinge=left;open=false;powered=false minecraft:birch_door facing=south;half=lower;hinge=left;open=false;powered=true minecraft:birch_door facing=south;half=lower;hinge=right;open=false;powered=false minecraft:birch_door facing=south;half=lower;hinge=right;open=false;powered=true +3106 minecraft:birch_door facing=west;half=lower;hinge=right;open=false;powered=false minecraft:birch_door facing=west;half=lower;hinge=left;open=false;powered=false minecraft:birch_door facing=west;half=lower;hinge=left;open=false;powered=true minecraft:birch_door facing=west;half=lower;hinge=right;open=false;powered=false minecraft:birch_door facing=west;half=lower;hinge=right;open=false;powered=true +3107 minecraft:birch_door facing=north;half=lower;hinge=right;open=false;powered=false minecraft:birch_door facing=north;half=lower;hinge=left;open=false;powered=false minecraft:birch_door facing=north;half=lower;hinge=left;open=false;powered=true minecraft:birch_door facing=north;half=lower;hinge=right;open=false;powered=false minecraft:birch_door facing=north;half=lower;hinge=right;open=false;powered=true +3108 minecraft:birch_door facing=east;half=lower;hinge=right;open=true;powered=false minecraft:birch_door facing=east;half=lower;hinge=left;open=true;powered=false minecraft:birch_door facing=east;half=lower;hinge=left;open=true;powered=true minecraft:birch_door facing=east;half=lower;hinge=right;open=true;powered=false minecraft:birch_door facing=east;half=lower;hinge=right;open=true;powered=true +3109 minecraft:birch_door facing=south;half=lower;hinge=right;open=true;powered=false minecraft:birch_door facing=south;half=lower;hinge=left;open=true;powered=false minecraft:birch_door facing=south;half=lower;hinge=left;open=true;powered=true minecraft:birch_door facing=south;half=lower;hinge=right;open=true;powered=false minecraft:birch_door facing=south;half=lower;hinge=right;open=true;powered=true +3110 minecraft:birch_door facing=west;half=lower;hinge=right;open=true;powered=false minecraft:birch_door facing=west;half=lower;hinge=left;open=true;powered=false minecraft:birch_door facing=west;half=lower;hinge=left;open=true;powered=true minecraft:birch_door facing=west;half=lower;hinge=right;open=true;powered=false minecraft:birch_door facing=west;half=lower;hinge=right;open=true;powered=true +3111 minecraft:birch_door facing=north;half=lower;hinge=right;open=true;powered=false minecraft:birch_door facing=north;half=lower;hinge=left;open=true;powered=false minecraft:birch_door facing=north;half=lower;hinge=left;open=true;powered=true minecraft:birch_door facing=north;half=lower;hinge=right;open=true;powered=false minecraft:birch_door facing=north;half=lower;hinge=right;open=true;powered=true +3112 minecraft:birch_door facing=east;half=upper;hinge=left;open=false;powered=false minecraft:birch_door facing=east;half=upper;hinge=left;open=false;powered=false minecraft:birch_door facing=east;half=upper;hinge=left;open=true;powered=false minecraft:birch_door facing=north;half=upper;hinge=left;open=false;powered=false minecraft:birch_door facing=north;half=upper;hinge=left;open=true;powered=false minecraft:birch_door facing=south;half=upper;hinge=left;open=false;powered=false minecraft:birch_door facing=south;half=upper;hinge=left;open=true;powered=false minecraft:birch_door facing=west;half=upper;hinge=left;open=false;powered=false minecraft:birch_door facing=west;half=upper;hinge=left;open=true;powered=false +3113 minecraft:birch_door facing=east;half=upper;hinge=right;open=false;powered=false minecraft:birch_door facing=east;half=upper;hinge=right;open=false;powered=false minecraft:birch_door facing=east;half=upper;hinge=right;open=true;powered=false minecraft:birch_door facing=north;half=upper;hinge=right;open=false;powered=false minecraft:birch_door facing=north;half=upper;hinge=right;open=true;powered=false minecraft:birch_door facing=south;half=upper;hinge=right;open=false;powered=false minecraft:birch_door facing=south;half=upper;hinge=right;open=true;powered=false minecraft:birch_door facing=west;half=upper;hinge=right;open=false;powered=false minecraft:birch_door facing=west;half=upper;hinge=right;open=true;powered=false +3114 minecraft:birch_door facing=east;half=upper;hinge=left;open=false;powered=true minecraft:birch_door facing=east;half=upper;hinge=left;open=false;powered=true minecraft:birch_door facing=east;half=upper;hinge=left;open=true;powered=true minecraft:birch_door facing=north;half=upper;hinge=left;open=false;powered=true minecraft:birch_door facing=north;half=upper;hinge=left;open=true;powered=true minecraft:birch_door facing=south;half=upper;hinge=left;open=false;powered=true minecraft:birch_door facing=south;half=upper;hinge=left;open=true;powered=true minecraft:birch_door facing=west;half=upper;hinge=left;open=false;powered=true minecraft:birch_door facing=west;half=upper;hinge=left;open=true;powered=true +3115 minecraft:birch_door facing=east;half=upper;hinge=right;open=false;powered=true minecraft:birch_door facing=east;half=upper;hinge=right;open=false;powered=true minecraft:birch_door facing=east;half=upper;hinge=right;open=true;powered=true minecraft:birch_door facing=north;half=upper;hinge=right;open=false;powered=true minecraft:birch_door facing=north;half=upper;hinge=right;open=true;powered=true minecraft:birch_door facing=south;half=upper;hinge=right;open=false;powered=true minecraft:birch_door facing=south;half=upper;hinge=right;open=true;powered=true minecraft:birch_door facing=west;half=upper;hinge=right;open=false;powered=true minecraft:birch_door facing=west;half=upper;hinge=right;open=true;powered=true +3120 minecraft:jungle_door facing=east;half=lower;hinge=right;open=false;powered=false minecraft:jungle_door facing=east;half=lower;hinge=left;open=false;powered=false minecraft:jungle_door facing=east;half=lower;hinge=left;open=false;powered=true minecraft:jungle_door facing=east;half=lower;hinge=right;open=false;powered=false minecraft:jungle_door facing=east;half=lower;hinge=right;open=false;powered=true +3121 minecraft:jungle_door facing=south;half=lower;hinge=right;open=false;powered=false minecraft:jungle_door facing=south;half=lower;hinge=left;open=false;powered=false minecraft:jungle_door facing=south;half=lower;hinge=left;open=false;powered=true minecraft:jungle_door facing=south;half=lower;hinge=right;open=false;powered=false minecraft:jungle_door facing=south;half=lower;hinge=right;open=false;powered=true +3122 minecraft:jungle_door facing=west;half=lower;hinge=right;open=false;powered=false minecraft:jungle_door facing=west;half=lower;hinge=left;open=false;powered=false minecraft:jungle_door facing=west;half=lower;hinge=left;open=false;powered=true minecraft:jungle_door facing=west;half=lower;hinge=right;open=false;powered=false minecraft:jungle_door facing=west;half=lower;hinge=right;open=false;powered=true +3123 minecraft:jungle_door facing=north;half=lower;hinge=right;open=false;powered=false minecraft:jungle_door facing=north;half=lower;hinge=left;open=false;powered=false minecraft:jungle_door facing=north;half=lower;hinge=left;open=false;powered=true minecraft:jungle_door facing=north;half=lower;hinge=right;open=false;powered=false minecraft:jungle_door facing=north;half=lower;hinge=right;open=false;powered=true +3124 minecraft:jungle_door facing=east;half=lower;hinge=right;open=true;powered=false minecraft:jungle_door facing=east;half=lower;hinge=left;open=true;powered=false minecraft:jungle_door facing=east;half=lower;hinge=left;open=true;powered=true minecraft:jungle_door facing=east;half=lower;hinge=right;open=true;powered=false minecraft:jungle_door facing=east;half=lower;hinge=right;open=true;powered=true +3125 minecraft:jungle_door facing=south;half=lower;hinge=right;open=true;powered=false minecraft:jungle_door facing=south;half=lower;hinge=left;open=true;powered=false minecraft:jungle_door facing=south;half=lower;hinge=left;open=true;powered=true minecraft:jungle_door facing=south;half=lower;hinge=right;open=true;powered=false minecraft:jungle_door facing=south;half=lower;hinge=right;open=true;powered=true +3126 minecraft:jungle_door facing=west;half=lower;hinge=right;open=true;powered=false minecraft:jungle_door facing=west;half=lower;hinge=left;open=true;powered=false minecraft:jungle_door facing=west;half=lower;hinge=left;open=true;powered=true minecraft:jungle_door facing=west;half=lower;hinge=right;open=true;powered=false minecraft:jungle_door facing=west;half=lower;hinge=right;open=true;powered=true +3127 minecraft:jungle_door facing=north;half=lower;hinge=right;open=true;powered=false minecraft:jungle_door facing=north;half=lower;hinge=left;open=true;powered=false minecraft:jungle_door facing=north;half=lower;hinge=left;open=true;powered=true minecraft:jungle_door facing=north;half=lower;hinge=right;open=true;powered=false minecraft:jungle_door facing=north;half=lower;hinge=right;open=true;powered=true +3128 minecraft:jungle_door facing=east;half=upper;hinge=left;open=false;powered=false minecraft:jungle_door facing=east;half=upper;hinge=left;open=false;powered=false minecraft:jungle_door facing=east;half=upper;hinge=left;open=true;powered=false minecraft:jungle_door facing=north;half=upper;hinge=left;open=false;powered=false minecraft:jungle_door facing=north;half=upper;hinge=left;open=true;powered=false minecraft:jungle_door facing=south;half=upper;hinge=left;open=false;powered=false minecraft:jungle_door facing=south;half=upper;hinge=left;open=true;powered=false minecraft:jungle_door facing=west;half=upper;hinge=left;open=false;powered=false minecraft:jungle_door facing=west;half=upper;hinge=left;open=true;powered=false +3129 minecraft:jungle_door facing=east;half=upper;hinge=right;open=false;powered=false minecraft:jungle_door facing=east;half=upper;hinge=right;open=false;powered=false minecraft:jungle_door facing=east;half=upper;hinge=right;open=true;powered=false minecraft:jungle_door facing=north;half=upper;hinge=right;open=false;powered=false minecraft:jungle_door facing=north;half=upper;hinge=right;open=true;powered=false minecraft:jungle_door facing=south;half=upper;hinge=right;open=false;powered=false minecraft:jungle_door facing=south;half=upper;hinge=right;open=true;powered=false minecraft:jungle_door facing=west;half=upper;hinge=right;open=false;powered=false minecraft:jungle_door facing=west;half=upper;hinge=right;open=true;powered=false +3130 minecraft:jungle_door facing=east;half=upper;hinge=left;open=false;powered=true minecraft:jungle_door facing=east;half=upper;hinge=left;open=false;powered=true minecraft:jungle_door facing=east;half=upper;hinge=left;open=true;powered=true minecraft:jungle_door facing=north;half=upper;hinge=left;open=false;powered=true minecraft:jungle_door facing=north;half=upper;hinge=left;open=true;powered=true minecraft:jungle_door facing=south;half=upper;hinge=left;open=false;powered=true minecraft:jungle_door facing=south;half=upper;hinge=left;open=true;powered=true minecraft:jungle_door facing=west;half=upper;hinge=left;open=false;powered=true minecraft:jungle_door facing=west;half=upper;hinge=left;open=true;powered=true +3131 minecraft:jungle_door facing=east;half=upper;hinge=right;open=false;powered=true minecraft:jungle_door facing=east;half=upper;hinge=right;open=false;powered=true minecraft:jungle_door facing=east;half=upper;hinge=right;open=true;powered=true minecraft:jungle_door facing=north;half=upper;hinge=right;open=false;powered=true minecraft:jungle_door facing=north;half=upper;hinge=right;open=true;powered=true minecraft:jungle_door facing=south;half=upper;hinge=right;open=false;powered=true minecraft:jungle_door facing=south;half=upper;hinge=right;open=true;powered=true minecraft:jungle_door facing=west;half=upper;hinge=right;open=false;powered=true minecraft:jungle_door facing=west;half=upper;hinge=right;open=true;powered=true +3136 minecraft:acacia_door facing=east;half=lower;hinge=right;open=false;powered=false minecraft:acacia_door facing=east;half=lower;hinge=left;open=false;powered=false minecraft:acacia_door facing=east;half=lower;hinge=left;open=false;powered=true minecraft:acacia_door facing=east;half=lower;hinge=right;open=false;powered=false minecraft:acacia_door facing=east;half=lower;hinge=right;open=false;powered=true +3137 minecraft:acacia_door facing=south;half=lower;hinge=right;open=false;powered=false minecraft:acacia_door facing=south;half=lower;hinge=left;open=false;powered=false minecraft:acacia_door facing=south;half=lower;hinge=left;open=false;powered=true minecraft:acacia_door facing=south;half=lower;hinge=right;open=false;powered=false minecraft:acacia_door facing=south;half=lower;hinge=right;open=false;powered=true +3138 minecraft:acacia_door facing=west;half=lower;hinge=right;open=false;powered=false minecraft:acacia_door facing=west;half=lower;hinge=left;open=false;powered=false minecraft:acacia_door facing=west;half=lower;hinge=left;open=false;powered=true minecraft:acacia_door facing=west;half=lower;hinge=right;open=false;powered=false minecraft:acacia_door facing=west;half=lower;hinge=right;open=false;powered=true +3139 minecraft:acacia_door facing=north;half=lower;hinge=right;open=false;powered=false minecraft:acacia_door facing=north;half=lower;hinge=left;open=false;powered=false minecraft:acacia_door facing=north;half=lower;hinge=left;open=false;powered=true minecraft:acacia_door facing=north;half=lower;hinge=right;open=false;powered=false minecraft:acacia_door facing=north;half=lower;hinge=right;open=false;powered=true +3140 minecraft:acacia_door facing=east;half=lower;hinge=right;open=true;powered=false minecraft:acacia_door facing=east;half=lower;hinge=left;open=true;powered=false minecraft:acacia_door facing=east;half=lower;hinge=left;open=true;powered=true minecraft:acacia_door facing=east;half=lower;hinge=right;open=true;powered=false minecraft:acacia_door facing=east;half=lower;hinge=right;open=true;powered=true +3141 minecraft:acacia_door facing=south;half=lower;hinge=right;open=true;powered=false minecraft:acacia_door facing=south;half=lower;hinge=left;open=true;powered=false minecraft:acacia_door facing=south;half=lower;hinge=left;open=true;powered=true minecraft:acacia_door facing=south;half=lower;hinge=right;open=true;powered=false minecraft:acacia_door facing=south;half=lower;hinge=right;open=true;powered=true +3142 minecraft:acacia_door facing=west;half=lower;hinge=right;open=true;powered=false minecraft:acacia_door facing=west;half=lower;hinge=left;open=true;powered=false minecraft:acacia_door facing=west;half=lower;hinge=left;open=true;powered=true minecraft:acacia_door facing=west;half=lower;hinge=right;open=true;powered=false minecraft:acacia_door facing=west;half=lower;hinge=right;open=true;powered=true +3143 minecraft:acacia_door facing=north;half=lower;hinge=right;open=true;powered=false minecraft:acacia_door facing=north;half=lower;hinge=left;open=true;powered=false minecraft:acacia_door facing=north;half=lower;hinge=left;open=true;powered=true minecraft:acacia_door facing=north;half=lower;hinge=right;open=true;powered=false minecraft:acacia_door facing=north;half=lower;hinge=right;open=true;powered=true +3144 minecraft:acacia_door facing=east;half=upper;hinge=left;open=false;powered=false minecraft:acacia_door facing=east;half=upper;hinge=left;open=false;powered=false minecraft:acacia_door facing=east;half=upper;hinge=left;open=true;powered=false minecraft:acacia_door facing=north;half=upper;hinge=left;open=false;powered=false minecraft:acacia_door facing=north;half=upper;hinge=left;open=true;powered=false minecraft:acacia_door facing=south;half=upper;hinge=left;open=false;powered=false minecraft:acacia_door facing=south;half=upper;hinge=left;open=true;powered=false minecraft:acacia_door facing=west;half=upper;hinge=left;open=false;powered=false minecraft:acacia_door facing=west;half=upper;hinge=left;open=true;powered=false +3145 minecraft:acacia_door facing=east;half=upper;hinge=right;open=false;powered=false minecraft:acacia_door facing=east;half=upper;hinge=right;open=false;powered=false minecraft:acacia_door facing=east;half=upper;hinge=right;open=true;powered=false minecraft:acacia_door facing=north;half=upper;hinge=right;open=false;powered=false minecraft:acacia_door facing=north;half=upper;hinge=right;open=true;powered=false minecraft:acacia_door facing=south;half=upper;hinge=right;open=false;powered=false minecraft:acacia_door facing=south;half=upper;hinge=right;open=true;powered=false minecraft:acacia_door facing=west;half=upper;hinge=right;open=false;powered=false minecraft:acacia_door facing=west;half=upper;hinge=right;open=true;powered=false +3146 minecraft:acacia_door facing=east;half=upper;hinge=left;open=false;powered=true minecraft:acacia_door facing=east;half=upper;hinge=left;open=false;powered=true minecraft:acacia_door facing=east;half=upper;hinge=left;open=true;powered=true minecraft:acacia_door facing=north;half=upper;hinge=left;open=false;powered=true minecraft:acacia_door facing=north;half=upper;hinge=left;open=true;powered=true minecraft:acacia_door facing=south;half=upper;hinge=left;open=false;powered=true minecraft:acacia_door facing=south;half=upper;hinge=left;open=true;powered=true minecraft:acacia_door facing=west;half=upper;hinge=left;open=false;powered=true minecraft:acacia_door facing=west;half=upper;hinge=left;open=true;powered=true +3147 minecraft:acacia_door facing=east;half=upper;hinge=right;open=false;powered=true minecraft:acacia_door facing=east;half=upper;hinge=right;open=false;powered=true minecraft:acacia_door facing=east;half=upper;hinge=right;open=true;powered=true minecraft:acacia_door facing=north;half=upper;hinge=right;open=false;powered=true minecraft:acacia_door facing=north;half=upper;hinge=right;open=true;powered=true minecraft:acacia_door facing=south;half=upper;hinge=right;open=false;powered=true minecraft:acacia_door facing=south;half=upper;hinge=right;open=true;powered=true minecraft:acacia_door facing=west;half=upper;hinge=right;open=false;powered=true minecraft:acacia_door facing=west;half=upper;hinge=right;open=true;powered=true +3152 minecraft:dark_oak_door facing=east;half=lower;hinge=right;open=false;powered=false minecraft:dark_oak_door facing=east;half=lower;hinge=left;open=false;powered=false minecraft:dark_oak_door facing=east;half=lower;hinge=left;open=false;powered=true minecraft:dark_oak_door facing=east;half=lower;hinge=right;open=false;powered=false minecraft:dark_oak_door facing=east;half=lower;hinge=right;open=false;powered=true +3153 minecraft:dark_oak_door facing=south;half=lower;hinge=right;open=false;powered=false minecraft:dark_oak_door facing=south;half=lower;hinge=left;open=false;powered=false minecraft:dark_oak_door facing=south;half=lower;hinge=left;open=false;powered=true minecraft:dark_oak_door facing=south;half=lower;hinge=right;open=false;powered=false minecraft:dark_oak_door facing=south;half=lower;hinge=right;open=false;powered=true +3154 minecraft:dark_oak_door facing=west;half=lower;hinge=right;open=false;powered=false minecraft:dark_oak_door facing=west;half=lower;hinge=left;open=false;powered=false minecraft:dark_oak_door facing=west;half=lower;hinge=left;open=false;powered=true minecraft:dark_oak_door facing=west;half=lower;hinge=right;open=false;powered=false minecraft:dark_oak_door facing=west;half=lower;hinge=right;open=false;powered=true +3155 minecraft:dark_oak_door facing=north;half=lower;hinge=right;open=false;powered=false minecraft:dark_oak_door facing=north;half=lower;hinge=left;open=false;powered=false minecraft:dark_oak_door facing=north;half=lower;hinge=left;open=false;powered=true minecraft:dark_oak_door facing=north;half=lower;hinge=right;open=false;powered=false minecraft:dark_oak_door facing=north;half=lower;hinge=right;open=false;powered=true +3156 minecraft:dark_oak_door facing=east;half=lower;hinge=right;open=true;powered=false minecraft:dark_oak_door facing=east;half=lower;hinge=left;open=true;powered=false minecraft:dark_oak_door facing=east;half=lower;hinge=left;open=true;powered=true minecraft:dark_oak_door facing=east;half=lower;hinge=right;open=true;powered=false minecraft:dark_oak_door facing=east;half=lower;hinge=right;open=true;powered=true +3157 minecraft:dark_oak_door facing=south;half=lower;hinge=right;open=true;powered=false minecraft:dark_oak_door facing=south;half=lower;hinge=left;open=true;powered=false minecraft:dark_oak_door facing=south;half=lower;hinge=left;open=true;powered=true minecraft:dark_oak_door facing=south;half=lower;hinge=right;open=true;powered=false minecraft:dark_oak_door facing=south;half=lower;hinge=right;open=true;powered=true +3158 minecraft:dark_oak_door facing=west;half=lower;hinge=right;open=true;powered=false minecraft:dark_oak_door facing=west;half=lower;hinge=left;open=true;powered=false minecraft:dark_oak_door facing=west;half=lower;hinge=left;open=true;powered=true minecraft:dark_oak_door facing=west;half=lower;hinge=right;open=true;powered=false minecraft:dark_oak_door facing=west;half=lower;hinge=right;open=true;powered=true +3159 minecraft:dark_oak_door facing=north;half=lower;hinge=right;open=true;powered=false minecraft:dark_oak_door facing=north;half=lower;hinge=left;open=true;powered=false minecraft:dark_oak_door facing=north;half=lower;hinge=left;open=true;powered=true minecraft:dark_oak_door facing=north;half=lower;hinge=right;open=true;powered=false minecraft:dark_oak_door facing=north;half=lower;hinge=right;open=true;powered=true +3160 minecraft:dark_oak_door facing=east;half=upper;hinge=left;open=false;powered=false minecraft:dark_oak_door facing=east;half=upper;hinge=left;open=false;powered=false minecraft:dark_oak_door facing=east;half=upper;hinge=left;open=true;powered=false minecraft:dark_oak_door facing=north;half=upper;hinge=left;open=false;powered=false minecraft:dark_oak_door facing=north;half=upper;hinge=left;open=true;powered=false minecraft:dark_oak_door facing=south;half=upper;hinge=left;open=false;powered=false minecraft:dark_oak_door facing=south;half=upper;hinge=left;open=true;powered=false minecraft:dark_oak_door facing=west;half=upper;hinge=left;open=false;powered=false minecraft:dark_oak_door facing=west;half=upper;hinge=left;open=true;powered=false +3161 minecraft:dark_oak_door facing=east;half=upper;hinge=right;open=false;powered=false minecraft:dark_oak_door facing=east;half=upper;hinge=right;open=false;powered=false minecraft:dark_oak_door facing=east;half=upper;hinge=right;open=true;powered=false minecraft:dark_oak_door facing=north;half=upper;hinge=right;open=false;powered=false minecraft:dark_oak_door facing=north;half=upper;hinge=right;open=true;powered=false minecraft:dark_oak_door facing=south;half=upper;hinge=right;open=false;powered=false minecraft:dark_oak_door facing=south;half=upper;hinge=right;open=true;powered=false minecraft:dark_oak_door facing=west;half=upper;hinge=right;open=false;powered=false minecraft:dark_oak_door facing=west;half=upper;hinge=right;open=true;powered=false +3162 minecraft:dark_oak_door facing=east;half=upper;hinge=left;open=false;powered=true minecraft:dark_oak_door facing=east;half=upper;hinge=left;open=false;powered=true minecraft:dark_oak_door facing=east;half=upper;hinge=left;open=true;powered=true minecraft:dark_oak_door facing=north;half=upper;hinge=left;open=false;powered=true minecraft:dark_oak_door facing=north;half=upper;hinge=left;open=true;powered=true minecraft:dark_oak_door facing=south;half=upper;hinge=left;open=false;powered=true minecraft:dark_oak_door facing=south;half=upper;hinge=left;open=true;powered=true minecraft:dark_oak_door facing=west;half=upper;hinge=left;open=false;powered=true minecraft:dark_oak_door facing=west;half=upper;hinge=left;open=true;powered=true +3163 minecraft:dark_oak_door facing=east;half=upper;hinge=right;open=false;powered=true minecraft:dark_oak_door facing=east;half=upper;hinge=right;open=false;powered=true minecraft:dark_oak_door facing=east;half=upper;hinge=right;open=true;powered=true minecraft:dark_oak_door facing=north;half=upper;hinge=right;open=false;powered=true minecraft:dark_oak_door facing=north;half=upper;hinge=right;open=true;powered=true minecraft:dark_oak_door facing=south;half=upper;hinge=right;open=false;powered=true minecraft:dark_oak_door facing=south;half=upper;hinge=right;open=true;powered=true minecraft:dark_oak_door facing=west;half=upper;hinge=right;open=false;powered=true minecraft:dark_oak_door facing=west;half=upper;hinge=right;open=true;powered=true +3168 minecraft:end_rod facing=down minecraft:end_rod facing=down +3169 minecraft:end_rod facing=up minecraft:end_rod facing=up +3170 minecraft:end_rod facing=north minecraft:end_rod facing=north +3171 minecraft:end_rod facing=south minecraft:end_rod facing=south +3172 minecraft:end_rod facing=west minecraft:end_rod facing=west +3173 minecraft:end_rod facing=east minecraft:end_rod facing=east +3184 minecraft:chorus_plant down=false;east=false;north=false;south=false;up=false;west=false minecraft:chorus_plant down=false;east=false;north=false;south=false;up=false;west=false minecraft:chorus_plant down=false;east=false;north=false;south=false;up=false;west=true minecraft:chorus_plant down=false;east=false;north=false;south=false;up=true;west=false minecraft:chorus_plant down=false;east=false;north=false;south=false;up=true;west=true minecraft:chorus_plant down=false;east=false;north=false;south=true;up=false;west=false minecraft:chorus_plant down=false;east=false;north=false;south=true;up=false;west=true minecraft:chorus_plant down=false;east=false;north=false;south=true;up=true;west=false minecraft:chorus_plant down=false;east=false;north=false;south=true;up=true;west=true minecraft:chorus_plant down=false;east=false;north=true;south=false;up=false;west=false minecraft:chorus_plant down=false;east=false;north=true;south=false;up=false;west=true minecraft:chorus_plant down=false;east=false;north=true;south=false;up=true;west=false minecraft:chorus_plant down=false;east=false;north=true;south=false;up=true;west=true minecraft:chorus_plant down=false;east=false;north=true;south=true;up=false;west=false minecraft:chorus_plant down=false;east=false;north=true;south=true;up=false;west=true minecraft:chorus_plant down=false;east=false;north=true;south=true;up=true;west=false minecraft:chorus_plant down=false;east=false;north=true;south=true;up=true;west=true minecraft:chorus_plant down=false;east=true;north=false;south=false;up=false;west=false minecraft:chorus_plant down=false;east=true;north=false;south=false;up=false;west=true minecraft:chorus_plant down=false;east=true;north=false;south=false;up=true;west=false minecraft:chorus_plant down=false;east=true;north=false;south=false;up=true;west=true minecraft:chorus_plant down=false;east=true;north=false;south=true;up=false;west=false minecraft:chorus_plant down=false;east=true;north=false;south=true;up=false;west=true minecraft:chorus_plant down=false;east=true;north=false;south=true;up=true;west=false minecraft:chorus_plant down=false;east=true;north=false;south=true;up=true;west=true minecraft:chorus_plant down=false;east=true;north=true;south=false;up=false;west=false minecraft:chorus_plant down=false;east=true;north=true;south=false;up=false;west=true minecraft:chorus_plant down=false;east=true;north=true;south=false;up=true;west=false minecraft:chorus_plant down=false;east=true;north=true;south=false;up=true;west=true minecraft:chorus_plant down=false;east=true;north=true;south=true;up=false;west=false minecraft:chorus_plant down=false;east=true;north=true;south=true;up=false;west=true minecraft:chorus_plant down=false;east=true;north=true;south=true;up=true;west=false minecraft:chorus_plant down=false;east=true;north=true;south=true;up=true;west=true minecraft:chorus_plant down=true;east=false;north=false;south=false;up=false;west=false minecraft:chorus_plant down=true;east=false;north=false;south=false;up=false;west=true minecraft:chorus_plant down=true;east=false;north=false;south=false;up=true;west=false minecraft:chorus_plant down=true;east=false;north=false;south=false;up=true;west=true minecraft:chorus_plant down=true;east=false;north=false;south=true;up=false;west=false minecraft:chorus_plant down=true;east=false;north=false;south=true;up=false;west=true minecraft:chorus_plant down=true;east=false;north=false;south=true;up=true;west=false minecraft:chorus_plant down=true;east=false;north=false;south=true;up=true;west=true minecraft:chorus_plant down=true;east=false;north=true;south=false;up=false;west=false minecraft:chorus_plant down=true;east=false;north=true;south=false;up=false;west=true minecraft:chorus_plant down=true;east=false;north=true;south=false;up=true;west=false minecraft:chorus_plant down=true;east=false;north=true;south=false;up=true;west=true minecraft:chorus_plant down=true;east=false;north=true;south=true;up=false;west=false minecraft:chorus_plant down=true;east=false;north=true;south=true;up=false;west=true minecraft:chorus_plant down=true;east=false;north=true;south=true;up=true;west=false minecraft:chorus_plant down=true;east=false;north=true;south=true;up=true;west=true minecraft:chorus_plant down=true;east=true;north=false;south=false;up=false;west=false minecraft:chorus_plant down=true;east=true;north=false;south=false;up=false;west=true minecraft:chorus_plant down=true;east=true;north=false;south=false;up=true;west=false minecraft:chorus_plant down=true;east=true;north=false;south=false;up=true;west=true minecraft:chorus_plant down=true;east=true;north=false;south=true;up=false;west=false minecraft:chorus_plant down=true;east=true;north=false;south=true;up=false;west=true minecraft:chorus_plant down=true;east=true;north=false;south=true;up=true;west=false minecraft:chorus_plant down=true;east=true;north=false;south=true;up=true;west=true minecraft:chorus_plant down=true;east=true;north=true;south=false;up=false;west=false minecraft:chorus_plant down=true;east=true;north=true;south=false;up=false;west=true minecraft:chorus_plant down=true;east=true;north=true;south=false;up=true;west=false minecraft:chorus_plant down=true;east=true;north=true;south=false;up=true;west=true minecraft:chorus_plant down=true;east=true;north=true;south=true;up=false;west=false minecraft:chorus_plant down=true;east=true;north=true;south=true;up=false;west=true minecraft:chorus_plant down=true;east=true;north=true;south=true;up=true;west=false minecraft:chorus_plant down=true;east=true;north=true;south=true;up=true;west=true +3200 minecraft:chorus_flower age=0 minecraft:chorus_flower age=0 +3201 minecraft:chorus_flower age=1 minecraft:chorus_flower age=1 +3202 minecraft:chorus_flower age=2 minecraft:chorus_flower age=2 +3203 minecraft:chorus_flower age=3 minecraft:chorus_flower age=3 +3204 minecraft:chorus_flower age=4 minecraft:chorus_flower age=4 +3205 minecraft:chorus_flower age=5 minecraft:chorus_flower age=5 +3216 minecraft:purpur_block minecraft:purpur_block +3232 minecraft:purpur_pillar axis=y minecraft:purpur_pillar axis=y +3236 minecraft:purpur_pillar axis=x minecraft:purpur_pillar axis=x +3240 minecraft:purpur_pillar axis=z minecraft:purpur_pillar axis=z +3248 minecraft:purpur_stairs facing=east;half=bottom;shape=straight minecraft:purpur_stairs facing=east;half=bottom;shape=inner_left minecraft:purpur_stairs facing=east;half=bottom;shape=inner_right minecraft:purpur_stairs facing=east;half=bottom;shape=outer_left minecraft:purpur_stairs facing=east;half=bottom;shape=outer_right minecraft:purpur_stairs facing=east;half=bottom;shape=straight +3249 minecraft:purpur_stairs facing=west;half=bottom;shape=straight minecraft:purpur_stairs facing=west;half=bottom;shape=inner_left minecraft:purpur_stairs facing=west;half=bottom;shape=inner_right minecraft:purpur_stairs facing=west;half=bottom;shape=outer_left minecraft:purpur_stairs facing=west;half=bottom;shape=outer_right minecraft:purpur_stairs facing=west;half=bottom;shape=straight +3250 minecraft:purpur_stairs facing=south;half=bottom;shape=straight minecraft:purpur_stairs facing=south;half=bottom;shape=inner_left minecraft:purpur_stairs facing=south;half=bottom;shape=inner_right minecraft:purpur_stairs facing=south;half=bottom;shape=outer_left minecraft:purpur_stairs facing=south;half=bottom;shape=outer_right minecraft:purpur_stairs facing=south;half=bottom;shape=straight +3251 minecraft:purpur_stairs facing=north;half=bottom;shape=straight minecraft:purpur_stairs facing=north;half=bottom;shape=inner_left minecraft:purpur_stairs facing=north;half=bottom;shape=inner_right minecraft:purpur_stairs facing=north;half=bottom;shape=outer_left minecraft:purpur_stairs facing=north;half=bottom;shape=outer_right minecraft:purpur_stairs facing=north;half=bottom;shape=straight +3252 minecraft:purpur_stairs facing=east;half=top;shape=straight minecraft:purpur_stairs facing=east;half=top;shape=inner_left minecraft:purpur_stairs facing=east;half=top;shape=inner_right minecraft:purpur_stairs facing=east;half=top;shape=outer_left minecraft:purpur_stairs facing=east;half=top;shape=outer_right minecraft:purpur_stairs facing=east;half=top;shape=straight +3253 minecraft:purpur_stairs facing=west;half=top;shape=straight minecraft:purpur_stairs facing=west;half=top;shape=inner_left minecraft:purpur_stairs facing=west;half=top;shape=inner_right minecraft:purpur_stairs facing=west;half=top;shape=outer_left minecraft:purpur_stairs facing=west;half=top;shape=outer_right minecraft:purpur_stairs facing=west;half=top;shape=straight +3254 minecraft:purpur_stairs facing=south;half=top;shape=straight minecraft:purpur_stairs facing=south;half=top;shape=inner_left minecraft:purpur_stairs facing=south;half=top;shape=inner_right minecraft:purpur_stairs facing=south;half=top;shape=outer_left minecraft:purpur_stairs facing=south;half=top;shape=outer_right minecraft:purpur_stairs facing=south;half=top;shape=straight +3255 minecraft:purpur_stairs facing=north;half=top;shape=straight minecraft:purpur_stairs facing=north;half=top;shape=inner_left minecraft:purpur_stairs facing=north;half=top;shape=inner_right minecraft:purpur_stairs facing=north;half=top;shape=outer_left minecraft:purpur_stairs facing=north;half=top;shape=outer_right minecraft:purpur_stairs facing=north;half=top;shape=straight +3264 minecraft:purpur_slab type=double minecraft:purpur_double_slab variant=default +3280 minecraft:purpur_slab type=bottom minecraft:purpur_slab half=bottom;variant=default +3288 minecraft:purpur_slab type=top minecraft:purpur_slab half=top;variant=default +3296 minecraft:end_stone_bricks minecraft:end_bricks +3312 minecraft:beetroots age=0 minecraft:beetroots age=0 +3313 minecraft:beetroots age=1 minecraft:beetroots age=1 +3314 minecraft:beetroots age=2 minecraft:beetroots age=2 +3315 minecraft:beetroots age=3 minecraft:beetroots age=3 +3328 minecraft:grass_path minecraft:grass_path +3344 minecraft:end_gateway minecraft:end_gateway +3360 minecraft:repeating_command_block conditional=false;facing=down minecraft:repeating_command_block conditional=false;facing=down +3361 minecraft:repeating_command_block conditional=false;facing=up minecraft:repeating_command_block conditional=false;facing=up +3362 minecraft:repeating_command_block conditional=false;facing=north minecraft:repeating_command_block conditional=false;facing=north +3363 minecraft:repeating_command_block conditional=false;facing=south minecraft:repeating_command_block conditional=false;facing=south +3364 minecraft:repeating_command_block conditional=false;facing=west minecraft:repeating_command_block conditional=false;facing=west +3365 minecraft:repeating_command_block conditional=false;facing=east minecraft:repeating_command_block conditional=false;facing=east +3368 minecraft:repeating_command_block conditional=true;facing=down minecraft:repeating_command_block conditional=true;facing=down +3369 minecraft:repeating_command_block conditional=true;facing=up minecraft:repeating_command_block conditional=true;facing=up +3370 minecraft:repeating_command_block conditional=true;facing=north minecraft:repeating_command_block conditional=true;facing=north +3371 minecraft:repeating_command_block conditional=true;facing=south minecraft:repeating_command_block conditional=true;facing=south +3372 minecraft:repeating_command_block conditional=true;facing=west minecraft:repeating_command_block conditional=true;facing=west +3373 minecraft:repeating_command_block conditional=true;facing=east minecraft:repeating_command_block conditional=true;facing=east +3376 minecraft:chain_command_block conditional=false;facing=down minecraft:chain_command_block conditional=false;facing=down +3377 minecraft:chain_command_block conditional=false;facing=up minecraft:chain_command_block conditional=false;facing=up +3378 minecraft:chain_command_block conditional=false;facing=north minecraft:chain_command_block conditional=false;facing=north +3379 minecraft:chain_command_block conditional=false;facing=south minecraft:chain_command_block conditional=false;facing=south +3380 minecraft:chain_command_block conditional=false;facing=west minecraft:chain_command_block conditional=false;facing=west +3381 minecraft:chain_command_block conditional=false;facing=east minecraft:chain_command_block conditional=false;facing=east +3384 minecraft:chain_command_block conditional=true;facing=down minecraft:chain_command_block conditional=true;facing=down +3385 minecraft:chain_command_block conditional=true;facing=up minecraft:chain_command_block conditional=true;facing=up +3386 minecraft:chain_command_block conditional=true;facing=north minecraft:chain_command_block conditional=true;facing=north +3387 minecraft:chain_command_block conditional=true;facing=south minecraft:chain_command_block conditional=true;facing=south +3388 minecraft:chain_command_block conditional=true;facing=west minecraft:chain_command_block conditional=true;facing=west +3389 minecraft:chain_command_block conditional=true;facing=east minecraft:chain_command_block conditional=true;facing=east +3392 minecraft:frosted_ice age=0 minecraft:frosted_ice age=0 +3393 minecraft:frosted_ice age=1 minecraft:frosted_ice age=1 +3394 minecraft:frosted_ice age=2 minecraft:frosted_ice age=2 +3395 minecraft:frosted_ice age=3 minecraft:frosted_ice age=3 +3408 minecraft:magma_block minecraft:magma +3424 minecraft:nether_wart_block minecraft:nether_wart_block +3440 minecraft:red_nether_bricks minecraft:red_nether_brick +3456 minecraft:bone_block axis=y minecraft:bone_block axis=y +3460 minecraft:bone_block axis=x minecraft:bone_block axis=x +3464 minecraft:bone_block axis=z minecraft:bone_block axis=z +3472 minecraft:structure_void minecraft:structure_void +3488 minecraft:observer facing=down;powered=false minecraft:observer facing=down;powered=false +3489 minecraft:observer facing=up;powered=false minecraft:observer facing=up;powered=false +3490 minecraft:observer facing=north;powered=false minecraft:observer facing=north;powered=false +3491 minecraft:observer facing=south;powered=false minecraft:observer facing=south;powered=false +3492 minecraft:observer facing=west;powered=false minecraft:observer facing=west;powered=false +3493 minecraft:observer facing=east;powered=false minecraft:observer facing=east;powered=false +3496 minecraft:observer facing=down;powered=true minecraft:observer facing=down;powered=true +3497 minecraft:observer facing=up;powered=true minecraft:observer facing=up;powered=true +3498 minecraft:observer facing=north;powered=true minecraft:observer facing=north;powered=true +3499 minecraft:observer facing=south;powered=true minecraft:observer facing=south;powered=true +3500 minecraft:observer facing=west;powered=true minecraft:observer facing=west;powered=true +3501 minecraft:observer facing=east;powered=true minecraft:observer facing=east;powered=true +3504 minecraft:white_shulker_box facing=down minecraft:white_shulker_box facing=down +3505 minecraft:white_shulker_box facing=up minecraft:white_shulker_box facing=up +3506 minecraft:white_shulker_box facing=north minecraft:white_shulker_box facing=north +3507 minecraft:white_shulker_box facing=south minecraft:white_shulker_box facing=south +3508 minecraft:white_shulker_box facing=west minecraft:white_shulker_box facing=west +3509 minecraft:white_shulker_box facing=east minecraft:white_shulker_box facing=east +3520 minecraft:orange_shulker_box facing=down minecraft:orange_shulker_box facing=down +3521 minecraft:orange_shulker_box facing=up minecraft:orange_shulker_box facing=up +3522 minecraft:orange_shulker_box facing=north minecraft:orange_shulker_box facing=north +3523 minecraft:orange_shulker_box facing=south minecraft:orange_shulker_box facing=south +3524 minecraft:orange_shulker_box facing=west minecraft:orange_shulker_box facing=west +3525 minecraft:orange_shulker_box facing=east minecraft:orange_shulker_box facing=east +3536 minecraft:magenta_shulker_box facing=down minecraft:magenta_shulker_box facing=down +3537 minecraft:magenta_shulker_box facing=up minecraft:magenta_shulker_box facing=up +3538 minecraft:magenta_shulker_box facing=north minecraft:magenta_shulker_box facing=north +3539 minecraft:magenta_shulker_box facing=south minecraft:magenta_shulker_box facing=south +3540 minecraft:magenta_shulker_box facing=west minecraft:magenta_shulker_box facing=west +3541 minecraft:magenta_shulker_box facing=east minecraft:magenta_shulker_box facing=east +3552 minecraft:light_blue_shulker_box facing=down minecraft:light_blue_shulker_box facing=down +3553 minecraft:light_blue_shulker_box facing=up minecraft:light_blue_shulker_box facing=up +3554 minecraft:light_blue_shulker_box facing=north minecraft:light_blue_shulker_box facing=north +3555 minecraft:light_blue_shulker_box facing=south minecraft:light_blue_shulker_box facing=south +3556 minecraft:light_blue_shulker_box facing=west minecraft:light_blue_shulker_box facing=west +3557 minecraft:light_blue_shulker_box facing=east minecraft:light_blue_shulker_box facing=east +3568 minecraft:yellow_shulker_box facing=down minecraft:yellow_shulker_box facing=down +3569 minecraft:yellow_shulker_box facing=up minecraft:yellow_shulker_box facing=up +3570 minecraft:yellow_shulker_box facing=north minecraft:yellow_shulker_box facing=north +3571 minecraft:yellow_shulker_box facing=south minecraft:yellow_shulker_box facing=south +3572 minecraft:yellow_shulker_box facing=west minecraft:yellow_shulker_box facing=west +3573 minecraft:yellow_shulker_box facing=east minecraft:yellow_shulker_box facing=east +3584 minecraft:lime_shulker_box facing=down minecraft:lime_shulker_box facing=down +3585 minecraft:lime_shulker_box facing=up minecraft:lime_shulker_box facing=up +3586 minecraft:lime_shulker_box facing=north minecraft:lime_shulker_box facing=north +3587 minecraft:lime_shulker_box facing=south minecraft:lime_shulker_box facing=south +3588 minecraft:lime_shulker_box facing=west minecraft:lime_shulker_box facing=west +3589 minecraft:lime_shulker_box facing=east minecraft:lime_shulker_box facing=east +3600 minecraft:pink_shulker_box facing=down minecraft:pink_shulker_box facing=down +3601 minecraft:pink_shulker_box facing=up minecraft:pink_shulker_box facing=up +3602 minecraft:pink_shulker_box facing=north minecraft:pink_shulker_box facing=north +3603 minecraft:pink_shulker_box facing=south minecraft:pink_shulker_box facing=south +3604 minecraft:pink_shulker_box facing=west minecraft:pink_shulker_box facing=west +3605 minecraft:pink_shulker_box facing=east minecraft:pink_shulker_box facing=east +3616 minecraft:gray_shulker_box facing=down minecraft:gray_shulker_box facing=down +3617 minecraft:gray_shulker_box facing=up minecraft:gray_shulker_box facing=up +3618 minecraft:gray_shulker_box facing=north minecraft:gray_shulker_box facing=north +3619 minecraft:gray_shulker_box facing=south minecraft:gray_shulker_box facing=south +3620 minecraft:gray_shulker_box facing=west minecraft:gray_shulker_box facing=west +3621 minecraft:gray_shulker_box facing=east minecraft:gray_shulker_box facing=east +3632 minecraft:light_gray_shulker_box facing=down minecraft:silver_shulker_box facing=down +3633 minecraft:light_gray_shulker_box facing=up minecraft:silver_shulker_box facing=up +3634 minecraft:light_gray_shulker_box facing=north minecraft:silver_shulker_box facing=north +3635 minecraft:light_gray_shulker_box facing=south minecraft:silver_shulker_box facing=south +3636 minecraft:light_gray_shulker_box facing=west minecraft:silver_shulker_box facing=west +3637 minecraft:light_gray_shulker_box facing=east minecraft:silver_shulker_box facing=east +3648 minecraft:cyan_shulker_box facing=down minecraft:cyan_shulker_box facing=down +3649 minecraft:cyan_shulker_box facing=up minecraft:cyan_shulker_box facing=up +3650 minecraft:cyan_shulker_box facing=north minecraft:cyan_shulker_box facing=north +3651 minecraft:cyan_shulker_box facing=south minecraft:cyan_shulker_box facing=south +3652 minecraft:cyan_shulker_box facing=west minecraft:cyan_shulker_box facing=west +3653 minecraft:cyan_shulker_box facing=east minecraft:cyan_shulker_box facing=east +3664 minecraft:purple_shulker_box facing=down minecraft:purple_shulker_box facing=down +3665 minecraft:purple_shulker_box facing=up minecraft:purple_shulker_box facing=up +3666 minecraft:purple_shulker_box facing=north minecraft:purple_shulker_box facing=north +3667 minecraft:purple_shulker_box facing=south minecraft:purple_shulker_box facing=south +3668 minecraft:purple_shulker_box facing=west minecraft:purple_shulker_box facing=west +3669 minecraft:purple_shulker_box facing=east minecraft:purple_shulker_box facing=east +3680 minecraft:blue_shulker_box facing=down minecraft:blue_shulker_box facing=down +3681 minecraft:blue_shulker_box facing=up minecraft:blue_shulker_box facing=up +3682 minecraft:blue_shulker_box facing=north minecraft:blue_shulker_box facing=north +3683 minecraft:blue_shulker_box facing=south minecraft:blue_shulker_box facing=south +3684 minecraft:blue_shulker_box facing=west minecraft:blue_shulker_box facing=west +3685 minecraft:blue_shulker_box facing=east minecraft:blue_shulker_box facing=east +3696 minecraft:brown_shulker_box facing=down minecraft:brown_shulker_box facing=down +3697 minecraft:brown_shulker_box facing=up minecraft:brown_shulker_box facing=up +3698 minecraft:brown_shulker_box facing=north minecraft:brown_shulker_box facing=north +3699 minecraft:brown_shulker_box facing=south minecraft:brown_shulker_box facing=south +3700 minecraft:brown_shulker_box facing=west minecraft:brown_shulker_box facing=west +3701 minecraft:brown_shulker_box facing=east minecraft:brown_shulker_box facing=east +3712 minecraft:green_shulker_box facing=down minecraft:green_shulker_box facing=down +3713 minecraft:green_shulker_box facing=up minecraft:green_shulker_box facing=up +3714 minecraft:green_shulker_box facing=north minecraft:green_shulker_box facing=north +3715 minecraft:green_shulker_box facing=south minecraft:green_shulker_box facing=south +3716 minecraft:green_shulker_box facing=west minecraft:green_shulker_box facing=west +3717 minecraft:green_shulker_box facing=east minecraft:green_shulker_box facing=east +3728 minecraft:red_shulker_box facing=down minecraft:red_shulker_box facing=down +3729 minecraft:red_shulker_box facing=up minecraft:red_shulker_box facing=up +3730 minecraft:red_shulker_box facing=north minecraft:red_shulker_box facing=north +3731 minecraft:red_shulker_box facing=south minecraft:red_shulker_box facing=south +3732 minecraft:red_shulker_box facing=west minecraft:red_shulker_box facing=west +3733 minecraft:red_shulker_box facing=east minecraft:red_shulker_box facing=east +3744 minecraft:black_shulker_box facing=down minecraft:black_shulker_box facing=down +3745 minecraft:black_shulker_box facing=up minecraft:black_shulker_box facing=up +3746 minecraft:black_shulker_box facing=north minecraft:black_shulker_box facing=north +3747 minecraft:black_shulker_box facing=south minecraft:black_shulker_box facing=south +3748 minecraft:black_shulker_box facing=west minecraft:black_shulker_box facing=west +3749 minecraft:black_shulker_box facing=east minecraft:black_shulker_box facing=east +3760 minecraft:white_glazed_terracotta facing=south minecraft:white_glazed_terracotta facing=south +3761 minecraft:white_glazed_terracotta facing=west minecraft:white_glazed_terracotta facing=west +3762 minecraft:white_glazed_terracotta facing=north minecraft:white_glazed_terracotta facing=north +3763 minecraft:white_glazed_terracotta facing=east minecraft:white_glazed_terracotta facing=east +3776 minecraft:orange_glazed_terracotta facing=south minecraft:orange_glazed_terracotta facing=south +3777 minecraft:orange_glazed_terracotta facing=west minecraft:orange_glazed_terracotta facing=west +3778 minecraft:orange_glazed_terracotta facing=north minecraft:orange_glazed_terracotta facing=north +3779 minecraft:orange_glazed_terracotta facing=east minecraft:orange_glazed_terracotta facing=east +3792 minecraft:magenta_glazed_terracotta facing=south minecraft:magenta_glazed_terracotta facing=south +3793 minecraft:magenta_glazed_terracotta facing=west minecraft:magenta_glazed_terracotta facing=west +3794 minecraft:magenta_glazed_terracotta facing=north minecraft:magenta_glazed_terracotta facing=north +3795 minecraft:magenta_glazed_terracotta facing=east minecraft:magenta_glazed_terracotta facing=east +3808 minecraft:light_blue_glazed_terracotta facing=south minecraft:light_blue_glazed_terracotta facing=south +3809 minecraft:light_blue_glazed_terracotta facing=west minecraft:light_blue_glazed_terracotta facing=west +3810 minecraft:light_blue_glazed_terracotta facing=north minecraft:light_blue_glazed_terracotta facing=north +3811 minecraft:light_blue_glazed_terracotta facing=east minecraft:light_blue_glazed_terracotta facing=east +3824 minecraft:yellow_glazed_terracotta facing=south minecraft:yellow_glazed_terracotta facing=south +3825 minecraft:yellow_glazed_terracotta facing=west minecraft:yellow_glazed_terracotta facing=west +3826 minecraft:yellow_glazed_terracotta facing=north minecraft:yellow_glazed_terracotta facing=north +3827 minecraft:yellow_glazed_terracotta facing=east minecraft:yellow_glazed_terracotta facing=east +3840 minecraft:lime_glazed_terracotta facing=south minecraft:lime_glazed_terracotta facing=south +3841 minecraft:lime_glazed_terracotta facing=west minecraft:lime_glazed_terracotta facing=west +3842 minecraft:lime_glazed_terracotta facing=north minecraft:lime_glazed_terracotta facing=north +3843 minecraft:lime_glazed_terracotta facing=east minecraft:lime_glazed_terracotta facing=east +3856 minecraft:pink_glazed_terracotta facing=south minecraft:pink_glazed_terracotta facing=south +3857 minecraft:pink_glazed_terracotta facing=west minecraft:pink_glazed_terracotta facing=west +3858 minecraft:pink_glazed_terracotta facing=north minecraft:pink_glazed_terracotta facing=north +3859 minecraft:pink_glazed_terracotta facing=east minecraft:pink_glazed_terracotta facing=east +3872 minecraft:gray_glazed_terracotta facing=south minecraft:gray_glazed_terracotta facing=south +3873 minecraft:gray_glazed_terracotta facing=west minecraft:gray_glazed_terracotta facing=west +3874 minecraft:gray_glazed_terracotta facing=north minecraft:gray_glazed_terracotta facing=north +3875 minecraft:gray_glazed_terracotta facing=east minecraft:gray_glazed_terracotta facing=east +3888 minecraft:light_gray_glazed_terracotta facing=south minecraft:silver_glazed_terracotta facing=south +3889 minecraft:light_gray_glazed_terracotta facing=west minecraft:silver_glazed_terracotta facing=west +3890 minecraft:light_gray_glazed_terracotta facing=north minecraft:silver_glazed_terracotta facing=north +3891 minecraft:light_gray_glazed_terracotta facing=east minecraft:silver_glazed_terracotta facing=east +3904 minecraft:cyan_glazed_terracotta facing=south minecraft:cyan_glazed_terracotta facing=south +3905 minecraft:cyan_glazed_terracotta facing=west minecraft:cyan_glazed_terracotta facing=west +3906 minecraft:cyan_glazed_terracotta facing=north minecraft:cyan_glazed_terracotta facing=north +3907 minecraft:cyan_glazed_terracotta facing=east minecraft:cyan_glazed_terracotta facing=east +3920 minecraft:purple_glazed_terracotta facing=south minecraft:purple_glazed_terracotta facing=south +3921 minecraft:purple_glazed_terracotta facing=west minecraft:purple_glazed_terracotta facing=west +3922 minecraft:purple_glazed_terracotta facing=north minecraft:purple_glazed_terracotta facing=north +3923 minecraft:purple_glazed_terracotta facing=east minecraft:purple_glazed_terracotta facing=east +3936 minecraft:blue_glazed_terracotta facing=south minecraft:blue_glazed_terracotta facing=south +3937 minecraft:blue_glazed_terracotta facing=west minecraft:blue_glazed_terracotta facing=west +3938 minecraft:blue_glazed_terracotta facing=north minecraft:blue_glazed_terracotta facing=north +3939 minecraft:blue_glazed_terracotta facing=east minecraft:blue_glazed_terracotta facing=east +3952 minecraft:brown_glazed_terracotta facing=south minecraft:brown_glazed_terracotta facing=south +3953 minecraft:brown_glazed_terracotta facing=west minecraft:brown_glazed_terracotta facing=west +3954 minecraft:brown_glazed_terracotta facing=north minecraft:brown_glazed_terracotta facing=north +3955 minecraft:brown_glazed_terracotta facing=east minecraft:brown_glazed_terracotta facing=east +3968 minecraft:green_glazed_terracotta facing=south minecraft:green_glazed_terracotta facing=south +3969 minecraft:green_glazed_terracotta facing=west minecraft:green_glazed_terracotta facing=west +3970 minecraft:green_glazed_terracotta facing=north minecraft:green_glazed_terracotta facing=north +3971 minecraft:green_glazed_terracotta facing=east minecraft:green_glazed_terracotta facing=east +3984 minecraft:red_glazed_terracotta facing=south minecraft:red_glazed_terracotta facing=south +3985 minecraft:red_glazed_terracotta facing=west minecraft:red_glazed_terracotta facing=west +3986 minecraft:red_glazed_terracotta facing=north minecraft:red_glazed_terracotta facing=north +3987 minecraft:red_glazed_terracotta facing=east minecraft:red_glazed_terracotta facing=east +4000 minecraft:black_glazed_terracotta facing=south minecraft:black_glazed_terracotta facing=south +4001 minecraft:black_glazed_terracotta facing=west minecraft:black_glazed_terracotta facing=west +4002 minecraft:black_glazed_terracotta facing=north minecraft:black_glazed_terracotta facing=north +4003 minecraft:black_glazed_terracotta facing=east minecraft:black_glazed_terracotta facing=east +4016 minecraft:white_concrete minecraft:concrete color=white +4017 minecraft:orange_concrete minecraft:concrete color=orange +4018 minecraft:magenta_concrete minecraft:concrete color=magenta +4019 minecraft:light_blue_concrete minecraft:concrete color=light_blue +4020 minecraft:yellow_concrete minecraft:concrete color=yellow +4021 minecraft:lime_concrete minecraft:concrete color=lime +4022 minecraft:pink_concrete minecraft:concrete color=pink +4023 minecraft:gray_concrete minecraft:concrete color=gray +4024 minecraft:light_gray_concrete minecraft:concrete color=silver +4025 minecraft:cyan_concrete minecraft:concrete color=cyan +4026 minecraft:purple_concrete minecraft:concrete color=purple +4027 minecraft:blue_concrete minecraft:concrete color=blue +4028 minecraft:brown_concrete minecraft:concrete color=brown +4029 minecraft:green_concrete minecraft:concrete color=green +4030 minecraft:red_concrete minecraft:concrete color=red +4031 minecraft:black_concrete minecraft:concrete color=black +4032 minecraft:white_concrete_powder minecraft:concrete_powder color=white +4033 minecraft:orange_concrete_powder minecraft:concrete_powder color=orange +4034 minecraft:magenta_concrete_powder minecraft:concrete_powder color=magenta +4035 minecraft:light_blue_concrete_powder minecraft:concrete_powder color=light_blue +4036 minecraft:yellow_concrete_powder minecraft:concrete_powder color=yellow +4037 minecraft:lime_concrete_powder minecraft:concrete_powder color=lime +4038 minecraft:pink_concrete_powder minecraft:concrete_powder color=pink +4039 minecraft:gray_concrete_powder minecraft:concrete_powder color=gray +4040 minecraft:light_gray_concrete_powder minecraft:concrete_powder color=silver +4041 minecraft:cyan_concrete_powder minecraft:concrete_powder color=cyan +4042 minecraft:purple_concrete_powder minecraft:concrete_powder color=purple +4043 minecraft:blue_concrete_powder minecraft:concrete_powder color=blue +4044 minecraft:brown_concrete_powder minecraft:concrete_powder color=brown +4045 minecraft:green_concrete_powder minecraft:concrete_powder color=green +4046 minecraft:red_concrete_powder minecraft:concrete_powder color=red +4047 minecraft:black_concrete_powder minecraft:concrete_powder color=black +4080 minecraft:structure_block mode=save minecraft:structure_block mode=save +4081 minecraft:structure_block mode=load minecraft:structure_block mode=load +4082 minecraft:structure_block mode=corner minecraft:structure_block mode=corner +4083 minecraft:structure_block mode=data minecraft:structure_block mode=data diff --git a/crates/horizon-world/src/datafix/chunk_flatten.rs b/crates/horizon-world/src/datafix/chunk_flatten.rs new file mode 100644 index 000000000..368d698d4 --- /dev/null +++ b/crates/horizon-world/src/datafix/chunk_flatten.rs @@ -0,0 +1,749 @@ +//! `ChunkPalettedStorageFix` (key 1451.1): the chunk sections of the 1.12 format +//! (`Blocks`, `Data`, `Add` byte arrays) become a palette and packed `BlockStates`, +//! with the block entities that carried block state (note blocks, flower pots, +//! beds, banners, skulls) folded into the states, as vanilla does. +//! +//! Vanilla compares block states by identity (`CrudeIncrementalIntIdentityHashBiMap` +//! and an identity set): states are instances here, numbered in one space with the +//! instances of the `BlockStateData` table. +use std::collections::{HashMap, HashSet}; +use std::sync::OnceLock; + +use super::block_state_data::{self as bsd, State}; +use super::dynamic::{as_bool, as_byte_buffer, as_int, as_str, ceillog2, key, set}; +use crate::nbt::Tag; + +/// `MappingConstants`. +struct Consts { + /// Instances: the `BlockStateData` ones first, then the constants below. + states: Vec, + air: u32, + pumpkin: u32, + snowy_podzol: u32, + snowy_grass: u32, + snowy_mycelium: u32, + upper: HashMap<&'static str, u32>, + flower_pot: HashMap, + skull: HashMap, + door: HashMap, + note_block: HashMap, + bed: HashMap, + banner: HashMap, +} + +const DYE_COLORS: [&str; 16] = [ + "white", + "orange", + "magenta", + "light_blue", + "yellow", + "lime", + "pink", + "gray", + "light_gray", + "cyan", + "purple", + "blue", + "brown", + "green", + "red", + "black", +]; + +fn consts() -> &'static Consts { + static C: OnceLock = OnceLock::new(); + C.get_or_init(|| { + let mut states = bsd::data().instances.clone(); + let mut add = |name: &str, props: &[(&str, &str)]| -> u32 { + states.push(State::new(name, props)); + (states.len() - 1) as u32 + }; + let air = add("minecraft:air", &[]); + let pumpkin = add("minecraft:pumpkin", &[]); + let snowy_podzol = add("minecraft:podzol", &[("snowy", "true")]); + let snowy_grass = add("minecraft:grass_block", &[("snowy", "true")]); + let snowy_mycelium = add("minecraft:mycelium", &[("snowy", "true")]); + let mut upper = HashMap::new(); + for name in [ + "minecraft:sunflower", + "minecraft:lilac", + "minecraft:tall_grass", + "minecraft:large_fern", + "minecraft:rose_bush", + "minecraft:peony", + ] { + upper.insert(name, add(name, &[("half", "upper")])); + } + let mut flower_pot = HashMap::new(); + let pots: [(&str, &str); 22] = [ + ("minecraft:air0", "minecraft:flower_pot"), + ("minecraft:red_flower0", "minecraft:potted_poppy"), + ("minecraft:red_flower1", "minecraft:potted_blue_orchid"), + ("minecraft:red_flower2", "minecraft:potted_allium"), + ("minecraft:red_flower3", "minecraft:potted_azure_bluet"), + ("minecraft:red_flower4", "minecraft:potted_red_tulip"), + ("minecraft:red_flower5", "minecraft:potted_orange_tulip"), + ("minecraft:red_flower6", "minecraft:potted_white_tulip"), + ("minecraft:red_flower7", "minecraft:potted_pink_tulip"), + ("minecraft:red_flower8", "minecraft:potted_oxeye_daisy"), + ("minecraft:yellow_flower0", "minecraft:potted_dandelion"), + ("minecraft:sapling0", "minecraft:potted_oak_sapling"), + ("minecraft:sapling1", "minecraft:potted_spruce_sapling"), + ("minecraft:sapling2", "minecraft:potted_birch_sapling"), + ("minecraft:sapling3", "minecraft:potted_jungle_sapling"), + ("minecraft:sapling4", "minecraft:potted_acacia_sapling"), + ("minecraft:sapling5", "minecraft:potted_dark_oak_sapling"), + ("minecraft:red_mushroom0", "minecraft:potted_red_mushroom"), + ("minecraft:brown_mushroom0", "minecraft:potted_brown_mushroom"), + ("minecraft:deadbush0", "minecraft:potted_dead_bush"), + ("minecraft:tallgrass2", "minecraft:potted_fern"), + ("minecraft:cactus0", "minecraft:potted_cactus"), + ]; + for (k, name) in pots { + flower_pot.insert(k.to_owned(), add(name, &[])); + } + let mut skull = HashMap::new(); + for (i, name, ty) in [ + (0, "skeleton", "skull"), + (1, "wither_skeleton", "skull"), + (2, "zombie", "head"), + (3, "player", "head"), + (4, "creeper", "head"), + (5, "dragon", "head"), + ] { + for facing in ["north", "east", "south", "west"] { + skull.insert( + format!("{i}{facing}"), + add( + &format!("minecraft:{name}_wall_{ty}"), + &[("facing", facing)], + ), + ); + } + for rot in 0..16 { + skull.insert( + format!("{i}{rot}"), + add( + &format!("minecraft:{name}_{ty}"), + &[("rotation", &rot.to_string())], + ), + ); + } + } + let mut door = HashMap::new(); + for ty in [ + "oak_door", + "iron_door", + "spruce_door", + "birch_door", + "jungle_door", + "acacia_door", + "dark_oak_door", + ] { + let id = format!("minecraft:{ty}"); + for facing in ["east", "north", "south", "west"] { + for half in ["lower", "upper"] { + for hinge in ["left", "right"] { + for open in ["false", "true"] { + for powered in ["false", "true"] { + door.insert( + format!("{id}{facing}{half}{hinge}{open}{powered}"), + add( + &id, + &[ + ("facing", facing), + ("half", half), + ("hinge", hinge), + ("open", open), + ("powered", powered), + ], + ), + ); + } + } + } + } + } + } + let mut note_block = HashMap::new(); + for i in 0..26 { + for powered in ["true", "false"] { + note_block.insert( + format!("{powered}{i}"), + add( + "minecraft:note_block", + &[("powered", powered), ("note", &i.to_string())], + ), + ); + } + } + let mut bed = HashMap::new(); + for (id, color) in DYE_COLORS.iter().enumerate() { + if *color == "red" { + continue; + } + let name = format!("minecraft:{color}_bed"); + for (facing, occupied, part) in [ + ("south", "false", "foot"), + ("west", "false", "foot"), + ("north", "false", "foot"), + ("east", "false", "foot"), + ("south", "false", "head"), + ("west", "false", "head"), + ("north", "false", "head"), + ("east", "false", "head"), + ("south", "true", "head"), + ("west", "true", "head"), + ("north", "true", "head"), + ("east", "true", "head"), + ] { + bed.insert( + format!("{facing}{occupied}{part}{id}"), + add( + &name, + &[("facing", facing), ("occupied", occupied), ("part", part)], + ), + ); + } + } + let mut banner = HashMap::new(); + for (id, color) in DYE_COLORS.iter().enumerate() { + if *color == "white" { + continue; + } + let color_id = 15 - id; + for i in 0..16 { + banner.insert( + format!("{i}_{color_id}"), + add( + &format!("minecraft:{color}_banner"), + &[("rotation", &i.to_string())], + ), + ); + } + for facing in ["north", "south", "west", "east"] { + banner.insert( + format!("{facing}_{color_id}"), + add( + &format!("minecraft:{color}_wall_banner"), + &[("facing", facing)], + ), + ); + } + } + Consts { + states, + air, + pumpkin, + snowy_podzol, + snowy_grass, + snowy_mycelium, + upper, + flower_pot, + skull, + door, + note_block, + bed, + banner, + } + }) +} + +/// The block ids (`id >> 4`) whose blocks need a second look. +const FIX: [usize; 18] = [ + 2, 3, 110, 140, 144, 25, 86, 26, 176, 177, 175, 64, 71, 193, 194, 195, 196, 197, +]; +const VIRTUAL: &[usize] = &[ + 54, 146, 25, 26, 51, 53, 67, 108, 109, 114, 128, 134, 135, 136, 156, 163, 164, 180, 203, 55, + 85, 113, 188, 189, 190, 191, 192, 93, 94, 101, 102, 160, 106, 107, 183, 184, 185, 186, 187, + 132, 139, 199, +]; + +fn is_virtual(block: usize) -> bool { + VIRTUAL.contains(&block) +} + +/// `getSideMask`. +fn side_mask(west: bool, east: bool, north: bool, south: bool) -> i32 { + let mut s = 0; + if north { + if east { + s |= 2; + } else if west { + s |= 128; + } else { + s |= 1; + } + } else if south { + if west { + s |= 32; + } else if east { + s |= 8; + } else { + s |= 16; + } + } else if east { + s |= 4; + } else if west { + s |= 64; + } + s +} + +/// A `DataLayer`: 4 bits per block. +struct Nibbles(Vec); + +impl Nibbles { + fn get(&self, x: usize, y: usize, z: usize) -> i32 { + let position = y << 8 | z << 4 | x; + let byte = self.0[position >> 1]; + if position & 1 == 0 { + i32::from(byte & 15) + } else { + i32::from(byte >> 4 & 15) + } + } +} + +struct Section { + y: i32, + has_data: bool, + /// The `listTag`: instances in the order they were first seen. + list: Vec, + seen: HashSet, + /// `palette`: instance by palette id. + palette: Vec, + palette_ids: HashMap, + to_fix: Vec<(usize, Vec)>, + update: Vec, + buffer: Vec, + raw: Tag, +} + +impl Section { + fn new(raw: Tag) -> Self { + let y = as_int(raw.get("Y"), 0); + let has_data = raw.get("Blocks").is_some(); + Self { + y, + has_data, + list: Vec::new(), + seen: HashSet::new(), + palette: Vec::new(), + palette_ids: HashMap::new(), + to_fix: Vec::new(), + update: Vec::new(), + buffer: vec![0; 4096], + raw, + } + } + + fn get_block(&self, pos: usize) -> u32 { + if pos <= 4095 { + self.palette + .get(self.buffer[pos] as usize) + .copied() + .unwrap_or_else(|| consts().air) + } else { + consts().air + } + } + + fn set_block(&mut self, idx: usize, state: u32) { + if self.seen.insert(state) { + self.list.push(state); + } + let id = match self.palette_ids.get(&state) { + Some(id) => *id, + None => { + self.palette.push(state); + let id = (self.palette.len() - 1) as i32; + self.palette_ids.insert(state, id); + id + } + }; + self.buffer[idx] = id; + } + + fn add_fix(&mut self, block: usize, position: usize) { + match self.to_fix.iter_mut().find(|(b, _)| *b == block) { + Some((_, list)) => list.push(position), + None => self.to_fix.push((block, vec![position])), + } + } + + fn upgrade(&mut self, mut sides: i32) -> i32 { + if !self.has_data { + return sides; + } + let blocks = as_byte_buffer(self.raw.get("Blocks")).unwrap_or_default(); + let nibbles = |name: &str| { + as_byte_buffer(self.raw.get(name)) + .map(Nibbles) + .unwrap_or_else(|| Nibbles(vec![0; 2048])) + }; + let data = nibbles("Data"); + let add_blocks = nibbles("Add"); + let c = consts(); + self.seen.insert(c.air); + self.palette.push(c.air); + self.palette_ids.insert(c.air, 0); + self.list.push(c.air); + let d = bsd::data(); + for idx in 0..4096usize { + let (xx, yy, zz) = (idx & 15, idx >> 8 & 15, idx >> 4 & 15); + let id = add_blocks.get(xx, yy, zz) << 12 + | i32::from(blocks.get(idx).copied().unwrap_or(0)) << 4 + | data.get(xx, yy, zz); + let block = (id >> 4) as usize; + if FIX.contains(&block) { + self.add_fix(block, idx); + } + if is_virtual(block) { + let s = side_mask(xx == 0, xx == 15, zz == 0, zz == 15); + if s == 0 { + self.update.push(idx as i32); + } else { + sides |= s; + } + } + self.set_block(idx, d.instance(id)); + } + sides + } + + fn write(&self) -> Tag { + let mut section = self.raw.clone(); + if !self.has_data { + return section; + } + let c = consts(); + let palette: Vec = self + .list + .iter() + .map(|s| { + let state = &c.states[*s as usize]; + if state.name == "%%FILTER_ME%%" { + c.states[c.air as usize].to_tag() + } else { + state.to_tag() + } + }) + .collect(); + set(&mut section, "Palette", Tag::List(palette)); + let bits = ceillog2(self.seen.len()).max(4) as usize; + let mut storage = vec![0i64; (4096 * bits).div_ceil(64)]; + let mask = (1i64 << bits) - 1; + for (index, value) in self.buffer.iter().enumerate() { + let value = i64::from(*value); + let position = index * bits; + let start = position >> 6; + let end = ((index + 1) * bits - 1) >> 6; + let start_bit = position ^ (start << 6); + storage[start] = storage[start] & !(mask << start_bit) | (value & mask) << start_bit; + if start != end { + let shift = 64 - start_bit; + let wanted = bits - shift; + storage[end] = ((storage[end] as u64) >> wanted << wanted) as i64 + | (value & mask) >> shift; + } + } + set(&mut section, "BlockStates", Tag::LongArray(storage)); + for f in ["Blocks", "Data", "Add"] { + super::dynamic::remove(&mut section, f); + } + section + } +} + +#[derive(Clone, Copy)] +enum Direction { + Down, + Up, +} + +fn relative(pos: i64, direction: Direction) -> i64 { + let y = (pos >> 8) + if matches!(direction, Direction::Up) { 1 } else { -1 }; + if (0..=255).contains(&y) { + pos & 0xFF | y << 8 + } else { + -1 + } +} + +struct UpgradeChunk { + sides: i32, + sections: Vec>, + /// `Int2ObjectLinkedOpenHashMap`: insertion order, a repeated key keeps its place. + block_entities: Vec<(i64, Tag)>, +} + +impl UpgradeChunk { + fn block_entity(&self, pos: i64) -> Option<&Tag> { + self.block_entities + .iter() + .find(|(k, _)| *k == pos) + .map(|(_, v)| v) + } + fn remove_block_entity(&mut self, pos: i64) -> Option { + let i = self.block_entities.iter().position(|(k, _)| *k == pos)?; + Some(self.block_entities.remove(i).1) + } + fn section(&self, pos: i64) -> Option<&Section> { + self.sections.get((pos >> 12) as usize)?.as_ref() + } + fn get_block(&self, pos: i64) -> u32 { + if (0..=65535).contains(&pos) { + match self.section(pos) { + Some(s) => s.get_block((pos & 4095) as usize), + None => consts().air, + } + } else { + consts().air + } + } + fn set_block(&mut self, pos: i64, block: u32) { + if (0..=65535).contains(&pos) + && let Some(Some(s)) = self.sections.get_mut((pos >> 12) as usize) + { + s.set_block((pos & 4095) as usize, block); + } + } + fn name(&self, pos: i64) -> &str { + &consts().states[self.get_block(pos) as usize].name + } + fn state(&self, pos: i64) -> &State { + &consts().states[self.get_block(pos) as usize] + } +} + +/// `ChunkPalettedStorageFix.fix` over a chunk (`{Level: ...}`). +pub(super) fn fix(chunk: &mut Tag) { + let Some(level) = chunk.get_mut("Level") else { + return; + }; + if !matches!(level.get("Sections"), Some(Tag::List(_))) { + return; + } + let new_level = upgrade_level(level); + *level = new_level; +} + +fn upgrade_level(level: &Tag) -> Tag { + let c = consts(); + let x0 = as_int(level.get("xPos"), 0) << 4; + let z0 = as_int(level.get("zPos"), 0) << 4; + let mut chunk = UpgradeChunk { + sides: 0, + sections: (0..16).map(|_| None).collect(), + block_entities: Vec::new(), + }; + if let Some(Tag::List(entities)) = level.get("TileEntities") { + for entity in entities { + let x = i64::from(as_int(entity.get("x"), 0).wrapping_sub(x0) & 15); + let y = i64::from(as_int(entity.get("y"), 0)); + let z = i64::from(as_int(entity.get("z"), 0).wrapping_sub(z0) & 15); + let k = (y << 8) | (z << 4) | x; + match chunk.block_entities.iter_mut().find(|(key, _)| *key == k) { + Some((_, v)) => *v = entity.clone(), + None => chunk.block_entities.push((k, entity.clone())), + } + } + } + let converted_from_alpha = as_bool(level.get("convertedFromAlphaFormat"), false); + if let Some(Tag::List(sections)) = level.get("Sections") { + for raw in sections { + let mut section = Section::new(raw.clone()); + chunk.sides = section.upgrade(chunk.sides); + let y = section.y; + if (0..16).contains(&y) { + chunk.sections[y as usize] = Some(section); + } + } + } + for si in 0..16 { + let Some(section) = &chunk.sections[si] else { + continue; + }; + let to_fix = section.to_fix.clone(); + let section_y = section.y as i64; + for (block, positions) in to_fix { + let dy = section_y << 12; + for pos in positions { + let pos = pos as i64 | dy; + fix_block(&mut chunk, c, block, pos, converted_from_alpha); + } + } + } + // write() + let mut out = level.clone(); + if chunk.block_entities.is_empty() { + super::dynamic::remove(&mut out, "TileEntities"); + } else { + set( + &mut out, + "TileEntities", + Tag::List(chunk.block_entities.iter().map(|(_, v)| v.clone()).collect()), + ); + } + let mut indices = crate::nbt::Compound::new(); + let mut sections = Vec::new(); + for section in chunk.sections.iter().flatten() { + sections.push(section.write()); + indices.insert( + key(§ion.y.to_string()), + Tag::IntArray(section.update.clone()), + ); + } + let upgrade_data = Tag::compound([ + ("Sides", Tag::Byte(chunk.sides as i8)), + ("Indices", Tag::Compound(indices)), + ]); + set(&mut out, "UpgradeData", upgrade_data); + set(&mut out, "Sections", Tag::List(sections)); + out +} + +fn fix_block(chunk: &mut UpgradeChunk, c: &Consts, block: usize, pos: i64, alpha: bool) { + let up = relative(pos, Direction::Up); + let down = relative(pos, Direction::Down); + let is_snow = |n: &str| n == "minecraft:snow" || n == "minecraft:snow_layer"; + match block { + 2 => { + if chunk.name(pos) == "minecraft:grass_block" && is_snow(chunk.name(up)) { + chunk.set_block(pos, c.snowy_grass); + } + } + 3 => { + if chunk.name(pos) == "minecraft:podzol" && is_snow(chunk.name(up)) { + chunk.set_block(pos, c.snowy_podzol); + } + } + 25 => { + if let Some(entity) = chunk.remove_block_entity(pos) { + let note = as_int(entity.get("note"), 0).clamp(0, 24) as i8; + let k = format!("{}{}", as_bool(entity.get("powered"), false), note); + let state = c + .note_block + .get(&k) + .or_else(|| c.note_block.get("false0")) + .copied() + .expect("note block"); + chunk.set_block(pos, state); + } + } + 26 => { + if let Some(entity) = chunk.block_entity(pos) { + let color = as_int(entity.get("color"), 0); + let state = chunk.state(pos); + if color != 14 && (0..16).contains(&color) { + let k = format!( + "{}{}{}{}", + state.property("facing"), + state.property("occupied"), + state.property("part"), + color + ); + if let Some(s) = c.bed.get(&k).copied() { + chunk.set_block(pos, s); + } + } + } + } + 64 | 71 | 193..=197 => { + if chunk.name(pos).ends_with("_door") { + let lower = chunk.state(pos).clone(); + if lower.property("half") == "lower" { + let above = up; + let upper = chunk.state(above).clone(); + if lower.name == upper.name { + let facing = lower.property("facing"); + let open = lower.property("open"); + let hinge = if alpha { "left" } else { upper.property("hinge") }; + let powered = if alpha { "false" } else { upper.property("powered") }; + let name = &lower.name; + let lo = c + .door + .get(&format!("{name}{facing}lower{hinge}{open}{powered}")) + .copied(); + let hi = c + .door + .get(&format!("{name}{facing}upper{hinge}{open}{powered}")) + .copied(); + if let (Some(lo), Some(hi)) = (lo, hi) { + chunk.set_block(pos, lo); + chunk.set_block(above, hi); + } + } + } + } + } + 86 => { + if chunk.name(pos) == "minecraft:carved_pumpkin" { + let below = chunk.name(down); + if below == "minecraft:grass_block" || below == "minecraft:dirt" { + chunk.set_block(pos, c.pumpkin); + } + } + } + 110 => { + if chunk.name(pos) == "minecraft:mycelium" && is_snow(chunk.name(up)) { + chunk.set_block(pos, c.snowy_mycelium); + } + } + 140 => { + if let Some(entity) = chunk.remove_block_entity(pos) { + let item = as_str(entity.get("Item")).unwrap_or_default(); + let k = format!("{}{}", item, as_int(entity.get("Data"), 0)); + let state = c + .flower_pot + .get(&k) + .or_else(|| c.flower_pot.get("minecraft:air0")) + .copied() + .expect("flower pot"); + chunk.set_block(pos, state); + } + } + 144 => { + if let Some(entity) = chunk.block_entity(pos) { + let ty = as_int(entity.get("SkullType"), 0).to_string(); + let facing = chunk.state(pos).property("facing").to_owned(); + let k = if facing != "up" && facing != "down" { + format!("{ty}{facing}") + } else { + format!("{ty}{}", as_int(entity.get("Rot"), 0)) + }; + // `entity.remove(...)` on an immutable Dynamic changes nothing. + let state = c + .skull + .get(&k) + .or_else(|| c.skull.get("0north")) + .copied() + .expect("skull"); + chunk.set_block(pos, state); + } + } + 175 => { + if chunk.state(pos).property("half") == "upper" { + let variant = chunk.name(down).to_owned(); + if let Some(s) = c.upper.get(variant.as_str()).copied() { + chunk.set_block(pos, s); + } + } + } + 176 | 177 => { + if let Some(entity) = chunk.block_entity(pos) { + let color = as_int(entity.get("Base"), 0); + let state = chunk.state(pos); + if color != 15 && (0..16).contains(&color) { + let prop = state.property(if block == 176 { "rotation" } else { "facing" }); + let k = format!("{prop}_{color}"); + if let Some(s) = c.banner.get(&k).copied() { + chunk.set_block(pos, s); + } + } + } + } + _ => {} + } +} diff --git a/crates/horizon-world/src/datafix/chunk_leaves.rs b/crates/horizon-world/src/datafix/chunk_leaves.rs new file mode 100644 index 000000000..ffefc7060 --- /dev/null +++ b/crates/horizon-world/src/datafix/chunk_leaves.rs @@ -0,0 +1,507 @@ +//! `LeavesFix` (key 1496) and `TrappedChestBlockEntityFix` (key 1624): fixes that +//! read the packed block states of the sections of a chunk. +//! +//! `LeavesFix` visits blocks in the iteration order of fastutil hash sets, and the +//! order decides in which order its new palette entries appear: the sets are +//! emulated here (`IntOpenHashSet` and the key order of an `Int2ObjectOpenHashMap`). +use std::collections::{HashMap, HashSet}; + +use super::dynamic::{as_int, as_long_stream, as_str, ceillog2, remove, set}; +use crate::nbt::Tag; + +/// `PackedBitStorage`. +#[derive(Clone)] +struct Packed { + data: Vec, + bits: usize, + mask: i64, +} + +impl Packed { + fn new(bits: usize, data: Vec) -> Option { + (data.len() == (4096 * bits).div_ceil(64)).then(|| Self { + data, + bits, + mask: (1i64 << bits) - 1, + }) + } + fn zeroed(bits: usize) -> Self { + Self::new(bits, vec![0; (4096 * bits).div_ceil(64)]).expect("length") + } + fn set(&mut self, index: usize, value: i32) { + let position = index * self.bits; + let start = position >> 6; + let end = ((index + 1) * self.bits - 1) >> 6; + let start_bit = position ^ (start << 6); + let value = i64::from(value); + self.data[start] = self.data[start] & !(self.mask << start_bit) | (value & self.mask) << start_bit; + if start != end { + let shift = 64 - start_bit; + let wanted = self.bits - shift; + self.data[end] = + ((self.data[end] as u64) >> wanted << wanted) as i64 | (value & self.mask) >> shift; + } + } + fn get(&self, index: usize) -> i32 { + let position = index * self.bits; + let start = position >> 6; + let end = ((index + 1) * self.bits - 1) >> 6; + let start_bit = position ^ (start << 6); + if start == end { + return (((self.data[start] as u64) >> start_bit) as i64 & self.mask) as i32; + } + let shift = 64 - start_bit; + ((((self.data[start] as u64) >> start_bit) as i64 | self.data[end] << shift) & self.mask) as i32 + } +} + +// ------------------------------------------------------------------ fastutil + +fn array_size(expected: usize) -> usize { + // arraySize(expected, 0.75f): nextPowerOfTwo(ceil(expected / f)), at least 2 + let need = (expected as f64 / 0.75f32 as f64).ceil() as usize; + need.next_power_of_two().max(2) +} + +fn max_fill(n: usize) -> usize { + ((n as f64 * 0.75f32 as f64).ceil() as usize).min(n - 1) +} + +fn mix(x: i32) -> usize { + let h = x.wrapping_mul(0x9E37_79B9u32 as i32); + (h ^ ((h as u32) >> 16) as i32) as u32 as usize +} + +/// `IntOpenHashSet`: add and iteration order. +struct IntSet { + key: Vec, + n: usize, + max_fill: usize, + size: usize, + contains_null: bool, +} + +impl IntSet { + /// `new IntOpenHashSet()`. + fn new() -> Self { + Self::sized(16) + } + fn sized(expected: usize) -> Self { + let n = array_size(expected); + Self { + key: vec![0; n + 1], + n, + max_fill: max_fill(n), + size: 0, + contains_null: false, + } + } + fn add(&mut self, k: i32) -> bool { + if k == 0 { + if self.contains_null { + return false; + } + self.contains_null = true; + } else { + let mask = self.n - 1; + let mut pos = mix(k) & mask; + while self.key[pos] != 0 { + if self.key[pos] == k { + return false; + } + pos = (pos + 1) & mask; + } + self.key[pos] = k; + } + let grow = self.size >= self.max_fill; + self.size += 1; + if grow { + self.rehash(array_size(self.size + 1)); + } + true + } + fn rehash(&mut self, new_n: usize) { + let mask = new_n - 1; + let mut new_key = vec![0; new_n + 1]; + let real = if self.contains_null { + self.size - 1 + } else { + self.size + }; + let mut i = self.n; + for _ in 0..real { + loop { + i -= 1; + if self.key[i] != 0 { + break; + } + } + let mut pos = mix(self.key[i]) & mask; + while new_key[pos] != 0 { + pos = (pos + 1) & mask; + } + new_key[pos] = self.key[i]; + } + self.n = new_n; + self.max_fill = max_fill(new_n); + self.key = new_key; + } + /// The elements in iteration order: the null key first, then the table from its end. + fn order(&self) -> Vec { + let mut out = Vec::with_capacity(self.size); + if self.contains_null { + out.push(0); + } + for pos in (0..self.n).rev() { + if self.key[pos] != 0 { + out.push(self.key[pos]); + } + } + out + } +} + +/// The section indices in the iteration order of +/// `new Int2ObjectOpenHashMap<>(hashMapOfTheSections)`. +fn section_order(indices: &[i32]) -> Vec { + let mut sorted = indices.to_vec(); + sorted.sort_unstable(); + let mut set = IntSet::sized(sorted.len()); + for i in sorted { + set.add(i); + } + set.order() +} + +// ------------------------------------------------------------------ sections + +fn leaf_index(name: &str) -> Option { + Some(match name { + "minecraft:acacia_leaves" => 0, + "minecraft:birch_leaves" => 1, + "minecraft:dark_oak_leaves" => 2, + "minecraft:jungle_leaves" => 3, + "minecraft:oak_leaves" => 4, + "minecraft:spruce_leaves" => 5, + _ => return None, + }) +} + +const LOGS: [&str; 18] = [ + "minecraft:acacia_bark", + "minecraft:birch_bark", + "minecraft:dark_oak_bark", + "minecraft:jungle_bark", + "minecraft:oak_bark", + "minecraft:spruce_bark", + "minecraft:acacia_log", + "minecraft:birch_log", + "minecraft:dark_oak_log", + "minecraft:jungle_log", + "minecraft:oak_log", + "minecraft:spruce_log", + "minecraft:stripped_acacia_log", + "minecraft:stripped_birch_log", + "minecraft:stripped_dark_oak_log", + "minecraft:stripped_jungle_log", + "minecraft:stripped_oak_log", + "minecraft:stripped_spruce_log", +]; + +/// A section as `LeavesFix.Section` reads it. +struct Section { + index: i32, + palette: Vec, + storage: Option, + leaf_ids: HashSet, + log_ids: HashSet, + state_to_id: HashMap, +} + +fn name_of(state: &Tag) -> String { + as_str(state.get("Name")).unwrap_or_default() +} + +fn state_id(name: &str, persistent: bool, distance: i32) -> i32 { + leaf_index(name).unwrap_or(0) << 5 | if persistent { 16 } else { 0 } | distance +} + +fn leaf_tag(name: &str, persistent: bool, distance: i32) -> Tag { + Tag::compound([ + ( + "Properties", + Tag::compound([ + ( + "persistent", + super::dynamic::string(if persistent { "true" } else { "false" }), + ), + ("distance", super::dynamic::string(&distance.to_string())), + ]), + ), + ("Name", super::dynamic::string(name)), + ]) +} + +impl Section { + /// `LeavesSection` constructor: reads the palette, and rewrites its leaf states. + fn read_leaves(section: &Tag) -> Self { + let mut s = Self::read(section); + // skippable() + for i in 0..s.palette.len() { + let name = name_of(&s.palette[i]); + if leaf_index(&name).is_some() { + let persistent = as_str(s.palette[i].get("Properties").and_then(|p| p.get("decayable"))) + .is_some_and(|d| d == "false"); + s.leaf_ids.insert(i as i32); + s.state_to_id.insert(state_id(&name, persistent, 7), i as i32); + s.palette[i] = leaf_tag(&name, persistent, 7); + } + if LOGS.contains(&name.as_str()) { + s.log_ids.insert(i as i32); + } + } + s.finish_read(section, s.leaf_ids.is_empty() && s.log_ids.is_empty()); + s + } + + fn read(section: &Tag) -> Self { + let palette = match section.get("Palette") { + Some(Tag::List(l)) => l.clone(), + _ => Vec::new(), + }; + Self { + index: as_int(section.get("Y"), 0), + palette, + storage: None, + leaf_ids: HashSet::new(), + log_ids: HashSet::new(), + state_to_id: HashMap::new(), + } + } + + fn finish_read(&mut self, section: &Tag, skippable: bool) { + if skippable { + self.storage = None; + } else { + let states = as_long_stream(section.get("BlockStates")).unwrap_or_default(); + let size = ceillog2(self.palette.len()).max(4) as usize; + self.storage = Packed::new(size, states); + } + } + + fn is_skippable(&self) -> bool { + self.storage.is_none() + } + fn block(&self, pos: usize) -> i32 { + self.storage.as_ref().map_or(0, |s| s.get(pos)) + } + fn is_leaf(&self, block: i32) -> bool { + self.leaf_ids.contains(&block) + } + fn is_log(&self, block: i32) -> bool { + self.log_ids.contains(&block) + } + fn distance(&self, block: i32) -> i32 { + if self.is_log(block) { + return 0; + } + self.palette + .get(block as usize) + .and_then(|p| p.get("Properties")) + .and_then(|p| as_str(p.get("distance"))) + .and_then(|d| d.parse().ok()) + .unwrap_or(0) + } + fn set_distance(&mut self, pos: usize, block: i32, distance: i32) { + let base = self.palette[block as usize].clone(); + let name = name_of(&base); + let persistent = as_str(base.get("Properties").and_then(|p| p.get("persistent"))) + .is_some_and(|p| p == "true"); + let id_key = state_id(&name, persistent, distance); + if !self.state_to_id.contains_key(&id_key) { + let id = self.palette.len() as i32; + self.leaf_ids.insert(id); + self.state_to_id.insert(id_key, id); + self.palette.push(leaf_tag(&name, persistent, distance)); + } + let id = self.state_to_id[&id_key]; + let storage = self.storage.as_mut().expect("storage"); + if 1i64 << storage.bits <= i64::from(id) { + let mut grown = Packed::zeroed(storage.bits + 1); + for i in 0..4096 { + grown.set(i, storage.get(i)); + } + *storage = grown; + } + storage.set(pos, id); + } + fn write(&self, section: &mut Tag) { + let Some(storage) = &self.storage else { + return; + }; + set(section, "BlockStates", Tag::LongArray(storage.data.clone())); + set(section, "Palette", Tag::List(self.palette.clone())); + } +} + +fn get_index(x: i32, y: i32, z: i32) -> i32 { + y << 8 | z << 4 | x +} + +fn side_mask(west: bool, east: bool, north: bool, south: bool) -> i32 { + let mut s = 0; + if north { + if east { + s |= 2; + } else if west { + s |= 128; + } else { + s |= 1; + } + } else if south { + if west { + s |= 32; + } else if east { + s |= 8; + } else { + s |= 16; + } + } else if east { + s |= 4; + } else if west { + s |= 64; + } + s +} + +/// `LeavesFix` over a chunk (`{Level: ...}`). +pub(super) fn leaves_fix(chunk: &mut Tag) { + let Some(level) = chunk.get_mut("Level") else { + return; + }; + let Some(Tag::List(raw_sections)) = level.get("Sections").cloned() else { + return; + }; + let mut sections: Vec
= raw_sections.iter().map(Section::read_leaves).collect(); + if sections.iter().all(Section::is_skippable) { + return; + } + let mut sides = 0; + let mut queue: Vec = (0..7).map(|_| IntSet::new()).collect(); + let indices: Vec = sections.iter().map(|s| s.index).collect(); + for index in section_order(&indices) { + let Some(section) = sections.iter().find(|s| s.index == index) else { + continue; + }; + if section.is_skippable() { + continue; + } + for i in 0..4096usize { + let block = section.block(i); + if section.is_log(block) { + queue[0].add(section.index << 12 | i as i32); + } else if section.is_leaf(block) { + let x = (i & 15) as i32; + let z = (i >> 4 & 15) as i32; + sides |= side_mask(x == 0, x == 15, z == 0, z == 15); + } + } + } + const DIRECTIONS: [[i32; 3]; 6] = [ + [-1, 0, 0], + [1, 0, 0], + [0, -1, 0], + [0, 1, 0], + [0, 0, -1], + [0, 0, 1], + ]; + for i in 1..7 { + let current = queue[i - 1].order(); + for pos_chunk in current { + let x = pos_chunk & 15; + let y = pos_chunk >> 8 & 0xFF; + let z = pos_chunk >> 4 & 15; + for d in DIRECTIONS { + let (nx, ny, nz) = (x + d[0], y + d[1], z + d[2]); + if !(0..=15).contains(&nx) || !(0..=15).contains(&nz) || !(0..=255).contains(&ny) { + continue; + } + let Some(section) = sections.iter_mut().find(|s| s.index == ny >> 4) else { + continue; + }; + if section.is_skippable() { + continue; + } + let pos_section = get_index(nx, ny & 15, nz) as usize; + let block = section.block(pos_section); + if section.is_leaf(block) && section.distance(block) > i as i32 { + section.set_distance(pos_section, block, i as i32); + queue[i].add(get_index(nx, ny, nz)); + } + } + } + } + if let Some(Tag::List(list)) = level.get_mut("Sections") { + for raw in list.iter_mut() { + let y = as_int(raw.get("Y"), 0); + if let Some(section) = sections.iter().find(|s| s.index == y) { + section.write(raw); + } + } + } + if sides != 0 { + let mut upgrade = level + .get("UpgradeData") + .cloned() + .unwrap_or_else(super::dynamic::empty_map); + let old = as_int(upgrade.get("Sides"), 0) as i8; + set(&mut upgrade, "Sides", Tag::Byte(old | sides as i8)); + set(level, "UpgradeData", upgrade); + } +} + +/// `TrappedChestBlockEntityFix` over a chunk (`{Level: ...}`). +pub(super) fn trapped_chest_fix(chunk: &mut Tag) { + let Some(level) = chunk.get_mut("Level") else { + return; + }; + let Some(Tag::List(raw_sections)) = level.get("Sections").cloned() else { + return; + }; + let mut chests: HashSet = HashSet::new(); + for raw in &raw_sections { + let mut section = Section::read(raw); + let ids: HashSet = section + .palette + .iter() + .enumerate() + .filter(|(_, p)| name_of(p) == "minecraft:trapped_chest") + .map(|(i, _)| i as i32) + .collect(); + section.finish_read(raw, ids.is_empty()); + if section.is_skippable() { + continue; + } + for i in 0..4096usize { + if ids.contains(§ion.block(i)) { + chests.insert(section.index << 12 | i as i32); + } + } + } + let chunk_x = as_int(level.get("xPos"), 0); + let chunk_z = as_int(level.get("zPos"), 0); + if let Some(Tag::List(entities)) = level.get_mut("TileEntities") { + for be in entities { + if !super::schema::block_entity_known(be, super::schema::key(1624, 0) - 1) { + continue; + } + let x = as_int(be.get("x"), 0).wrapping_sub(chunk_x << 4); + let y = as_int(be.get("y"), 0); + let z = as_int(be.get("z"), 0).wrapping_sub(chunk_z << 4); + if chests.contains(&get_index(x, y, z)) { + set(be, "id", super::dynamic::string("minecraft:trapped_chest")); + } + } + } + let _ = remove; +} diff --git a/crates/horizon-world/src/datafix/fixes_flat.rs b/crates/horizon-world/src/datafix/fixes_flat.rs new file mode 100644 index 000000000..751bc3659 --- /dev/null +++ b/crates/horizon-world/src/datafix/fixes_flat.rs @@ -0,0 +1,1197 @@ +//! Fixes of 1.12.2 to 1.13.2 (keys 1450 to 1624, DataVersion 1343 to 1631): the +//! flattening and what came with it. The options fixes of this range (1344, 1446) +//! are client settings, not world data. +use std::collections::HashMap; +use std::sync::OnceLock; + +use super::block_state_data as bsd; +use super::chunk_leaves; +use super::dynamic::{ + as_int, as_number, as_str, empty_map, is_list, namespaced, remove, set, stream, string, +}; +use super::flat_tables as t; +use super::schema::{Key, Ty, key}; +use super::{Cx, FixFn, id_is, items, mark_read, reread, reread_as}; +use crate::nbt::{Compound, JavaString, Tag}; + +pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { + out.push((key(1450, 0), |cx| { + cx.each(Ty::BlockState, |s| *s = bsd::upgrade_block_state_tag(s)) + })); + out.push((key(1451, 1), chunk_palettes)); + out.push((key(1451, 2), piston_block_state)); + out.push((key(1451, 3), entity_block_state)); + out.push((key(1451, 3), map_id)); + out.push((key(1451, 4), block_name_flattening)); + out.push((key(1451, 4), item_flattening)); + out.push((key(1451, 5), remove_block_entity_tags)); + out.push((key(1451, 5), spawn_eggs)); + out.push((key(1451, 5), |cx| { + cx.entity("minecraft:wolf", |e| { + if let Some(c) = e.get("CollarColor") { + let color = 15 - as_int(Some(c), 0); + set(e, "CollarColor", Tag::Byte(color as i8)); + } + }) + })); + out.push((key(1451, 5), banner_color)); + out.push((key(1451, 5), flat_generator_info)); + out.push((key(1451, 6), stats_counters)); + out.push((key(1451, 6), jukebox_record)); + out.push((key(1451, 7), villager_trades)); + out.push((key(1456, 0), |cx| { + cx.entity("minecraft:item_frame", |e| { + let facing = match as_int(e.get("Facing"), 0) as i8 { + 0 => 3, + 1 => 4, + 3 => 5, + _ => 2, + }; + set(e, "Facing", Tag::Byte(facing)); + }) + })); + out.push((key(1458, 0), entity_custom_name)); + out.push((key(1458, 0), item_custom_name)); + out.push((key(1458, 0), block_entity_custom_name)); + out.push((key(1460, 0), painting_motive)); + out.push((key(1466, 0), chunk_to_protochunk)); + out.push((key(1474, 0), |cx| { + cx.entity("minecraft:shulker", |e| { + if as_int(e.get("Color"), 0) == 10 { + set(e, "Color", Tag::Byte(16)); + } + }) + })); + out.push((key(1474, 0), |cx| { + legacy_block_rename(cx, &only("minecraft:purple_shulker_box", "minecraft:shulker_box")) + })); + out.push((key(1474, 0), |cx| { + item_rename(cx, &only("minecraft:purple_shulker_box", "minecraft:shulker_box")) + })); + out.push((key(1475, 0), |cx| { + legacy_block_rename( + cx, + &table(&[ + ("minecraft:flowing_water", "minecraft:water"), + ("minecraft:flowing_lava", "minecraft:lava"), + ]), + ) + })); + out.push((key(1480, 0), |cx| legacy_block_rename(cx, &table(t::CORAL)))); + out.push((key(1480, 0), |cx| item_rename(cx, &table(t::CORAL)))); + out.push((key(1483, 0), |cx| { + entity_rename(cx, &only("minecraft:puffer_fish", "minecraft:pufferfish")) + })); + out.push((key(1483, 0), |cx| { + item_rename( + cx, + &only("minecraft:puffer_fish_spawn_egg", "minecraft:pufferfish_spawn_egg"), + ) + })); + const SEAGRASS: &[(&str, &str)] = &[ + ("minecraft:sea_grass", "minecraft:seagrass"), + ("minecraft:tall_sea_grass", "minecraft:tall_seagrass"), + ]; + out.push((key(1484, 0), |cx| item_rename(cx, &table(SEAGRASS)))); + out.push((key(1484, 0), |cx| legacy_block_rename(cx, &table(SEAGRASS)))); + out.push((key(1484, 0), heightmap_renaming)); + out.push((key(1486, 0), |cx| entity_rename(cx, &table(t::COD_SALMON)))); + out.push((key(1486, 0), |cx| item_rename(cx, &table(t::COD_SALMON_EGGS)))); + const PRISMARINE: &[(&str, &str)] = &[ + ( + "minecraft:prismarine_bricks_slab", + "minecraft:prismarine_brick_slab", + ), + ( + "minecraft:prismarine_bricks_stairs", + "minecraft:prismarine_brick_stairs", + ), + ]; + out.push((key(1487, 0), |cx| item_rename(cx, &table(PRISMARINE)))); + out.push((key(1487, 0), |cx| legacy_block_rename(cx, &table(PRISMARINE)))); + out.push((key(1488, 0), |cx| { + legacy_block_rename( + cx, + &table(&[ + ("minecraft:kelp_top", "minecraft:kelp"), + ("minecraft:kelp", "minecraft:kelp_plant"), + ]), + ) + })); + out.push((key(1488, 0), |cx| { + item_rename(cx, &only("minecraft:kelp_top", "minecraft:kelp")) + })); + out.push((key(1488, 0), command_block_custom_name)); + out.push((key(1488, 0), command_block_minecart_custom_name)); + out.push((key(1488, 0), igloo_metadata_removal)); + out.push((key(1490, 0), |cx| { + legacy_block_rename(cx, &only("minecraft:melon_block", "minecraft:melon")) + })); + out.push((key(1490, 0), |cx| { + item_rename( + cx, + &table(&[ + ("minecraft:melon_block", "minecraft:melon"), + ("minecraft:melon", "minecraft:melon_slice"), + ("minecraft:speckled_melon", "minecraft:glistering_melon_slice"), + ]), + ) + })); + out.push((key(1492, 0), structure_template_rename)); + out.push((key(1494, 0), enchantment_names)); + out.push((key(1496, 0), |cx| cx.each(Ty::Chunk, chunk_leaves::leaves_fix))); + out.push((key(1500, 0), |cx| { + cx.block_entity("DUMMY", |be| set(be, "keepPacked", Tag::Byte(1))) + })); + out.push((key(1501, 0), advancements_rename)); + out.push((key(1502, 0), |cx| { + rename_names(cx, Ty::Recipe, &table(t::RECIPES)) + })); + out.push((key(1506, 0), level_generator_options)); + out.push((key(1510, 0), |cx| { + legacy_block_rename(cx, &table(t::THE_RENAMENING_BLOCKS)) + })); + out.push((key(1510, 0), |cx| item_rename(cx, &the_renamening_items))); + out.push((key(1510, 0), |cx| { + rename_names(cx, Ty::Recipe, &table(t::RECIPES_RENAMENING)) + })); + out.push((key(1510, 0), |cx| entity_rename(cx, &the_renamening_entities))); + out.push((key(1510, 0), swim_stats_rename)); + out.push((key(1514, 0), |cx| display_name_to_component(cx, Ty::Objective))); + out.push((key(1514, 0), |cx| display_name_to_component(cx, Ty::Team))); + out.push((key(1514, 0), objective_render_type)); + out.push((key(1515, 0), |cx| { + legacy_block_rename(cx, &table(t::CORAL_FANS)) + })); + out.push((key(1624, 0), |cx| { + cx.each(Ty::Chunk, chunk_leaves::trapped_chest_fix) + })); +} + +// ------------------------------------------------------------------ helpers + +fn lookup(table: &'static [(&'static str, &'static str)], k: &str) -> Option<&'static str> { + table.iter().find(|(from, _)| *from == k).map(|(_, to)| *to) +} + +/// `createRenamer(map)`: the id namespaced, looked up in a table. +fn table(entries: &'static [(&'static str, &'static str)]) -> impl Fn(&str) -> Option { + move |id| lookup(entries, &namespaced(id)).map(str::to_owned) +} + +/// `createRenamer(from, to)`. +fn only(from: &'static str, to: &'static str) -> impl Fn(&str) -> Option { + move |id| (namespaced(id) == from).then(|| to.to_owned()) +} + +fn rename_names(cx: &mut Cx, ty: Ty, f: &dyn Fn(&str) -> Option) { + cx.each(ty, |v| { + if let Some(name) = as_str(Some(v)) + && let Some(new) = f(&name) + { + *v = string(&new); + } + }); +} + +/// `ItemRenameFix`. +fn item_rename(cx: &mut Cx, f: &dyn Fn(&str) -> Option) { + rename_names(cx, Ty::ItemName, f); +} + +/// `LegacyBlockRenameFix`: block names, block states and flat block states. +fn legacy_block_rename(cx: &mut Cx, f: &dyn Fn(&str) -> Option) { + rename_names(cx, Ty::BlockName, f); + cx.each(Ty::BlockState, |s| { + if let Some(name) = as_str(s.get("Name")) + && let Some(new) = f(&name) + { + set(s, "Name", string(&new)); + } + }); + cx.each(Ty::FlatBlockState, |s| { + let Some(text) = as_str(Some(s)) else { + return; + }; + let mut end = text.len(); + if let Some(p) = text.find('[').filter(|p| *p > 0) { + end = p; + } + if let Some(n) = text.find('{').filter(|n| *n > 0) { + end = end.min(n); + } + if let Some(new) = f(&text[..end]) { + *s = string(&format!("{new}{}", &text[end..])); + } + }); +} + +/// `SimplestEntityRenameFix`: entity ids and entity names. +fn entity_rename(cx: &mut Cx, f: &dyn Fn(&str) -> Option) { + cx.each(Ty::Entity, |e| { + if let Some(id) = as_str(e.get("id")) + && let Some(new) = f(&namespaced(&id)) + { + set(e, "id", string(&new)); + } + }); + rename_names(cx, Ty::EntityName, f); +} + +fn the_renamening_entities(name: &str) -> Option { + let name = namespaced(name); + let name = match name.strip_prefix("minecraft:bred_") { + Some(rest) => format!("minecraft:{rest}"), + None => name, + }; + Some(lookup(t::THE_RENAMENING_ENTITIES, &name).map_or(name.clone(), str::to_owned)) +} + +fn the_renamening_items(name: &str) -> Option { + let name = namespaced(name); + if let Some(new) = lookup(t::THE_RENAMENING_BLOCKS, &name) { + return Some(new.to_owned()); + } + Some( + match name.as_str() { + "minecraft:clownfish" => "minecraft:tropical_fish", + "minecraft:chorus_fruit_popped" => "minecraft:popped_chorus_fruit", + "minecraft:evocation_illager_spawn_egg" => "minecraft:evoker_spawn_egg", + "minecraft:vindication_illager_spawn_egg" => "minecraft:vindicator_spawn_egg", + _ => return None, + } + .to_owned(), + ) +} + +/// `LegacyComponentDataFixUtils.createTextComponentJson`. +fn text_json(text: &str) -> Tag { + let units: Vec = text.encode_utf16().collect(); + Tag::String(JavaString(super::json::text_component_json(&units))) +} + +fn text_json_units(text: &JavaString) -> Tag { + Tag::String(JavaString(super::json::text_component_json(&text.0))) +} + +// ------------------------------------------------------------------ 1451.1 + +fn chunk_palettes(cx: &mut Cx) { + let k = cx.k; + cx.each(Ty::Chunk, |c| { + super::chunk_flatten::fix(c); + reread_as(Ty::Chunk, k, c); + }); +} + +// ------------------------------------------------------------------ 1451.2 + +fn piston_block_state(cx: &mut Cx) { + cx.block_entity("minecraft:piston", |be| { + let block = as_int(be.get("blockId"), 0); + remove(be, "blockId"); + let data = as_int(be.get("blockData"), 0) & 15; + remove(be, "blockData"); + // The new value is built from this remainder: it remembers it. + mark_read(be); + set(be, "blockState", bsd::get_tag(block << 4 | data)); + }); +} + +// ------------------------------------------------------------------ 1451.3 + +fn block_id(name: &str) -> i32 { + t::BLOCK_IDS + .iter() + .find(|(n, _)| *n == name) + .map_or(0, |(_, id)| *id) +} + +/// The block id of a `BLOCK_NAME` value (`Either`). +fn block_name_id(tile: &Tag) -> Option { + match tile { + Tag::String(s) => Some(block_id(&namespaced(&s.to_string_lossy()))), + other => as_number(other).map(|n| n.int_value()), + } +} + +/// `EntityBlockStateFix.updateBlockToBlockState`. The typed old field stays in +/// the remainder it was read from. +fn block_to_state(e: &mut Tag, old: &str, data_name: &str, new: &str) { + let block = e.get(old).and_then(block_name_id); + let data = as_int(e.get(data_name), 0) & 15; + if let Some(block) = block { + set(e, new, bsd::get_tag(block << 4 | data)); + } + remove(e, data_name); +} + +fn entity_block_state(cx: &mut Cx) { + cx.each(Ty::Entity, |e| { + let Some(id) = as_str(e.get("id")) else { + return; + }; + match namespaced(&id).as_str() { + "minecraft:falling_block" => { + let block = match e.get("Block") { + Some(tile) => block_name_id(tile).unwrap_or(0), + None => match e.get("TileID").and_then(as_number) { + Some(n) => n.int_value(), + None => as_int(e.get("Tile"), 0) as i8 as u8 as i32, + }, + }; + let data = as_int(e.get("Data"), 0) & 15; + set(e, "BlockState", bsd::get_tag(block << 4 | data)); + for f in ["Data", "TileID", "Tile"] { + remove(e, f); + } + } + "minecraft:enderman" => block_to_state(e, "carried", "carriedData", "carriedBlockState"), + "minecraft:arrow" | "minecraft:spectral_arrow" => { + block_to_state(e, "inTile", "inData", "inBlockState") + } + "minecraft:commandblock_minecart" + | "minecraft:minecart" + | "minecraft:chest_minecart" + | "minecraft:furnace_minecart" + | "minecraft:tnt_minecart" + | "minecraft:hopper_minecart" + | "minecraft:spawner_minecart" => { + block_to_state(e, "DisplayTile", "DisplayData", "DisplayState") + } + _ => {} + } + }); +} + +fn map_id(cx: &mut Cx) { + cx.item( + |id| id == "minecraft:filled_map", + |s| { + let damage = as_int(s.get("Damage"), 0); + if !matches!(s.get("tag"), Some(Tag::Compound(_))) { + set(s, "tag", empty_map()); + } + if let Some(tag) = s.get_mut("tag") { + set(tag, "map", Tag::Int(damage)); + } + }, + ); +} + +// ------------------------------------------------------------------ 1451.4 + +fn block_name_flattening(cx: &mut Cx) { + cx.each(Ty::BlockName, |v| { + let name = match &*v { + Tag::String(s) => bsd::upgrade_block_name(&namespaced(&s.to_string_lossy())), + other => match as_number(other) { + Some(n) => bsd::upgrade_block_id(n.int_value()), + None => return, + }, + }; + *v = string(&name); + }); +} + +/// `ItemStackTheFlatteningFix.updateItem`. +fn update_item(name: &str, data: i32) -> Option<&'static str> { + static MAP: OnceLock<(HashMap<&'static str, &'static str>, Vec<&'static str>)> = OnceLock::new(); + let (map, ids) = MAP.get_or_init(|| { + let map: HashMap<_, _> = t::ITEM_FLATTENING.iter().copied().collect(); + let mut ids: Vec<&str> = t::ITEM_FLATTENING + .iter() + .map(|(k, _)| &k[..k.find('.').expect("dot")]) + .collect(); + ids.sort_unstable(); + ids.dedup(); + (map, ids) + }); + if ids.binary_search(&name).is_err() { + return None; + } + map.get(format!("{name}.{data}").as_str()) + .or_else(|| map.get(format!("{name}.0").as_str())) + .copied() +} + +fn item_flattening(cx: &mut Cx) { + cx.each(Ty::ItemStack, |s| { + let Some(id) = as_str(s.get("id")) else { + return; + }; + let id = namespaced(&id); + let data = as_int(s.get("Damage"), 0); + if let Some(new) = update_item(&id, data) { + set(s, "id", string(new)); + } + if t::ITEM_DAMAGE_IDS.contains(&id.as_str()) { + if !matches!(s.get("tag"), Some(Tag::Compound(_))) { + set(s, "tag", empty_map()); + } + if let Some(tag) = s.get_mut("tag") { + set(tag, "Damage", Tag::Int(data)); + } + } + remove(s, "Damage"); + }); +} + +// ------------------------------------------------------------------ 1451.5 + +const DROPPED_BLOCK_ENTITIES: [&str; 2] = ["minecraft:noteblock", "minecraft:flower_pot"]; + +fn dropped_block_entity(tag: Option<&Tag>) -> bool { + tag.and_then(|be| as_str(be.get("id"))) + .is_some_and(|id| DROPPED_BLOCK_ENTITIES.contains(&namespaced(&id).as_str())) +} + +/// `RemoveBlockEntityTagFix` (legacy data structure). +fn remove_block_entity_tags(cx: &mut Cx) { + cx.each(Ty::ItemStack, |s| { + if let Some(tag) = s.get_mut("tag") + && dropped_block_entity(tag.get("BlockEntityTag")) + { + remove(tag, "BlockEntityTag"); + } + }); + cx.entity("minecraft:falling_block", |e| { + if dropped_block_entity(e.get("TileEntityData")) { + remove(e, "TileEntityData"); + } + }); +} + +fn spawn_eggs(cx: &mut Cx) { + cx.item( + |id| id == "minecraft:spawn_egg", + |s| { + let entity_id = s + .get("tag") + .and_then(|t| t.get("EntityTag")) + .and_then(|e| as_str(e.get("id"))); + if let Some(entity_id) = entity_id { + let egg = lookup(t::SPAWN_EGGS, &namespaced(&entity_id)) + .unwrap_or("minecraft:pig_spawn_egg"); + set(s, "id", string(egg)); + } + }, + ); +} + +fn banner_color(cx: &mut Cx) { + cx.block_entity("minecraft:banner", |be| { + if let Some(base) = be.get("Base") { + let color = 15 - as_int(Some(base), 0); + set(be, "Base", Tag::Int(color)); + } + if is_list(be.get("Patterns")) { + let patterns: Vec = stream(be.get("Patterns")) + .into_iter() + .map(|mut p| { + if let Some(c) = p.get("Color") { + let color = 15 - as_int(Some(c), 0); + set(&mut p, "Color", Tag::Int(color)); + } + p + }) + .collect(); + set(be, "Patterns", Tag::List(patterns)); + } + }); +} + +/// Guava `Splitter.on(sep).limit(n)` over a string (empty parts kept). +fn split_limit(s: &str, sep: char, limit: usize) -> Vec<&str> { + s.splitn(limit, sep).collect() +} + +/// `NumberUtils.toInt(s, default)`. +fn to_int(s: &str, default: i32) -> i32 { + s.parse::().unwrap_or(default) +} + +const DEFAULT_FLAT: &str = "minecraft:bedrock,2*minecraft:dirt,minecraft:grass_block;1;village"; + +/// `LevelFlatGeneratorInfoFix.fixString`. +fn flat_generator_string(options: &str) -> String { + if options.is_empty() { + return DEFAULT_FLAT.to_owned(); + } + let mut parts = split_limit(options, ';', 5).into_iter(); + let first = parts.next().unwrap_or(""); + let rest: Vec<&str> = parts.collect(); + let (version, layer_info, rest) = match rest.split_first() { + Some((layers, rest)) => (to_int(first, 0), *layers, rest.to_vec()), + None => (0, first, Vec::new()), + }; + if !(0..=3).contains(&version) { + return DEFAULT_FLAT.to_owned(); + } + let layers: Vec = layer_info + .split(',') + .map(|layer| { + let amount: Vec<&str> = if version < 3 { + split_limit(layer, 'x', 2) + } else { + split_limit(layer, '*', 2) + }; + let (height, layer_type) = if amount.len() == 2 { + (to_int(amount[0], 0), amount[1]) + } else { + (1, amount[0]) + }; + let block_parts = split_limit(layer_type, ':', 3); + let name_index = usize::from(block_parts[0] == "minecraft"); + let block_string = block_parts.get(name_index).copied().unwrap_or(""); + let block = if version == 3 { + block_id(&format!("minecraft:{block_string}")) + } else { + to_int(block_string, 0) + }; + let data_index = name_index + 1; + let data = block_parts + .get(data_index) + .map_or(0, |d| to_int(d, 0)); + let tag = bsd::get_tag(block << 4 | data); + let name = as_str(tag.get("Name")).unwrap_or_default(); + format!( + "{}{name}", + if height == 1 { + String::new() + } else { + format!("{height}*") + } + ) + }) + .collect(); + let mut result = layers.join(","); + for part in rest { + result.push(';'); + result.push_str(part); + } + result +} + +fn flat_generator_info(cx: &mut Cx) { + cx.each(Ty::Level, |l| { + if !as_str(l.get("generatorName")).is_some_and(|n| n.eq_ignore_ascii_case("flat")) { + return; + } + if let Some(options) = as_str(l.get("generatorOptions")) { + set(l, "generatorOptions", string(&flat_generator_string(&options))); + } + }); +} + +// ------------------------------------------------------------------ 1451.6 + +/// `V1451_6.packNamespacedWithDot`. +fn pack_namespaced_with_dot(location: &str) -> String { + match super::identifier(location) { + Some((ns, path)) => format!("{ns}.{path}"), + None => location.to_owned(), + } +} + +/// `StatsCounterFix.unpackLegacyKey`: the stat type and its key. +fn unpack_legacy_key(k: &str) -> Option<(String, String)> { + if t::STATS_SKIP.contains(&k) { + return None; + } + if let Some(custom) = lookup(t::STATS_CUSTOM, k) { + return Some(("minecraft:custom".to_owned(), custom.to_owned())); + } + // StringUtils.ordinalIndexOf(key, ".", 2) + let mut dots = k.match_indices('.'); + let split = dots.nth(1)?.0; + let prefix = &k[..split]; + let rest = k[split + 1..].replace('.', ":"); + if prefix == "stat.mineBlock" { + return Some(( + "minecraft:mined".to_owned(), + bsd::upgrade_block_name(&rest), + )); + } + if let Some(item_key) = lookup(t::STATS_ITEM_KEYS, prefix) { + let new = update_item(&rest, 0).map_or(rest.clone(), str::to_owned); + return Some((item_key.to_owned(), new)); + } + if let Some(entity_key) = lookup(t::STATS_ENTITY_KEYS, prefix) { + let new = lookup(t::STATS_ENTITIES, &rest).map_or(rest.clone(), str::to_owned); + return Some((entity_key.to_owned(), new)); + } + None +} + +fn stats_counters(cx: &mut Cx) { + cx.each(Ty::Stats, |stats| { + let mut new: Vec<(String, Compound)> = Vec::new(); + if let Tag::Compound(c) = &*stats { + for (k, v) in c { + if as_number(v).is_none() { + continue; + } + let Some((ty, ty_key)) = unpack_legacy_key(&k.to_string_lossy()) else { + continue; + }; + let slot = match new.iter().position(|(t, _)| *t == ty) { + Some(i) => i, + None => { + new.push((ty, Compound::new())); + new.len() - 1 + } + }; + new[slot].1.insert(super::dynamic::key(&ty_key), v.clone()); + } + } + let map: Compound = new + .into_iter() + .map(|(ty, entries)| (super::dynamic::key(&ty), Tag::Compound(entries))) + .collect(); + *stats = Tag::compound([("stats", Tag::Compound(map))]); + }); + cx.each(Ty::Objective, |o| { + // The output schema reads the objective again: its read hook unpacks the name. + remove(o, "CriteriaType"); + if let Some(name) = as_str(o.get("CriteriaName")) { + let new = if t::SPECIAL_OBJECTIVE_CRITERIA.contains(&name.as_str()) { + name + } else { + match unpack_legacy_key(&name) { + None => "dummy".to_owned(), + Some((ty, ty_key)) => format!( + "{}:{}", + pack_namespaced_with_dot(&ty), + pack_namespaced_with_dot(&ty_key) + ), + } + }; + set(o, "CriteriaName", string(&new)); + } + super::fixes_a::unpack_objective(o); + }); +} + +fn jukebox_record(cx: &mut Cx) { + cx.block_entity("minecraft:jukebox", |be| { + let record = as_int(be.get("Record"), 0); + if record <= 0 { + return; + } + let name = t::ITEM_IDS + .iter() + .find(|(id, _)| *id == record) + .map_or("minecraft:air", |(_, n)| *n); + if let Some(id) = update_item(name, 0) { + // `tag.remove("Record")` is not kept: Dynamics are immutable. + let mut stack = Tag::compound([("id", string(id)), ("Count", Tag::Byte(1))]); + items::add_names(&mut stack); + set(be, "RecordItem", stack); + } + }); +} + +// ------------------------------------------------------------------ 1451.7 + +fn villager_trades(cx: &mut Cx) { + cx.each(Ty::VillagerTrade, |trade| { + for f in ["buy", "buyB", "sell"] { + if let Some(stack) = trade.get_mut(f) + && as_str(stack.get("id")).is_some_and(|id| id == "minecraft:carved_pumpkin") + { + set(stack, "id", string("minecraft:pumpkin")); + } + } + }); +} + +// ------------------------------------------------------------------ 1458 + +fn entity_custom_name(cx: &mut Cx) { + let k = cx.k; + cx.each(Ty::Entity, |e| { + let Some(Tag::String(name)) = e.get("CustomName").cloned() else { + return; + }; + if name.0.is_empty() { + remove(e, "CustomName"); + reread(k, e); + return; + } + let id = as_str(e.get("id")).unwrap_or_default(); + let component = if id == "minecraft:commandblock_minecart" { + Tag::String(name) + } else { + text_json_units(&name) + }; + set(e, "CustomName", component); + }); +} + +fn item_custom_name(cx: &mut Cx) { + cx.each(Ty::ItemStack, |s| { + if let Some(display) = s.get_mut("tag").and_then(|t| t.get_mut("display")) + && let Some(Tag::String(name)) = display.get("Name").cloned() + { + set(display, "Name", text_json_units(&name)); + } + }); +} + +const NAMEABLE_BLOCK_ENTITIES: [&str; 11] = [ + "minecraft:beacon", + "minecraft:banner", + "minecraft:brewing_stand", + "minecraft:chest", + "minecraft:trapped_chest", + "minecraft:dispenser", + "minecraft:dropper", + "minecraft:enchanting_table", + "minecraft:furnace", + "minecraft:hopper", + "minecraft:shulker_box", +]; + +/// `BlockEntityCustomNameToComponentFix.fixTagCustomName`. +fn fix_tag_custom_name(tag: &mut Tag) { + let name = match tag.get("CustomName") { + Some(Tag::String(s)) => s.clone(), + _ => JavaString(Vec::new()), + }; + if name.0.is_empty() { + remove(tag, "CustomName"); + } else { + set(tag, "CustomName", text_json_units(&name)); + } +} + +fn block_entity_custom_name(cx: &mut Cx) { + let k = cx.k; + cx.each(Ty::BlockEntity, |be| { + if let Some(id) = as_str(be.get("id")) + && !NAMEABLE_BLOCK_ENTITIES.contains(&namespaced(&id).as_str()) + { + return; + } + fix_tag_custom_name(be); + reread_as(Ty::BlockEntity, k, be); + }); +} + +// ------------------------------------------------------------------ 1460 + +fn painting_motive(cx: &mut Cx) { + cx.entity("minecraft:painting", |e| { + if let Some(motive) = as_str(e.get("Motive")) { + let lower = motive.to_lowercase(); + let mapped = match lower.as_str() { + "donkeykong" => "donkey_kong", + "burningskull" => "burning_skull", + "skullandroses" => "skull_and_roses", + other => other, + }; + set(e, "Motive", string(&namespaced(mapped))); + } + }); +} + +// ------------------------------------------------------------------ 1466 + +fn chunk_to_protochunk(cx: &mut Cx) { + let k = cx.k; + cx.each(Ty::Chunk, |chunk| { + if let Some(level) = chunk.get_mut("Level") { + fix_protochunk_level(level); + } + reread_as(Ty::Chunk, k, chunk); + }); +} + +fn fix_protochunk_level(tag: &mut Tag) { + let terrain_populated = super::dynamic::as_bool(tag.get("TerrainPopulated"), false); + let light_populated = match tag.get("LightPopulated").and_then(as_number) { + None => true, + Some(_) => super::dynamic::as_bool(tag.get("LightPopulated"), false), + }; + let status = if terrain_populated { + if light_populated { + "mobs_spawned" + } else { + "decorated" + } + } else { + "carved" + }; + // repackBiomes + if let Some(buffer) = super::dynamic::as_byte_buffer(tag.get("Biomes")) { + let biomes: Vec = (0..256) + .map(|i| buffer.get(i).map_or(0, |b| i32::from(*b))) + .collect(); + set(tag, "Biomes", Tag::IntArray(biomes)); + } + // repackTicks + if is_list(tag.get("TileTicks")) { + let mut to_be_ticked: Vec> = vec![Vec::new(); 16]; + for tick in stream(tag.get("TileTicks")) { + let x = as_int(tick.get("x"), 0); + let y = as_int(tick.get("y"), 0); + let z = as_int(tick.get("z"), 0); + let packed = (x & 15 | (y & 15) << 4 | (z & 15) << 8) as i16; + if let Some(list) = usize::try_from(y >> 4) + .ok() + .and_then(|i| to_be_ticked.get_mut(i)) + { + list.push(Tag::Short(packed)); + } + } + remove(tag, "TileTicks"); + set( + tag, + "ToBeTicked", + Tag::List(to_be_ticked.into_iter().map(Tag::List).collect()), + ); + } + set(tag, "Status", string(status)); + set(tag, "hasLegacyStructureData", Tag::Byte(1)); +} + +// ------------------------------------------------------------------ 1484 + +fn heightmap_renaming(cx: &mut Cx) { + cx.each(Ty::Chunk, |chunk| { + let Some(level) = chunk.get_mut("Level") else { + return; + }; + let Some(heightmaps) = level.get_mut("Heightmaps") else { + return; + }; + let mut moves: Vec<(&str, &[&str])> = vec![ + ("LIQUID", &["WORLD_SURFACE_WG"]), + ("SOLID", &["OCEAN_FLOOR_WG", "OCEAN_FLOOR"]), + ("LIGHT", &["LIGHT_BLOCKING"]), + ("RAIN", &["MOTION_BLOCKING", "MOTION_BLOCKING_NO_LEAVES"]), + ]; + for (from, to) in moves.drain(..) { + if let Some(value) = remove(heightmaps, from) { + for name in to { + set(heightmaps, name, value.clone()); + } + } + } + }); +} + +// ------------------------------------------------------------------ 1488 + +fn command_block_custom_name(cx: &mut Cx) { + let k = cx.k; + cx.block_entity("minecraft:command_block", |be| { + fix_tag_custom_name(be); + reread_as(Ty::BlockEntity, k, be); + }); +} + +fn command_block_minecart_custom_name(cx: &mut Cx) { + cx.entity("minecraft:commandblock_minecart", |e| { + if let Some(Tag::String(name)) = e.get("CustomName").cloned() { + set(e, "CustomName", text_json_units(&name)); + } + }); +} + +fn is_igloo_piece(tag: &Tag) -> bool { + as_str(tag.get("id")).unwrap_or_default() == "Iglu" +} + +fn igloo_metadata_removal(cx: &mut Cx) { + cx.each(Ty::StructureFeature, |feature| { + let only_igloo = is_list(feature.get("Children")) + && stream(feature.get("Children")).iter().all(is_igloo_piece); + if only_igloo { + set(feature, "id", string("Igloo")); + remove(feature, "Children"); + } else if is_list(feature.get("Children")) { + let kept: Vec = stream(feature.get("Children")) + .into_iter() + .filter(|c| !is_igloo_piece(c)) + .collect(); + set(feature, "Children", Tag::List(kept)); + } + }); +} + +// ------------------------------------------------------------------ 1492 + +fn structure_template_rename(cx: &mut Cx) { + cx.each(Ty::StructureFeature, |structure| { + if structure.get("Children").is_none() { + return; + } + let id = as_str(structure.get("id")).unwrap_or_default(); + let rename = t::STRUCTURE_TEMPLATE_RENAMES + .iter() + .find(|(s, _, _)| *s == id); + let children: Vec = stream(structure.get("Children")) + .into_iter() + .map(|mut child| { + if let Some((_, child_id, templates)) = rename + && as_str(child.get("id")).unwrap_or_default() == *child_id + { + let template = as_str(child.get("Template")).unwrap_or_default(); + let new = templates + .iter() + .find(|(from, _)| *from == template) + .map_or(template.as_str(), |(_, to)| *to); + set(&mut child, "Template", string(new)); + } + child + }) + .collect(); + set(structure, "Children", Tag::List(children)); + }); +} + +// ------------------------------------------------------------------ 1494 + +fn enchantment_names(cx: &mut Cx) { + let name = |e: &Tag| { + let id = as_int(e.get("id"), 0); + t::ENCHANTMENTS + .iter() + .find(|(i, _)| *i == id) + .map_or("null", |(_, n)| *n) + }; + cx.each(Ty::ItemStack, |s| { + let Some(tag) = s.get_mut("tag") else { + return; + }; + if is_list(tag.get("ench")) { + let list: Vec = stream(tag.get("ench")) + .into_iter() + .map(|mut e| { + let n = name(&e); + set(&mut e, "id", string(n)); + e + }) + .collect(); + remove(tag, "ench"); + set(tag, "Enchantments", Tag::List(list)); + } + if is_list(tag.get("StoredEnchantments")) { + let list: Vec = stream(tag.get("StoredEnchantments")) + .into_iter() + .map(|mut e| { + let n = name(&e); + set(&mut e, "id", string(n)); + e + }) + .collect(); + set(tag, "StoredEnchantments", Tag::List(list)); + } + }); +} + +// ------------------------------------------------------------------ 1501 + +fn advancements_rename(cx: &mut Cx) { + cx.each(Ty::Advancements, |adv| { + let Tag::Compound(c) = adv else { + return; + }; + let entries: Vec<_> = std::mem::take(c).into_iter().collect(); + for (k, v) in entries { + let name = k.to_string_lossy(); + let renamed = lookup(t::ADVANCEMENTS, &name).map_or(k, super::dynamic::key); + c.insert(renamed, v); + } + }); +} + +// ------------------------------------------------------------------ 1506 + +/// Java `String.split(regex)` with a literal separator and a limit of 0 (trailing +/// empty strings removed) or a positive limit. +fn java_split<'a>(s: &'a str, sep: &str, limit: usize) -> Vec<&'a str> { + let mut parts: Vec<&str> = if limit > 0 { + s.splitn(limit, sep).collect() + } else { + s.split(sep).collect() + }; + if limit == 0 { + while parts.len() > 1 && parts.last().is_some_and(|p| p.is_empty()) { + parts.pop(); + } + if parts.len() == 1 && parts[0].is_empty() && !s.is_empty() { + parts.clear(); + } + } + parts +} + +fn layers_info(input: &str) -> Vec<(i32, String)> { + let mut result = Vec::new(); + for depth in java_split(input, ",", 0) { + let parts = java_split(depth, "*", 2); + let height = if parts.len() == 2 { + match parts[0].parse::() { + Ok(h) => h, + Err(_) => return Vec::new(), + } + } else { + 1 + }; + result.push((height, parts[parts.len() - 1].to_owned())); + } + result +} + +/// `LevelDataGeneratorOptionsFix.convert`. +fn flat_options(flat: &str) -> Tag { + let mut parts = flat.split(';'); + let mut biome = "minecraft:plains".to_owned(); + let mut structures: Vec<(String, Vec<(String, String)>)> = Vec::new(); + let layers: Vec<(i32, String)>; + let first = parts.next(); + if !flat.is_empty() && first.is_some() { + layers = layers_info(first.unwrap_or("")); + if !layers.is_empty() { + if let Some(b) = parts.next() { + biome = lookup(t::GENERATOR_BIOMES, b) + .unwrap_or("minecraft:plains") + .to_owned(); + } + if let Some(list) = parts.next() { + for structure in java_split(&list.to_lowercase(), ",", 0) { + let separated = java_split(structure, "(", 2); + if separated.is_empty() || separated[0].is_empty() { + continue; + } + let mut options = Vec::new(); + if separated.len() > 1 && separated[1].ends_with(')') && separated[1].len() > 1 { + let inner = &separated[1][..separated[1].len() - 1]; + for part in java_split(inner, " ", 0) { + let split = java_split(part, "=", 2); + if split.len() == 2 { + options.push((split[0].to_owned(), split[1].to_owned())); + } + } + } + structures.retain(|(n, _)| n != separated[0]); + structures.push((separated[0].to_owned(), options)); + } + } else { + structures.push(("village".to_owned(), Vec::new())); + } + } + } else { + layers = vec![ + (1, "minecraft:bedrock".to_owned()), + (2, "minecraft:dirt".to_owned()), + (1, "minecraft:grass_block".to_owned()), + ]; + structures.push(("village".to_owned(), Vec::new())); + } + let layers = Tag::List( + layers + .into_iter() + .map(|(h, b)| Tag::compound([("height", Tag::Int(h)), ("block", string(&b))])) + .collect(), + ); + let structures: Compound = structures + .into_iter() + .map(|(name, options)| { + let options: Compound = options + .into_iter() + .map(|(k, v)| (super::dynamic::key(&k), string(&v))) + .collect(); + (super::dynamic::key(&name.to_lowercase()), Tag::Compound(options)) + }) + .collect(); + Tag::compound([ + ("layers", layers), + ("biome", string(&biome)), + ("structures", Tag::Compound(structures)), + ]) +} + +fn level_generator_options(cx: &mut Cx) { + let k = cx.k; + cx.each(Ty::Level, |level| { + let options = as_str(level.get("generatorOptions")); + let name = as_str(level.get("generatorName")).unwrap_or_default(); + if name.eq_ignore_ascii_case("flat") { + let converted = flat_options(options.as_deref().unwrap_or("")); + set(level, "generatorOptions", converted); + } else if name.eq_ignore_ascii_case("buffet") + && let Some(options) = options + { + let units: Vec = options.encode_utf16().collect(); + if let Some(json) = super::json::parse_lenient(&units) + && let Some(tag) = super::json::to_nbt(&json) + { + set(level, "generatorOptions", tag); + } + } + let _ = k; + }); +} + +// ------------------------------------------------------------------ 1510, 1514 + +fn swim_stats_rename(cx: &mut Cx) { + const RENAMES: &[(&str, &str)] = &[ + ("minecraft:swim_one_cm", "minecraft:walk_on_water_one_cm"), + ("minecraft:dive_one_cm", "minecraft:walk_under_water_one_cm"), + ]; + cx.each(Ty::Stats, |stats| { + if let Some(custom) = stats + .get_mut("stats") + .and_then(|s| s.get_mut("minecraft:custom")) + && let Tag::Compound(c) = custom + { + let entries: Vec<_> = std::mem::take(c).into_iter().collect(); + for (k, v) in entries { + let renamed = lookup(RENAMES, &k.to_string_lossy()).map_or(k, super::dynamic::key); + c.insert(renamed, v); + } + } + }); + cx.each(Ty::Objective, |o| { + if let Some(ct) = o.get_mut("CriteriaType") + && as_str(ct.get("type")).as_deref() == Some("minecraft:custom") + && let Some(id) = as_str(ct.get("id")) + && let Some(new) = lookup(RENAMES, &id) + { + set(ct, "id", string(new)); + } + }); +} + +fn display_name_to_component(cx: &mut Cx, ty: Ty) { + cx.each(ty, |v| { + if let Some(Tag::String(name)) = v.get("DisplayName").cloned() { + set(v, "DisplayName", text_json_units(&name)); + } + }); +} + +fn objective_render_type(cx: &mut Cx) { + cx.each(Ty::Objective, |o| { + if as_str(o.get("RenderType")).is_none() { + let criteria = as_str(o.get("CriteriaName")).unwrap_or_default(); + let render = if criteria == "health" { + "hearts" + } else { + "integer" + }; + set(o, "RenderType", string(render)); + } + }); +} + +#[allow(dead_code)] +fn unused(_: &Tag) -> bool { + let _ = (text_json, id_is); + false +} diff --git a/crates/horizon-world/src/datafix/flat_tables.rs b/crates/horizon-world/src/datafix/flat_tables.rs new file mode 100644 index 000000000..590a6c795 --- /dev/null +++ b/crates/horizon-world/src/datafix/flat_tables.rs @@ -0,0 +1,1574 @@ +//! Lookup tables of the DataFixers of 1.13 (DataVersion 1343 to 1631), copied from vanilla's +//! sources by `tools/gen_flat_tables.py`. Do not edit. + + +/// `ItemStackTheFlatteningFix.MAP`: `id.damage` to the flattened item. +pub static ITEM_FLATTENING: &[(&str, &str)] = &[ + ("minecraft:stone.0", "minecraft:stone"), + ("minecraft:stone.1", "minecraft:granite"), + ("minecraft:stone.2", "minecraft:polished_granite"), + ("minecraft:stone.3", "minecraft:diorite"), + ("minecraft:stone.4", "minecraft:polished_diorite"), + ("minecraft:stone.5", "minecraft:andesite"), + ("minecraft:stone.6", "minecraft:polished_andesite"), + ("minecraft:dirt.0", "minecraft:dirt"), + ("minecraft:dirt.1", "minecraft:coarse_dirt"), + ("minecraft:dirt.2", "minecraft:podzol"), + ("minecraft:leaves.0", "minecraft:oak_leaves"), + ("minecraft:leaves.1", "minecraft:spruce_leaves"), + ("minecraft:leaves.2", "minecraft:birch_leaves"), + ("minecraft:leaves.3", "minecraft:jungle_leaves"), + ("minecraft:leaves2.0", "minecraft:acacia_leaves"), + ("minecraft:leaves2.1", "minecraft:dark_oak_leaves"), + ("minecraft:log.0", "minecraft:oak_log"), + ("minecraft:log.1", "minecraft:spruce_log"), + ("minecraft:log.2", "minecraft:birch_log"), + ("minecraft:log.3", "minecraft:jungle_log"), + ("minecraft:log2.0", "minecraft:acacia_log"), + ("minecraft:log2.1", "minecraft:dark_oak_log"), + ("minecraft:sapling.0", "minecraft:oak_sapling"), + ("minecraft:sapling.1", "minecraft:spruce_sapling"), + ("minecraft:sapling.2", "minecraft:birch_sapling"), + ("minecraft:sapling.3", "minecraft:jungle_sapling"), + ("minecraft:sapling.4", "minecraft:acacia_sapling"), + ("minecraft:sapling.5", "minecraft:dark_oak_sapling"), + ("minecraft:planks.0", "minecraft:oak_planks"), + ("minecraft:planks.1", "minecraft:spruce_planks"), + ("minecraft:planks.2", "minecraft:birch_planks"), + ("minecraft:planks.3", "minecraft:jungle_planks"), + ("minecraft:planks.4", "minecraft:acacia_planks"), + ("minecraft:planks.5", "minecraft:dark_oak_planks"), + ("minecraft:sand.0", "minecraft:sand"), + ("minecraft:sand.1", "minecraft:red_sand"), + ("minecraft:quartz_block.0", "minecraft:quartz_block"), + ("minecraft:quartz_block.1", "minecraft:chiseled_quartz_block"), + ("minecraft:quartz_block.2", "minecraft:quartz_pillar"), + ("minecraft:anvil.0", "minecraft:anvil"), + ("minecraft:anvil.1", "minecraft:chipped_anvil"), + ("minecraft:anvil.2", "minecraft:damaged_anvil"), + ("minecraft:wool.0", "minecraft:white_wool"), + ("minecraft:wool.1", "minecraft:orange_wool"), + ("minecraft:wool.2", "minecraft:magenta_wool"), + ("minecraft:wool.3", "minecraft:light_blue_wool"), + ("minecraft:wool.4", "minecraft:yellow_wool"), + ("minecraft:wool.5", "minecraft:lime_wool"), + ("minecraft:wool.6", "minecraft:pink_wool"), + ("minecraft:wool.7", "minecraft:gray_wool"), + ("minecraft:wool.8", "minecraft:light_gray_wool"), + ("minecraft:wool.9", "minecraft:cyan_wool"), + ("minecraft:wool.10", "minecraft:purple_wool"), + ("minecraft:wool.11", "minecraft:blue_wool"), + ("minecraft:wool.12", "minecraft:brown_wool"), + ("minecraft:wool.13", "minecraft:green_wool"), + ("minecraft:wool.14", "minecraft:red_wool"), + ("minecraft:wool.15", "minecraft:black_wool"), + ("minecraft:carpet.0", "minecraft:white_carpet"), + ("minecraft:carpet.1", "minecraft:orange_carpet"), + ("minecraft:carpet.2", "minecraft:magenta_carpet"), + ("minecraft:carpet.3", "minecraft:light_blue_carpet"), + ("minecraft:carpet.4", "minecraft:yellow_carpet"), + ("minecraft:carpet.5", "minecraft:lime_carpet"), + ("minecraft:carpet.6", "minecraft:pink_carpet"), + ("minecraft:carpet.7", "minecraft:gray_carpet"), + ("minecraft:carpet.8", "minecraft:light_gray_carpet"), + ("minecraft:carpet.9", "minecraft:cyan_carpet"), + ("minecraft:carpet.10", "minecraft:purple_carpet"), + ("minecraft:carpet.11", "minecraft:blue_carpet"), + ("minecraft:carpet.12", "minecraft:brown_carpet"), + ("minecraft:carpet.13", "minecraft:green_carpet"), + ("minecraft:carpet.14", "minecraft:red_carpet"), + ("minecraft:carpet.15", "minecraft:black_carpet"), + ("minecraft:hardened_clay.0", "minecraft:terracotta"), + ("minecraft:stained_hardened_clay.0", "minecraft:white_terracotta"), + ("minecraft:stained_hardened_clay.1", "minecraft:orange_terracotta"), + ("minecraft:stained_hardened_clay.2", "minecraft:magenta_terracotta"), + ("minecraft:stained_hardened_clay.3", "minecraft:light_blue_terracotta"), + ("minecraft:stained_hardened_clay.4", "minecraft:yellow_terracotta"), + ("minecraft:stained_hardened_clay.5", "minecraft:lime_terracotta"), + ("minecraft:stained_hardened_clay.6", "minecraft:pink_terracotta"), + ("minecraft:stained_hardened_clay.7", "minecraft:gray_terracotta"), + ("minecraft:stained_hardened_clay.8", "minecraft:light_gray_terracotta"), + ("minecraft:stained_hardened_clay.9", "minecraft:cyan_terracotta"), + ("minecraft:stained_hardened_clay.10", "minecraft:purple_terracotta"), + ("minecraft:stained_hardened_clay.11", "minecraft:blue_terracotta"), + ("minecraft:stained_hardened_clay.12", "minecraft:brown_terracotta"), + ("minecraft:stained_hardened_clay.13", "minecraft:green_terracotta"), + ("minecraft:stained_hardened_clay.14", "minecraft:red_terracotta"), + ("minecraft:stained_hardened_clay.15", "minecraft:black_terracotta"), + ("minecraft:silver_glazed_terracotta.0", "minecraft:light_gray_glazed_terracotta"), + ("minecraft:stained_glass.0", "minecraft:white_stained_glass"), + ("minecraft:stained_glass.1", "minecraft:orange_stained_glass"), + ("minecraft:stained_glass.2", "minecraft:magenta_stained_glass"), + ("minecraft:stained_glass.3", "minecraft:light_blue_stained_glass"), + ("minecraft:stained_glass.4", "minecraft:yellow_stained_glass"), + ("minecraft:stained_glass.5", "minecraft:lime_stained_glass"), + ("minecraft:stained_glass.6", "minecraft:pink_stained_glass"), + ("minecraft:stained_glass.7", "minecraft:gray_stained_glass"), + ("minecraft:stained_glass.8", "minecraft:light_gray_stained_glass"), + ("minecraft:stained_glass.9", "minecraft:cyan_stained_glass"), + ("minecraft:stained_glass.10", "minecraft:purple_stained_glass"), + ("minecraft:stained_glass.11", "minecraft:blue_stained_glass"), + ("minecraft:stained_glass.12", "minecraft:brown_stained_glass"), + ("minecraft:stained_glass.13", "minecraft:green_stained_glass"), + ("minecraft:stained_glass.14", "minecraft:red_stained_glass"), + ("minecraft:stained_glass.15", "minecraft:black_stained_glass"), + ("minecraft:stained_glass_pane.0", "minecraft:white_stained_glass_pane"), + ("minecraft:stained_glass_pane.1", "minecraft:orange_stained_glass_pane"), + ("minecraft:stained_glass_pane.2", "minecraft:magenta_stained_glass_pane"), + ("minecraft:stained_glass_pane.3", "minecraft:light_blue_stained_glass_pane"), + ("minecraft:stained_glass_pane.4", "minecraft:yellow_stained_glass_pane"), + ("minecraft:stained_glass_pane.5", "minecraft:lime_stained_glass_pane"), + ("minecraft:stained_glass_pane.6", "minecraft:pink_stained_glass_pane"), + ("minecraft:stained_glass_pane.7", "minecraft:gray_stained_glass_pane"), + ("minecraft:stained_glass_pane.8", "minecraft:light_gray_stained_glass_pane"), + ("minecraft:stained_glass_pane.9", "minecraft:cyan_stained_glass_pane"), + ("minecraft:stained_glass_pane.10", "minecraft:purple_stained_glass_pane"), + ("minecraft:stained_glass_pane.11", "minecraft:blue_stained_glass_pane"), + ("minecraft:stained_glass_pane.12", "minecraft:brown_stained_glass_pane"), + ("minecraft:stained_glass_pane.13", "minecraft:green_stained_glass_pane"), + ("minecraft:stained_glass_pane.14", "minecraft:red_stained_glass_pane"), + ("minecraft:stained_glass_pane.15", "minecraft:black_stained_glass_pane"), + ("minecraft:prismarine.0", "minecraft:prismarine"), + ("minecraft:prismarine.1", "minecraft:prismarine_bricks"), + ("minecraft:prismarine.2", "minecraft:dark_prismarine"), + ("minecraft:concrete.0", "minecraft:white_concrete"), + ("minecraft:concrete.1", "minecraft:orange_concrete"), + ("minecraft:concrete.2", "minecraft:magenta_concrete"), + ("minecraft:concrete.3", "minecraft:light_blue_concrete"), + ("minecraft:concrete.4", "minecraft:yellow_concrete"), + ("minecraft:concrete.5", "minecraft:lime_concrete"), + ("minecraft:concrete.6", "minecraft:pink_concrete"), + ("minecraft:concrete.7", "minecraft:gray_concrete"), + ("minecraft:concrete.8", "minecraft:light_gray_concrete"), + ("minecraft:concrete.9", "minecraft:cyan_concrete"), + ("minecraft:concrete.10", "minecraft:purple_concrete"), + ("minecraft:concrete.11", "minecraft:blue_concrete"), + ("minecraft:concrete.12", "minecraft:brown_concrete"), + ("minecraft:concrete.13", "minecraft:green_concrete"), + ("minecraft:concrete.14", "minecraft:red_concrete"), + ("minecraft:concrete.15", "minecraft:black_concrete"), + ("minecraft:concrete_powder.0", "minecraft:white_concrete_powder"), + ("minecraft:concrete_powder.1", "minecraft:orange_concrete_powder"), + ("minecraft:concrete_powder.2", "minecraft:magenta_concrete_powder"), + ("minecraft:concrete_powder.3", "minecraft:light_blue_concrete_powder"), + ("minecraft:concrete_powder.4", "minecraft:yellow_concrete_powder"), + ("minecraft:concrete_powder.5", "minecraft:lime_concrete_powder"), + ("minecraft:concrete_powder.6", "minecraft:pink_concrete_powder"), + ("minecraft:concrete_powder.7", "minecraft:gray_concrete_powder"), + ("minecraft:concrete_powder.8", "minecraft:light_gray_concrete_powder"), + ("minecraft:concrete_powder.9", "minecraft:cyan_concrete_powder"), + ("minecraft:concrete_powder.10", "minecraft:purple_concrete_powder"), + ("minecraft:concrete_powder.11", "minecraft:blue_concrete_powder"), + ("minecraft:concrete_powder.12", "minecraft:brown_concrete_powder"), + ("minecraft:concrete_powder.13", "minecraft:green_concrete_powder"), + ("minecraft:concrete_powder.14", "minecraft:red_concrete_powder"), + ("minecraft:concrete_powder.15", "minecraft:black_concrete_powder"), + ("minecraft:cobblestone_wall.0", "minecraft:cobblestone_wall"), + ("minecraft:cobblestone_wall.1", "minecraft:mossy_cobblestone_wall"), + ("minecraft:sandstone.0", "minecraft:sandstone"), + ("minecraft:sandstone.1", "minecraft:chiseled_sandstone"), + ("minecraft:sandstone.2", "minecraft:cut_sandstone"), + ("minecraft:red_sandstone.0", "minecraft:red_sandstone"), + ("minecraft:red_sandstone.1", "minecraft:chiseled_red_sandstone"), + ("minecraft:red_sandstone.2", "minecraft:cut_red_sandstone"), + ("minecraft:stonebrick.0", "minecraft:stone_bricks"), + ("minecraft:stonebrick.1", "minecraft:mossy_stone_bricks"), + ("minecraft:stonebrick.2", "minecraft:cracked_stone_bricks"), + ("minecraft:stonebrick.3", "minecraft:chiseled_stone_bricks"), + ("minecraft:monster_egg.0", "minecraft:infested_stone"), + ("minecraft:monster_egg.1", "minecraft:infested_cobblestone"), + ("minecraft:monster_egg.2", "minecraft:infested_stone_bricks"), + ("minecraft:monster_egg.3", "minecraft:infested_mossy_stone_bricks"), + ("minecraft:monster_egg.4", "minecraft:infested_cracked_stone_bricks"), + ("minecraft:monster_egg.5", "minecraft:infested_chiseled_stone_bricks"), + ("minecraft:yellow_flower.0", "minecraft:dandelion"), + ("minecraft:red_flower.0", "minecraft:poppy"), + ("minecraft:red_flower.1", "minecraft:blue_orchid"), + ("minecraft:red_flower.2", "minecraft:allium"), + ("minecraft:red_flower.3", "minecraft:azure_bluet"), + ("minecraft:red_flower.4", "minecraft:red_tulip"), + ("minecraft:red_flower.5", "minecraft:orange_tulip"), + ("minecraft:red_flower.6", "minecraft:white_tulip"), + ("minecraft:red_flower.7", "minecraft:pink_tulip"), + ("minecraft:red_flower.8", "minecraft:oxeye_daisy"), + ("minecraft:double_plant.0", "minecraft:sunflower"), + ("minecraft:double_plant.1", "minecraft:lilac"), + ("minecraft:double_plant.2", "minecraft:tall_grass"), + ("minecraft:double_plant.3", "minecraft:large_fern"), + ("minecraft:double_plant.4", "minecraft:rose_bush"), + ("minecraft:double_plant.5", "minecraft:peony"), + ("minecraft:deadbush.0", "minecraft:dead_bush"), + ("minecraft:tallgrass.0", "minecraft:dead_bush"), + ("minecraft:tallgrass.1", "minecraft:grass"), + ("minecraft:tallgrass.2", "minecraft:fern"), + ("minecraft:sponge.0", "minecraft:sponge"), + ("minecraft:sponge.1", "minecraft:wet_sponge"), + ("minecraft:purpur_slab.0", "minecraft:purpur_slab"), + ("minecraft:stone_slab.0", "minecraft:stone_slab"), + ("minecraft:stone_slab.1", "minecraft:sandstone_slab"), + ("minecraft:stone_slab.2", "minecraft:petrified_oak_slab"), + ("minecraft:stone_slab.3", "minecraft:cobblestone_slab"), + ("minecraft:stone_slab.4", "minecraft:brick_slab"), + ("minecraft:stone_slab.5", "minecraft:stone_brick_slab"), + ("minecraft:stone_slab.6", "minecraft:nether_brick_slab"), + ("minecraft:stone_slab.7", "minecraft:quartz_slab"), + ("minecraft:stone_slab2.0", "minecraft:red_sandstone_slab"), + ("minecraft:wooden_slab.0", "minecraft:oak_slab"), + ("minecraft:wooden_slab.1", "minecraft:spruce_slab"), + ("minecraft:wooden_slab.2", "minecraft:birch_slab"), + ("minecraft:wooden_slab.3", "minecraft:jungle_slab"), + ("minecraft:wooden_slab.4", "minecraft:acacia_slab"), + ("minecraft:wooden_slab.5", "minecraft:dark_oak_slab"), + ("minecraft:coal.0", "minecraft:coal"), + ("minecraft:coal.1", "minecraft:charcoal"), + ("minecraft:fish.0", "minecraft:cod"), + ("minecraft:fish.1", "minecraft:salmon"), + ("minecraft:fish.2", "minecraft:clownfish"), + ("minecraft:fish.3", "minecraft:pufferfish"), + ("minecraft:cooked_fish.0", "minecraft:cooked_cod"), + ("minecraft:cooked_fish.1", "minecraft:cooked_salmon"), + ("minecraft:skull.0", "minecraft:skeleton_skull"), + ("minecraft:skull.1", "minecraft:wither_skeleton_skull"), + ("minecraft:skull.2", "minecraft:zombie_head"), + ("minecraft:skull.3", "minecraft:player_head"), + ("minecraft:skull.4", "minecraft:creeper_head"), + ("minecraft:skull.5", "minecraft:dragon_head"), + ("minecraft:golden_apple.0", "minecraft:golden_apple"), + ("minecraft:golden_apple.1", "minecraft:enchanted_golden_apple"), + ("minecraft:fireworks.0", "minecraft:firework_rocket"), + ("minecraft:firework_charge.0", "minecraft:firework_star"), + ("minecraft:dye.0", "minecraft:ink_sac"), + ("minecraft:dye.1", "minecraft:rose_red"), + ("minecraft:dye.2", "minecraft:cactus_green"), + ("minecraft:dye.3", "minecraft:cocoa_beans"), + ("minecraft:dye.4", "minecraft:lapis_lazuli"), + ("minecraft:dye.5", "minecraft:purple_dye"), + ("minecraft:dye.6", "minecraft:cyan_dye"), + ("minecraft:dye.7", "minecraft:light_gray_dye"), + ("minecraft:dye.8", "minecraft:gray_dye"), + ("minecraft:dye.9", "minecraft:pink_dye"), + ("minecraft:dye.10", "minecraft:lime_dye"), + ("minecraft:dye.11", "minecraft:dandelion_yellow"), + ("minecraft:dye.12", "minecraft:light_blue_dye"), + ("minecraft:dye.13", "minecraft:magenta_dye"), + ("minecraft:dye.14", "minecraft:orange_dye"), + ("minecraft:dye.15", "minecraft:bone_meal"), + ("minecraft:silver_shulker_box.0", "minecraft:light_gray_shulker_box"), + ("minecraft:fence.0", "minecraft:oak_fence"), + ("minecraft:fence_gate.0", "minecraft:oak_fence_gate"), + ("minecraft:wooden_door.0", "minecraft:oak_door"), + ("minecraft:boat.0", "minecraft:oak_boat"), + ("minecraft:lit_pumpkin.0", "minecraft:jack_o_lantern"), + ("minecraft:pumpkin.0", "minecraft:carved_pumpkin"), + ("minecraft:trapdoor.0", "minecraft:oak_trapdoor"), + ("minecraft:nether_brick.0", "minecraft:nether_bricks"), + ("minecraft:red_nether_brick.0", "minecraft:red_nether_bricks"), + ("minecraft:netherbrick.0", "minecraft:nether_brick"), + ("minecraft:wooden_button.0", "minecraft:oak_button"), + ("minecraft:wooden_pressure_plate.0", "minecraft:oak_pressure_plate"), + ("minecraft:noteblock.0", "minecraft:note_block"), + ("minecraft:bed.0", "minecraft:white_bed"), + ("minecraft:bed.1", "minecraft:orange_bed"), + ("minecraft:bed.2", "minecraft:magenta_bed"), + ("minecraft:bed.3", "minecraft:light_blue_bed"), + ("minecraft:bed.4", "minecraft:yellow_bed"), + ("minecraft:bed.5", "minecraft:lime_bed"), + ("minecraft:bed.6", "minecraft:pink_bed"), + ("minecraft:bed.7", "minecraft:gray_bed"), + ("minecraft:bed.8", "minecraft:light_gray_bed"), + ("minecraft:bed.9", "minecraft:cyan_bed"), + ("minecraft:bed.10", "minecraft:purple_bed"), + ("minecraft:bed.11", "minecraft:blue_bed"), + ("minecraft:bed.12", "minecraft:brown_bed"), + ("minecraft:bed.13", "minecraft:green_bed"), + ("minecraft:bed.14", "minecraft:red_bed"), + ("minecraft:bed.15", "minecraft:black_bed"), + ("minecraft:banner.15", "minecraft:white_banner"), + ("minecraft:banner.14", "minecraft:orange_banner"), + ("minecraft:banner.13", "minecraft:magenta_banner"), + ("minecraft:banner.12", "minecraft:light_blue_banner"), + ("minecraft:banner.11", "minecraft:yellow_banner"), + ("minecraft:banner.10", "minecraft:lime_banner"), + ("minecraft:banner.9", "minecraft:pink_banner"), + ("minecraft:banner.8", "minecraft:gray_banner"), + ("minecraft:banner.7", "minecraft:light_gray_banner"), + ("minecraft:banner.6", "minecraft:cyan_banner"), + ("minecraft:banner.5", "minecraft:purple_banner"), + ("minecraft:banner.4", "minecraft:blue_banner"), + ("minecraft:banner.3", "minecraft:brown_banner"), + ("minecraft:banner.2", "minecraft:green_banner"), + ("minecraft:banner.1", "minecraft:red_banner"), + ("minecraft:banner.0", "minecraft:black_banner"), + ("minecraft:grass.0", "minecraft:grass_block"), + ("minecraft:brick_block.0", "minecraft:bricks"), + ("minecraft:end_bricks.0", "minecraft:end_stone_bricks"), + ("minecraft:golden_rail.0", "minecraft:powered_rail"), + ("minecraft:magma.0", "minecraft:magma_block"), + ("minecraft:quartz_ore.0", "minecraft:nether_quartz_ore"), + ("minecraft:reeds.0", "minecraft:sugar_cane"), + ("minecraft:slime.0", "minecraft:slime_block"), + ("minecraft:stone_stairs.0", "minecraft:cobblestone_stairs"), + ("minecraft:waterlily.0", "minecraft:lily_pad"), + ("minecraft:web.0", "minecraft:cobweb"), + ("minecraft:snow.0", "minecraft:snow_block"), + ("minecraft:snow_layer.0", "minecraft:snow"), + ("minecraft:record_11.0", "minecraft:music_disc_11"), + ("minecraft:record_13.0", "minecraft:music_disc_13"), + ("minecraft:record_blocks.0", "minecraft:music_disc_blocks"), + ("minecraft:record_cat.0", "minecraft:music_disc_cat"), + ("minecraft:record_chirp.0", "minecraft:music_disc_chirp"), + ("minecraft:record_far.0", "minecraft:music_disc_far"), + ("minecraft:record_mall.0", "minecraft:music_disc_mall"), + ("minecraft:record_mellohi.0", "minecraft:music_disc_mellohi"), + ("minecraft:record_stal.0", "minecraft:music_disc_stal"), + ("minecraft:record_strad.0", "minecraft:music_disc_strad"), + ("minecraft:record_wait.0", "minecraft:music_disc_wait"), + ("minecraft:record_ward.0", "minecraft:music_disc_ward"), +]; + +/// `ItemStackTheFlatteningFix.DAMAGE_IDS`: items that keep their damage in `tag.Damage`. +pub static ITEM_DAMAGE_IDS: &[&str] = &[ + "minecraft:bow", + "minecraft:carrot_on_a_stick", + "minecraft:chainmail_boots", + "minecraft:chainmail_chestplate", + "minecraft:chainmail_helmet", + "minecraft:chainmail_leggings", + "minecraft:diamond_axe", + "minecraft:diamond_boots", + "minecraft:diamond_chestplate", + "minecraft:diamond_helmet", + "minecraft:diamond_hoe", + "minecraft:diamond_leggings", + "minecraft:diamond_pickaxe", + "minecraft:diamond_shovel", + "minecraft:diamond_sword", + "minecraft:elytra", + "minecraft:fishing_rod", + "minecraft:flint_and_steel", + "minecraft:golden_axe", + "minecraft:golden_boots", + "minecraft:golden_chestplate", + "minecraft:golden_helmet", + "minecraft:golden_hoe", + "minecraft:golden_leggings", + "minecraft:golden_pickaxe", + "minecraft:golden_shovel", + "minecraft:golden_sword", + "minecraft:iron_axe", + "minecraft:iron_boots", + "minecraft:iron_chestplate", + "minecraft:iron_helmet", + "minecraft:iron_hoe", + "minecraft:iron_leggings", + "minecraft:iron_pickaxe", + "minecraft:iron_shovel", + "minecraft:iron_sword", + "minecraft:leather_boots", + "minecraft:leather_chestplate", + "minecraft:leather_helmet", + "minecraft:leather_leggings", + "minecraft:shears", + "minecraft:shield", + "minecraft:stone_axe", + "minecraft:stone_hoe", + "minecraft:stone_pickaxe", + "minecraft:stone_shovel", + "minecraft:stone_sword", + "minecraft:wooden_axe", + "minecraft:wooden_hoe", + "minecraft:wooden_pickaxe", + "minecraft:wooden_shovel", + "minecraft:wooden_sword", +]; + +/// `EntityBlockStateFix.MAP`: 1.12 block name to numeric id. +pub static BLOCK_IDS: &[(&str, i32)] = &[ + ("minecraft:air", 0), + ("minecraft:stone", 1), + ("minecraft:grass", 2), + ("minecraft:dirt", 3), + ("minecraft:cobblestone", 4), + ("minecraft:planks", 5), + ("minecraft:sapling", 6), + ("minecraft:bedrock", 7), + ("minecraft:flowing_water", 8), + ("minecraft:water", 9), + ("minecraft:flowing_lava", 10), + ("minecraft:lava", 11), + ("minecraft:sand", 12), + ("minecraft:gravel", 13), + ("minecraft:gold_ore", 14), + ("minecraft:iron_ore", 15), + ("minecraft:coal_ore", 16), + ("minecraft:log", 17), + ("minecraft:leaves", 18), + ("minecraft:sponge", 19), + ("minecraft:glass", 20), + ("minecraft:lapis_ore", 21), + ("minecraft:lapis_block", 22), + ("minecraft:dispenser", 23), + ("minecraft:sandstone", 24), + ("minecraft:noteblock", 25), + ("minecraft:bed", 26), + ("minecraft:golden_rail", 27), + ("minecraft:detector_rail", 28), + ("minecraft:sticky_piston", 29), + ("minecraft:web", 30), + ("minecraft:tallgrass", 31), + ("minecraft:deadbush", 32), + ("minecraft:piston", 33), + ("minecraft:piston_head", 34), + ("minecraft:wool", 35), + ("minecraft:piston_extension", 36), + ("minecraft:yellow_flower", 37), + ("minecraft:red_flower", 38), + ("minecraft:brown_mushroom", 39), + ("minecraft:red_mushroom", 40), + ("minecraft:gold_block", 41), + ("minecraft:iron_block", 42), + ("minecraft:double_stone_slab", 43), + ("minecraft:stone_slab", 44), + ("minecraft:brick_block", 45), + ("minecraft:tnt", 46), + ("minecraft:bookshelf", 47), + ("minecraft:mossy_cobblestone", 48), + ("minecraft:obsidian", 49), + ("minecraft:torch", 50), + ("minecraft:fire", 51), + ("minecraft:mob_spawner", 52), + ("minecraft:oak_stairs", 53), + ("minecraft:chest", 54), + ("minecraft:redstone_wire", 55), + ("minecraft:diamond_ore", 56), + ("minecraft:diamond_block", 57), + ("minecraft:crafting_table", 58), + ("minecraft:wheat", 59), + ("minecraft:farmland", 60), + ("minecraft:furnace", 61), + ("minecraft:lit_furnace", 62), + ("minecraft:standing_sign", 63), + ("minecraft:wooden_door", 64), + ("minecraft:ladder", 65), + ("minecraft:rail", 66), + ("minecraft:stone_stairs", 67), + ("minecraft:wall_sign", 68), + ("minecraft:lever", 69), + ("minecraft:stone_pressure_plate", 70), + ("minecraft:iron_door", 71), + ("minecraft:wooden_pressure_plate", 72), + ("minecraft:redstone_ore", 73), + ("minecraft:lit_redstone_ore", 74), + ("minecraft:unlit_redstone_torch", 75), + ("minecraft:redstone_torch", 76), + ("minecraft:stone_button", 77), + ("minecraft:snow_layer", 78), + ("minecraft:ice", 79), + ("minecraft:snow", 80), + ("minecraft:cactus", 81), + ("minecraft:clay", 82), + ("minecraft:reeds", 83), + ("minecraft:jukebox", 84), + ("minecraft:fence", 85), + ("minecraft:pumpkin", 86), + ("minecraft:netherrack", 87), + ("minecraft:soul_sand", 88), + ("minecraft:glowstone", 89), + ("minecraft:portal", 90), + ("minecraft:lit_pumpkin", 91), + ("minecraft:cake", 92), + ("minecraft:unpowered_repeater", 93), + ("minecraft:powered_repeater", 94), + ("minecraft:stained_glass", 95), + ("minecraft:trapdoor", 96), + ("minecraft:monster_egg", 97), + ("minecraft:stonebrick", 98), + ("minecraft:brown_mushroom_block", 99), + ("minecraft:red_mushroom_block", 100), + ("minecraft:iron_bars", 101), + ("minecraft:glass_pane", 102), + ("minecraft:melon_block", 103), + ("minecraft:pumpkin_stem", 104), + ("minecraft:melon_stem", 105), + ("minecraft:vine", 106), + ("minecraft:fence_gate", 107), + ("minecraft:brick_stairs", 108), + ("minecraft:stone_brick_stairs", 109), + ("minecraft:mycelium", 110), + ("minecraft:waterlily", 111), + ("minecraft:nether_brick", 112), + ("minecraft:nether_brick_fence", 113), + ("minecraft:nether_brick_stairs", 114), + ("minecraft:nether_wart", 115), + ("minecraft:enchanting_table", 116), + ("minecraft:brewing_stand", 117), + ("minecraft:cauldron", 118), + ("minecraft:end_portal", 119), + ("minecraft:end_portal_frame", 120), + ("minecraft:end_stone", 121), + ("minecraft:dragon_egg", 122), + ("minecraft:redstone_lamp", 123), + ("minecraft:lit_redstone_lamp", 124), + ("minecraft:double_wooden_slab", 125), + ("minecraft:wooden_slab", 126), + ("minecraft:cocoa", 127), + ("minecraft:sandstone_stairs", 128), + ("minecraft:emerald_ore", 129), + ("minecraft:ender_chest", 130), + ("minecraft:tripwire_hook", 131), + ("minecraft:tripwire", 132), + ("minecraft:emerald_block", 133), + ("minecraft:spruce_stairs", 134), + ("minecraft:birch_stairs", 135), + ("minecraft:jungle_stairs", 136), + ("minecraft:command_block", 137), + ("minecraft:beacon", 138), + ("minecraft:cobblestone_wall", 139), + ("minecraft:flower_pot", 140), + ("minecraft:carrots", 141), + ("minecraft:potatoes", 142), + ("minecraft:wooden_button", 143), + ("minecraft:skull", 144), + ("minecraft:anvil", 145), + ("minecraft:trapped_chest", 146), + ("minecraft:light_weighted_pressure_plate", 147), + ("minecraft:heavy_weighted_pressure_plate", 148), + ("minecraft:unpowered_comparator", 149), + ("minecraft:powered_comparator", 150), + ("minecraft:daylight_detector", 151), + ("minecraft:redstone_block", 152), + ("minecraft:quartz_ore", 153), + ("minecraft:hopper", 154), + ("minecraft:quartz_block", 155), + ("minecraft:quartz_stairs", 156), + ("minecraft:activator_rail", 157), + ("minecraft:dropper", 158), + ("minecraft:stained_hardened_clay", 159), + ("minecraft:stained_glass_pane", 160), + ("minecraft:leaves2", 161), + ("minecraft:log2", 162), + ("minecraft:acacia_stairs", 163), + ("minecraft:dark_oak_stairs", 164), + ("minecraft:slime", 165), + ("minecraft:barrier", 166), + ("minecraft:iron_trapdoor", 167), + ("minecraft:prismarine", 168), + ("minecraft:sea_lantern", 169), + ("minecraft:hay_block", 170), + ("minecraft:carpet", 171), + ("minecraft:hardened_clay", 172), + ("minecraft:coal_block", 173), + ("minecraft:packed_ice", 174), + ("minecraft:double_plant", 175), + ("minecraft:standing_banner", 176), + ("minecraft:wall_banner", 177), + ("minecraft:daylight_detector_inverted", 178), + ("minecraft:red_sandstone", 179), + ("minecraft:red_sandstone_stairs", 180), + ("minecraft:double_stone_slab2", 181), + ("minecraft:stone_slab2", 182), + ("minecraft:spruce_fence_gate", 183), + ("minecraft:birch_fence_gate", 184), + ("minecraft:jungle_fence_gate", 185), + ("minecraft:dark_oak_fence_gate", 186), + ("minecraft:acacia_fence_gate", 187), + ("minecraft:spruce_fence", 188), + ("minecraft:birch_fence", 189), + ("minecraft:jungle_fence", 190), + ("minecraft:dark_oak_fence", 191), + ("minecraft:acacia_fence", 192), + ("minecraft:spruce_door", 193), + ("minecraft:birch_door", 194), + ("minecraft:jungle_door", 195), + ("minecraft:acacia_door", 196), + ("minecraft:dark_oak_door", 197), + ("minecraft:end_rod", 198), + ("minecraft:chorus_plant", 199), + ("minecraft:chorus_flower", 200), + ("minecraft:purpur_block", 201), + ("minecraft:purpur_pillar", 202), + ("minecraft:purpur_stairs", 203), + ("minecraft:purpur_double_slab", 204), + ("minecraft:purpur_slab", 205), + ("minecraft:end_bricks", 206), + ("minecraft:beetroots", 207), + ("minecraft:grass_path", 208), + ("minecraft:end_gateway", 209), + ("minecraft:repeating_command_block", 210), + ("minecraft:chain_command_block", 211), + ("minecraft:frosted_ice", 212), + ("minecraft:magma", 213), + ("minecraft:nether_wart_block", 214), + ("minecraft:red_nether_brick", 215), + ("minecraft:bone_block", 216), + ("minecraft:structure_void", 217), + ("minecraft:observer", 218), + ("minecraft:white_shulker_box", 219), + ("minecraft:orange_shulker_box", 220), + ("minecraft:magenta_shulker_box", 221), + ("minecraft:light_blue_shulker_box", 222), + ("minecraft:yellow_shulker_box", 223), + ("minecraft:lime_shulker_box", 224), + ("minecraft:pink_shulker_box", 225), + ("minecraft:gray_shulker_box", 226), + ("minecraft:silver_shulker_box", 227), + ("minecraft:cyan_shulker_box", 228), + ("minecraft:purple_shulker_box", 229), + ("minecraft:blue_shulker_box", 230), + ("minecraft:brown_shulker_box", 231), + ("minecraft:green_shulker_box", 232), + ("minecraft:red_shulker_box", 233), + ("minecraft:black_shulker_box", 234), + ("minecraft:white_glazed_terracotta", 235), + ("minecraft:orange_glazed_terracotta", 236), + ("minecraft:magenta_glazed_terracotta", 237), + ("minecraft:light_blue_glazed_terracotta", 238), + ("minecraft:yellow_glazed_terracotta", 239), + ("minecraft:lime_glazed_terracotta", 240), + ("minecraft:pink_glazed_terracotta", 241), + ("minecraft:gray_glazed_terracotta", 242), + ("minecraft:silver_glazed_terracotta", 243), + ("minecraft:cyan_glazed_terracotta", 244), + ("minecraft:purple_glazed_terracotta", 245), + ("minecraft:blue_glazed_terracotta", 246), + ("minecraft:brown_glazed_terracotta", 247), + ("minecraft:green_glazed_terracotta", 248), + ("minecraft:red_glazed_terracotta", 249), + ("minecraft:black_glazed_terracotta", 250), + ("minecraft:concrete", 251), + ("minecraft:concrete_powder", 252), + ("minecraft:structure_block", 255), +]; + +/// `ItemIdFix.ITEM_NAMES`: numeric item id to name. +pub static ITEM_IDS: &[(i32, &str)] = &[ + (1, "minecraft:stone"), + (2, "minecraft:grass"), + (3, "minecraft:dirt"), + (4, "minecraft:cobblestone"), + (5, "minecraft:planks"), + (6, "minecraft:sapling"), + (7, "minecraft:bedrock"), + (8, "minecraft:flowing_water"), + (9, "minecraft:water"), + (10, "minecraft:flowing_lava"), + (11, "minecraft:lava"), + (12, "minecraft:sand"), + (13, "minecraft:gravel"), + (14, "minecraft:gold_ore"), + (15, "minecraft:iron_ore"), + (16, "minecraft:coal_ore"), + (17, "minecraft:log"), + (18, "minecraft:leaves"), + (19, "minecraft:sponge"), + (20, "minecraft:glass"), + (21, "minecraft:lapis_ore"), + (22, "minecraft:lapis_block"), + (23, "minecraft:dispenser"), + (24, "minecraft:sandstone"), + (25, "minecraft:noteblock"), + (27, "minecraft:golden_rail"), + (28, "minecraft:detector_rail"), + (29, "minecraft:sticky_piston"), + (30, "minecraft:web"), + (31, "minecraft:tallgrass"), + (32, "minecraft:deadbush"), + (33, "minecraft:piston"), + (35, "minecraft:wool"), + (37, "minecraft:yellow_flower"), + (38, "minecraft:red_flower"), + (39, "minecraft:brown_mushroom"), + (40, "minecraft:red_mushroom"), + (41, "minecraft:gold_block"), + (42, "minecraft:iron_block"), + (43, "minecraft:double_stone_slab"), + (44, "minecraft:stone_slab"), + (45, "minecraft:brick_block"), + (46, "minecraft:tnt"), + (47, "minecraft:bookshelf"), + (48, "minecraft:mossy_cobblestone"), + (49, "minecraft:obsidian"), + (50, "minecraft:torch"), + (51, "minecraft:fire"), + (52, "minecraft:mob_spawner"), + (53, "minecraft:oak_stairs"), + (54, "minecraft:chest"), + (56, "minecraft:diamond_ore"), + (57, "minecraft:diamond_block"), + (58, "minecraft:crafting_table"), + (60, "minecraft:farmland"), + (61, "minecraft:furnace"), + (62, "minecraft:lit_furnace"), + (65, "minecraft:ladder"), + (66, "minecraft:rail"), + (67, "minecraft:stone_stairs"), + (69, "minecraft:lever"), + (70, "minecraft:stone_pressure_plate"), + (72, "minecraft:wooden_pressure_plate"), + (73, "minecraft:redstone_ore"), + (76, "minecraft:redstone_torch"), + (77, "minecraft:stone_button"), + (78, "minecraft:snow_layer"), + (79, "minecraft:ice"), + (80, "minecraft:snow"), + (81, "minecraft:cactus"), + (82, "minecraft:clay"), + (84, "minecraft:jukebox"), + (85, "minecraft:fence"), + (86, "minecraft:pumpkin"), + (87, "minecraft:netherrack"), + (88, "minecraft:soul_sand"), + (89, "minecraft:glowstone"), + (90, "minecraft:portal"), + (91, "minecraft:lit_pumpkin"), + (95, "minecraft:stained_glass"), + (96, "minecraft:trapdoor"), + (97, "minecraft:monster_egg"), + (98, "minecraft:stonebrick"), + (99, "minecraft:brown_mushroom_block"), + (100, "minecraft:red_mushroom_block"), + (101, "minecraft:iron_bars"), + (102, "minecraft:glass_pane"), + (103, "minecraft:melon_block"), + (106, "minecraft:vine"), + (107, "minecraft:fence_gate"), + (108, "minecraft:brick_stairs"), + (109, "minecraft:stone_brick_stairs"), + (110, "minecraft:mycelium"), + (111, "minecraft:waterlily"), + (112, "minecraft:nether_brick"), + (113, "minecraft:nether_brick_fence"), + (114, "minecraft:nether_brick_stairs"), + (116, "minecraft:enchanting_table"), + (119, "minecraft:end_portal"), + (120, "minecraft:end_portal_frame"), + (121, "minecraft:end_stone"), + (122, "minecraft:dragon_egg"), + (123, "minecraft:redstone_lamp"), + (125, "minecraft:double_wooden_slab"), + (126, "minecraft:wooden_slab"), + (127, "minecraft:cocoa"), + (128, "minecraft:sandstone_stairs"), + (129, "minecraft:emerald_ore"), + (130, "minecraft:ender_chest"), + (131, "minecraft:tripwire_hook"), + (133, "minecraft:emerald_block"), + (134, "minecraft:spruce_stairs"), + (135, "minecraft:birch_stairs"), + (136, "minecraft:jungle_stairs"), + (137, "minecraft:command_block"), + (138, "minecraft:beacon"), + (139, "minecraft:cobblestone_wall"), + (141, "minecraft:carrots"), + (142, "minecraft:potatoes"), + (143, "minecraft:wooden_button"), + (145, "minecraft:anvil"), + (146, "minecraft:trapped_chest"), + (147, "minecraft:light_weighted_pressure_plate"), + (148, "minecraft:heavy_weighted_pressure_plate"), + (151, "minecraft:daylight_detector"), + (152, "minecraft:redstone_block"), + (153, "minecraft:quartz_ore"), + (154, "minecraft:hopper"), + (155, "minecraft:quartz_block"), + (156, "minecraft:quartz_stairs"), + (157, "minecraft:activator_rail"), + (158, "minecraft:dropper"), + (159, "minecraft:stained_hardened_clay"), + (160, "minecraft:stained_glass_pane"), + (161, "minecraft:leaves2"), + (162, "minecraft:log2"), + (163, "minecraft:acacia_stairs"), + (164, "minecraft:dark_oak_stairs"), + (170, "minecraft:hay_block"), + (171, "minecraft:carpet"), + (172, "minecraft:hardened_clay"), + (173, "minecraft:coal_block"), + (174, "minecraft:packed_ice"), + (175, "minecraft:double_plant"), + (256, "minecraft:iron_shovel"), + (257, "minecraft:iron_pickaxe"), + (258, "minecraft:iron_axe"), + (259, "minecraft:flint_and_steel"), + (260, "minecraft:apple"), + (261, "minecraft:bow"), + (262, "minecraft:arrow"), + (263, "minecraft:coal"), + (264, "minecraft:diamond"), + (265, "minecraft:iron_ingot"), + (266, "minecraft:gold_ingot"), + (267, "minecraft:iron_sword"), + (268, "minecraft:wooden_sword"), + (269, "minecraft:wooden_shovel"), + (270, "minecraft:wooden_pickaxe"), + (271, "minecraft:wooden_axe"), + (272, "minecraft:stone_sword"), + (273, "minecraft:stone_shovel"), + (274, "minecraft:stone_pickaxe"), + (275, "minecraft:stone_axe"), + (276, "minecraft:diamond_sword"), + (277, "minecraft:diamond_shovel"), + (278, "minecraft:diamond_pickaxe"), + (279, "minecraft:diamond_axe"), + (280, "minecraft:stick"), + (281, "minecraft:bowl"), + (282, "minecraft:mushroom_stew"), + (283, "minecraft:golden_sword"), + (284, "minecraft:golden_shovel"), + (285, "minecraft:golden_pickaxe"), + (286, "minecraft:golden_axe"), + (287, "minecraft:string"), + (288, "minecraft:feather"), + (289, "minecraft:gunpowder"), + (290, "minecraft:wooden_hoe"), + (291, "minecraft:stone_hoe"), + (292, "minecraft:iron_hoe"), + (293, "minecraft:diamond_hoe"), + (294, "minecraft:golden_hoe"), + (295, "minecraft:wheat_seeds"), + (296, "minecraft:wheat"), + (297, "minecraft:bread"), + (298, "minecraft:leather_helmet"), + (299, "minecraft:leather_chestplate"), + (300, "minecraft:leather_leggings"), + (301, "minecraft:leather_boots"), + (302, "minecraft:chainmail_helmet"), + (303, "minecraft:chainmail_chestplate"), + (304, "minecraft:chainmail_leggings"), + (305, "minecraft:chainmail_boots"), + (306, "minecraft:iron_helmet"), + (307, "minecraft:iron_chestplate"), + (308, "minecraft:iron_leggings"), + (309, "minecraft:iron_boots"), + (310, "minecraft:diamond_helmet"), + (311, "minecraft:diamond_chestplate"), + (312, "minecraft:diamond_leggings"), + (313, "minecraft:diamond_boots"), + (314, "minecraft:golden_helmet"), + (315, "minecraft:golden_chestplate"), + (316, "minecraft:golden_leggings"), + (317, "minecraft:golden_boots"), + (318, "minecraft:flint"), + (319, "minecraft:porkchop"), + (320, "minecraft:cooked_porkchop"), + (321, "minecraft:painting"), + (322, "minecraft:golden_apple"), + (323, "minecraft:sign"), + (324, "minecraft:wooden_door"), + (325, "minecraft:bucket"), + (326, "minecraft:water_bucket"), + (327, "minecraft:lava_bucket"), + (328, "minecraft:minecart"), + (329, "minecraft:saddle"), + (330, "minecraft:iron_door"), + (331, "minecraft:redstone"), + (332, "minecraft:snowball"), + (333, "minecraft:boat"), + (334, "minecraft:leather"), + (335, "minecraft:milk_bucket"), + (336, "minecraft:brick"), + (337, "minecraft:clay_ball"), + (338, "minecraft:reeds"), + (339, "minecraft:paper"), + (340, "minecraft:book"), + (341, "minecraft:slime_ball"), + (342, "minecraft:chest_minecart"), + (343, "minecraft:furnace_minecart"), + (344, "minecraft:egg"), + (345, "minecraft:compass"), + (346, "minecraft:fishing_rod"), + (347, "minecraft:clock"), + (348, "minecraft:glowstone_dust"), + (349, "minecraft:fish"), + (350, "minecraft:cooked_fished"), + (351, "minecraft:dye"), + (352, "minecraft:bone"), + (353, "minecraft:sugar"), + (354, "minecraft:cake"), + (355, "minecraft:bed"), + (356, "minecraft:repeater"), + (357, "minecraft:cookie"), + (358, "minecraft:filled_map"), + (359, "minecraft:shears"), + (360, "minecraft:melon"), + (361, "minecraft:pumpkin_seeds"), + (362, "minecraft:melon_seeds"), + (363, "minecraft:beef"), + (364, "minecraft:cooked_beef"), + (365, "minecraft:chicken"), + (366, "minecraft:cooked_chicken"), + (367, "minecraft:rotten_flesh"), + (368, "minecraft:ender_pearl"), + (369, "minecraft:blaze_rod"), + (370, "minecraft:ghast_tear"), + (371, "minecraft:gold_nugget"), + (372, "minecraft:nether_wart"), + (373, "minecraft:potion"), + (374, "minecraft:glass_bottle"), + (375, "minecraft:spider_eye"), + (376, "minecraft:fermented_spider_eye"), + (377, "minecraft:blaze_powder"), + (378, "minecraft:magma_cream"), + (379, "minecraft:brewing_stand"), + (380, "minecraft:cauldron"), + (381, "minecraft:ender_eye"), + (382, "minecraft:speckled_melon"), + (383, "minecraft:spawn_egg"), + (384, "minecraft:experience_bottle"), + (385, "minecraft:fire_charge"), + (386, "minecraft:writable_book"), + (387, "minecraft:written_book"), + (388, "minecraft:emerald"), + (389, "minecraft:item_frame"), + (390, "minecraft:flower_pot"), + (391, "minecraft:carrot"), + (392, "minecraft:potato"), + (393, "minecraft:baked_potato"), + (394, "minecraft:poisonous_potato"), + (395, "minecraft:map"), + (396, "minecraft:golden_carrot"), + (397, "minecraft:skull"), + (398, "minecraft:carrot_on_a_stick"), + (399, "minecraft:nether_star"), + (400, "minecraft:pumpkin_pie"), + (401, "minecraft:fireworks"), + (402, "minecraft:firework_charge"), + (403, "minecraft:enchanted_book"), + (404, "minecraft:comparator"), + (405, "minecraft:netherbrick"), + (406, "minecraft:quartz"), + (407, "minecraft:tnt_minecart"), + (408, "minecraft:hopper_minecart"), + (417, "minecraft:iron_horse_armor"), + (418, "minecraft:golden_horse_armor"), + (419, "minecraft:diamond_horse_armor"), + (420, "minecraft:lead"), + (421, "minecraft:name_tag"), + (422, "minecraft:command_block_minecart"), + (2256, "minecraft:record_13"), + (2257, "minecraft:record_cat"), + (2258, "minecraft:record_blocks"), + (2259, "minecraft:record_chirp"), + (2260, "minecraft:record_far"), + (2261, "minecraft:record_mall"), + (2262, "minecraft:record_mellohi"), + (2263, "minecraft:record_stal"), + (2264, "minecraft:record_strad"), + (2265, "minecraft:record_ward"), + (2266, "minecraft:record_11"), + (2267, "minecraft:record_wait"), +]; + +pub static SPECIAL_OBJECTIVE_CRITERIA: &[&str] = &[ + "dummy", + "trigger", + "deathCount", + "playerKillCount", + "totalKillCount", + "health", + "food", + "air", + "armor", + "xp", + "level", + "killedByTeam.aqua", + "killedByTeam.black", + "killedByTeam.blue", + "killedByTeam.dark_aqua", + "killedByTeam.dark_blue", + "killedByTeam.dark_gray", + "killedByTeam.dark_green", + "killedByTeam.dark_purple", + "killedByTeam.dark_red", + "killedByTeam.gold", + "killedByTeam.gray", + "killedByTeam.green", + "killedByTeam.light_purple", + "killedByTeam.red", + "killedByTeam.white", + "killedByTeam.yellow", + "teamkill.aqua", + "teamkill.black", + "teamkill.blue", + "teamkill.dark_aqua", + "teamkill.dark_blue", + "teamkill.dark_gray", + "teamkill.dark_green", + "teamkill.dark_purple", + "teamkill.dark_red", + "teamkill.gold", + "teamkill.gray", + "teamkill.green", + "teamkill.light_purple", + "teamkill.red", + "teamkill.white", + "teamkill.yellow", +]; + +pub static STATS_SKIP: &[&str] = &[ + "stat.craftItem.minecraft.spawn_egg", + "stat.useItem.minecraft.spawn_egg", + "stat.breakItem.minecraft.spawn_egg", + "stat.pickup.minecraft.spawn_egg", + "stat.drop.minecraft.spawn_egg", +]; + +pub static STATS_CUSTOM: &[(&str, &str)] = &[ + ("stat.leaveGame", "minecraft:leave_game"), + ("stat.playOneMinute", "minecraft:play_one_minute"), + ("stat.timeSinceDeath", "minecraft:time_since_death"), + ("stat.sneakTime", "minecraft:sneak_time"), + ("stat.walkOneCm", "minecraft:walk_one_cm"), + ("stat.crouchOneCm", "minecraft:crouch_one_cm"), + ("stat.sprintOneCm", "minecraft:sprint_one_cm"), + ("stat.swimOneCm", "minecraft:swim_one_cm"), + ("stat.fallOneCm", "minecraft:fall_one_cm"), + ("stat.climbOneCm", "minecraft:climb_one_cm"), + ("stat.flyOneCm", "minecraft:fly_one_cm"), + ("stat.diveOneCm", "minecraft:dive_one_cm"), + ("stat.minecartOneCm", "minecraft:minecart_one_cm"), + ("stat.boatOneCm", "minecraft:boat_one_cm"), + ("stat.pigOneCm", "minecraft:pig_one_cm"), + ("stat.horseOneCm", "minecraft:horse_one_cm"), + ("stat.aviateOneCm", "minecraft:aviate_one_cm"), + ("stat.jump", "minecraft:jump"), + ("stat.drop", "minecraft:drop"), + ("stat.damageDealt", "minecraft:damage_dealt"), + ("stat.damageTaken", "minecraft:damage_taken"), + ("stat.deaths", "minecraft:deaths"), + ("stat.mobKills", "minecraft:mob_kills"), + ("stat.animalsBred", "minecraft:animals_bred"), + ("stat.playerKills", "minecraft:player_kills"), + ("stat.fishCaught", "minecraft:fish_caught"), + ("stat.talkedToVillager", "minecraft:talked_to_villager"), + ("stat.tradedWithVillager", "minecraft:traded_with_villager"), + ("stat.cakeSlicesEaten", "minecraft:eat_cake_slice"), + ("stat.cauldronFilled", "minecraft:fill_cauldron"), + ("stat.cauldronUsed", "minecraft:use_cauldron"), + ("stat.armorCleaned", "minecraft:clean_armor"), + ("stat.bannerCleaned", "minecraft:clean_banner"), + ("stat.brewingstandInteraction", "minecraft:interact_with_brewingstand"), + ("stat.beaconInteraction", "minecraft:interact_with_beacon"), + ("stat.dropperInspected", "minecraft:inspect_dropper"), + ("stat.hopperInspected", "minecraft:inspect_hopper"), + ("stat.dispenserInspected", "minecraft:inspect_dispenser"), + ("stat.noteblockPlayed", "minecraft:play_noteblock"), + ("stat.noteblockTuned", "minecraft:tune_noteblock"), + ("stat.flowerPotted", "minecraft:pot_flower"), + ("stat.trappedChestTriggered", "minecraft:trigger_trapped_chest"), + ("stat.enderchestOpened", "minecraft:open_enderchest"), + ("stat.itemEnchanted", "minecraft:enchant_item"), + ("stat.recordPlayed", "minecraft:play_record"), + ("stat.furnaceInteraction", "minecraft:interact_with_furnace"), + ("stat.craftingTableInteraction", "minecraft:interact_with_crafting_table"), + ("stat.chestOpened", "minecraft:open_chest"), + ("stat.sleepInBed", "minecraft:sleep_in_bed"), + ("stat.shulkerBoxOpened", "minecraft:open_shulker_box"), +]; + +pub static STATS_ITEM_KEYS: &[(&str, &str)] = &[ + ("stat.craftItem", "minecraft:crafted"), + ("stat.useItem", "minecraft:used"), + ("stat.breakItem", "minecraft:broken"), + ("stat.pickup", "minecraft:picked_up"), + ("stat.drop", "minecraft:dropped"), +]; + +pub static STATS_ENTITY_KEYS: &[(&str, &str)] = &[ + ("stat.entityKilledBy", "minecraft:killed_by"), + ("stat.killEntity", "minecraft:killed"), +]; + +pub static STATS_ENTITIES: &[(&str, &str)] = &[ + ("Bat", "minecraft:bat"), + ("Blaze", "minecraft:blaze"), + ("CaveSpider", "minecraft:cave_spider"), + ("Chicken", "minecraft:chicken"), + ("Cow", "minecraft:cow"), + ("Creeper", "minecraft:creeper"), + ("Donkey", "minecraft:donkey"), + ("ElderGuardian", "minecraft:elder_guardian"), + ("Enderman", "minecraft:enderman"), + ("Endermite", "minecraft:endermite"), + ("EvocationIllager", "minecraft:evocation_illager"), + ("Ghast", "minecraft:ghast"), + ("Guardian", "minecraft:guardian"), + ("Horse", "minecraft:horse"), + ("Husk", "minecraft:husk"), + ("Llama", "minecraft:llama"), + ("LavaSlime", "minecraft:magma_cube"), + ("MushroomCow", "minecraft:mooshroom"), + ("Mule", "minecraft:mule"), + ("Ozelot", "minecraft:ocelot"), + ("Parrot", "minecraft:parrot"), + ("Pig", "minecraft:pig"), + ("PolarBear", "minecraft:polar_bear"), + ("Rabbit", "minecraft:rabbit"), + ("Sheep", "minecraft:sheep"), + ("Shulker", "minecraft:shulker"), + ("Silverfish", "minecraft:silverfish"), + ("SkeletonHorse", "minecraft:skeleton_horse"), + ("Skeleton", "minecraft:skeleton"), + ("Slime", "minecraft:slime"), + ("Spider", "minecraft:spider"), + ("Squid", "minecraft:squid"), + ("Stray", "minecraft:stray"), + ("Vex", "minecraft:vex"), + ("Villager", "minecraft:villager"), + ("VindicationIllager", "minecraft:vindication_illager"), + ("Witch", "minecraft:witch"), + ("WitherSkeleton", "minecraft:wither_skeleton"), + ("Wolf", "minecraft:wolf"), + ("ZombieHorse", "minecraft:zombie_horse"), + ("PigZombie", "minecraft:zombie_pigman"), + ("ZombieVillager", "minecraft:zombie_villager"), + ("Zombie", "minecraft:zombie"), +]; + +pub static RECIPES: &[(&str, &str)] = &[ + ("minecraft:acacia_wooden_slab", "minecraft:acacia_slab"), + ("minecraft:birch_wooden_slab", "minecraft:birch_slab"), + ("minecraft:black_stained_hardened_clay", "minecraft:black_terracotta"), + ("minecraft:blue_stained_hardened_clay", "minecraft:blue_terracotta"), + ("minecraft:boat", "minecraft:oak_boat"), + ("minecraft:bone_meal_from_block", "minecraft:bone_meal_from_bone_block"), + ("minecraft:bone_meal_from_bone", "minecraft:bone_meal"), + ("minecraft:brick_block", "minecraft:bricks"), + ("minecraft:brown_stained_hardened_clay", "minecraft:brown_terracotta"), + ("minecraft:chiseled_stonebrick", "minecraft:chiseled_stone_bricks"), + ("minecraft:cyan_stained_hardened_clay", "minecraft:cyan_terracotta"), + ("minecraft:dark_oak_wooden_slab", "minecraft:dark_oak_slab"), + ("minecraft:end_bricks", "minecraft:end_stone_bricks"), + ("minecraft:fence_gate", "minecraft:oak_fence_gate"), + ("minecraft:fence", "minecraft:oak_fence"), + ("minecraft:golden_rail", "minecraft:powered_rail"), + ("minecraft:gold_ingot_from_block", "minecraft:gold_ingot_from_gold_block"), + ("minecraft:gray_stained_hardened_clay", "minecraft:gray_terracotta"), + ("minecraft:green_stained_hardened_clay", "minecraft:green_terracotta"), + ("minecraft:iron_ingot_from_block", "minecraft:iron_ingot_from_iron_block"), + ("minecraft:jungle_wooden_slab", "minecraft:jungle_slab"), + ("minecraft:light_blue_stained_hardened_clay", "minecraft:light_blue_terracotta"), + ("minecraft:light_gray_stained_hardened_clay", "minecraft:light_gray_terracotta"), + ("minecraft:lime_stained_hardened_clay", "minecraft:lime_terracotta"), + ("minecraft:lit_pumpkin", "minecraft:jack_o_lantern"), + ("minecraft:magenta_stained_hardened_clay", "minecraft:magenta_terracotta"), + ("minecraft:magma", "minecraft:magma_block"), + ("minecraft:melon_block", "minecraft:melon"), + ("minecraft:mossy_stonebrick", "minecraft:mossy_stone_bricks"), + ("minecraft:noteblock", "minecraft:note_block"), + ("minecraft:oak_wooden_slab", "minecraft:oak_slab"), + ("minecraft:orange_stained_hardened_clay", "minecraft:orange_terracotta"), + ("minecraft:pillar_quartz_block", "minecraft:quartz_pillar"), + ("minecraft:pink_stained_hardened_clay", "minecraft:pink_terracotta"), + ("minecraft:purple_shulker_box", "minecraft:shulker_box"), + ("minecraft:purple_stained_hardened_clay", "minecraft:purple_terracotta"), + ("minecraft:red_nether_brick", "minecraft:red_nether_bricks"), + ("minecraft:red_stained_hardened_clay", "minecraft:red_terracotta"), + ("minecraft:slime", "minecraft:slime_block"), + ("minecraft:smooth_red_sandstone", "minecraft:cut_red_sandstone"), + ("minecraft:smooth_sandstone", "minecraft:cut_sandstone"), + ("minecraft:snow_layer", "minecraft:snow"), + ("minecraft:snow", "minecraft:snow_block"), + ("minecraft:speckled_melon", "minecraft:glistering_melon_slice"), + ("minecraft:spruce_wooden_slab", "minecraft:spruce_slab"), + ("minecraft:stonebrick", "minecraft:stone_bricks"), + ("minecraft:stone_stairs", "minecraft:cobblestone_stairs"), + ("minecraft:string_to_wool", "minecraft:white_wool_from_string"), + ("minecraft:trapdoor", "minecraft:oak_trapdoor"), + ("minecraft:white_stained_hardened_clay", "minecraft:white_terracotta"), + ("minecraft:wooden_button", "minecraft:oak_button"), + ("minecraft:wooden_door", "minecraft:oak_door"), + ("minecraft:wooden_pressure_plate", "minecraft:oak_pressure_plate"), + ("minecraft:yellow_stained_hardened_clay", "minecraft:yellow_terracotta"), +]; + +pub static RECIPES_RENAMENING: &[(&str, &str)] = &[ + ("minecraft:acacia_bark", "minecraft:acacia_wood"), + ("minecraft:birch_bark", "minecraft:birch_wood"), + ("minecraft:dark_oak_bark", "minecraft:dark_oak_wood"), + ("minecraft:jungle_bark", "minecraft:jungle_wood"), + ("minecraft:oak_bark", "minecraft:oak_wood"), + ("minecraft:spruce_bark", "minecraft:spruce_wood"), +]; + +pub static ADVANCEMENTS: &[(&str, &str)] = &[ + ("minecraft:recipes/brewing/speckled_melon", "minecraft:recipes/brewing/glistering_melon_slice"), + ("minecraft:recipes/building_blocks/black_stained_hardened_clay", "minecraft:recipes/building_blocks/black_terracotta"), + ("minecraft:recipes/building_blocks/blue_stained_hardened_clay", "minecraft:recipes/building_blocks/blue_terracotta"), + ("minecraft:recipes/building_blocks/brown_stained_hardened_clay", "minecraft:recipes/building_blocks/brown_terracotta"), + ("minecraft:recipes/building_blocks/cyan_stained_hardened_clay", "minecraft:recipes/building_blocks/cyan_terracotta"), + ("minecraft:recipes/building_blocks/gray_stained_hardened_clay", "minecraft:recipes/building_blocks/gray_terracotta"), + ("minecraft:recipes/building_blocks/green_stained_hardened_clay", "minecraft:recipes/building_blocks/green_terracotta"), + ("minecraft:recipes/building_blocks/light_blue_stained_hardened_clay", "minecraft:recipes/building_blocks/light_blue_terracotta"), + ("minecraft:recipes/building_blocks/light_gray_stained_hardened_clay", "minecraft:recipes/building_blocks/light_gray_terracotta"), + ("minecraft:recipes/building_blocks/lime_stained_hardened_clay", "minecraft:recipes/building_blocks/lime_terracotta"), + ("minecraft:recipes/building_blocks/magenta_stained_hardened_clay", "minecraft:recipes/building_blocks/magenta_terracotta"), + ("minecraft:recipes/building_blocks/orange_stained_hardened_clay", "minecraft:recipes/building_blocks/orange_terracotta"), + ("minecraft:recipes/building_blocks/pink_stained_hardened_clay", "minecraft:recipes/building_blocks/pink_terracotta"), + ("minecraft:recipes/building_blocks/purple_stained_hardened_clay", "minecraft:recipes/building_blocks/purple_terracotta"), + ("minecraft:recipes/building_blocks/red_stained_hardened_clay", "minecraft:recipes/building_blocks/red_terracotta"), + ("minecraft:recipes/building_blocks/white_stained_hardened_clay", "minecraft:recipes/building_blocks/white_terracotta"), + ("minecraft:recipes/building_blocks/yellow_stained_hardened_clay", "minecraft:recipes/building_blocks/yellow_terracotta"), + ("minecraft:recipes/building_blocks/acacia_wooden_slab", "minecraft:recipes/building_blocks/acacia_slab"), + ("minecraft:recipes/building_blocks/birch_wooden_slab", "minecraft:recipes/building_blocks/birch_slab"), + ("minecraft:recipes/building_blocks/dark_oak_wooden_slab", "minecraft:recipes/building_blocks/dark_oak_slab"), + ("minecraft:recipes/building_blocks/jungle_wooden_slab", "minecraft:recipes/building_blocks/jungle_slab"), + ("minecraft:recipes/building_blocks/oak_wooden_slab", "minecraft:recipes/building_blocks/oak_slab"), + ("minecraft:recipes/building_blocks/spruce_wooden_slab", "minecraft:recipes/building_blocks/spruce_slab"), + ("minecraft:recipes/building_blocks/brick_block", "minecraft:recipes/building_blocks/bricks"), + ("minecraft:recipes/building_blocks/chiseled_stonebrick", "minecraft:recipes/building_blocks/chiseled_stone_bricks"), + ("minecraft:recipes/building_blocks/end_bricks", "minecraft:recipes/building_blocks/end_stone_bricks"), + ("minecraft:recipes/building_blocks/lit_pumpkin", "minecraft:recipes/building_blocks/jack_o_lantern"), + ("minecraft:recipes/building_blocks/magma", "minecraft:recipes/building_blocks/magma_block"), + ("minecraft:recipes/building_blocks/melon_block", "minecraft:recipes/building_blocks/melon"), + ("minecraft:recipes/building_blocks/mossy_stonebrick", "minecraft:recipes/building_blocks/mossy_stone_bricks"), + ("minecraft:recipes/building_blocks/nether_brick", "minecraft:recipes/building_blocks/nether_bricks"), + ("minecraft:recipes/building_blocks/pillar_quartz_block", "minecraft:recipes/building_blocks/quartz_pillar"), + ("minecraft:recipes/building_blocks/red_nether_brick", "minecraft:recipes/building_blocks/red_nether_bricks"), + ("minecraft:recipes/building_blocks/snow", "minecraft:recipes/building_blocks/snow_block"), + ("minecraft:recipes/building_blocks/smooth_red_sandstone", "minecraft:recipes/building_blocks/cut_red_sandstone"), + ("minecraft:recipes/building_blocks/smooth_sandstone", "minecraft:recipes/building_blocks/cut_sandstone"), + ("minecraft:recipes/building_blocks/stonebrick", "minecraft:recipes/building_blocks/stone_bricks"), + ("minecraft:recipes/building_blocks/stone_stairs", "minecraft:recipes/building_blocks/cobblestone_stairs"), + ("minecraft:recipes/building_blocks/string_to_wool", "minecraft:recipes/building_blocks/white_wool_from_string"), + ("minecraft:recipes/decorations/fence", "minecraft:recipes/decorations/oak_fence"), + ("minecraft:recipes/decorations/purple_shulker_box", "minecraft:recipes/decorations/shulker_box"), + ("minecraft:recipes/decorations/slime", "minecraft:recipes/decorations/slime_block"), + ("minecraft:recipes/decorations/snow_layer", "minecraft:recipes/decorations/snow"), + ("minecraft:recipes/misc/bone_meal_from_block", "minecraft:recipes/misc/bone_meal_from_bone_block"), + ("minecraft:recipes/misc/bone_meal_from_bone", "minecraft:recipes/misc/bone_meal"), + ("minecraft:recipes/misc/gold_ingot_from_block", "minecraft:recipes/misc/gold_ingot_from_gold_block"), + ("minecraft:recipes/misc/iron_ingot_from_block", "minecraft:recipes/misc/iron_ingot_from_iron_block"), + ("minecraft:recipes/redstone/fence_gate", "minecraft:recipes/redstone/oak_fence_gate"), + ("minecraft:recipes/redstone/noteblock", "minecraft:recipes/redstone/note_block"), + ("minecraft:recipes/redstone/trapdoor", "minecraft:recipes/redstone/oak_trapdoor"), + ("minecraft:recipes/redstone/wooden_button", "minecraft:recipes/redstone/oak_button"), + ("minecraft:recipes/redstone/wooden_door", "minecraft:recipes/redstone/oak_door"), + ("minecraft:recipes/redstone/wooden_pressure_plate", "minecraft:recipes/redstone/oak_pressure_plate"), + ("minecraft:recipes/transportation/boat", "minecraft:recipes/transportation/oak_boat"), + ("minecraft:recipes/transportation/golden_rail", "minecraft:recipes/transportation/powered_rail"), +]; + +pub static GENERATOR_BIOMES: &[(&str, &str)] = &[ + ("0", "minecraft:ocean"), + ("1", "minecraft:plains"), + ("2", "minecraft:desert"), + ("3", "minecraft:mountains"), + ("4", "minecraft:forest"), + ("5", "minecraft:taiga"), + ("6", "minecraft:swamp"), + ("7", "minecraft:river"), + ("8", "minecraft:nether"), + ("9", "minecraft:the_end"), + ("10", "minecraft:frozen_ocean"), + ("11", "minecraft:frozen_river"), + ("12", "minecraft:snowy_tundra"), + ("13", "minecraft:snowy_mountains"), + ("14", "minecraft:mushroom_fields"), + ("15", "minecraft:mushroom_field_shore"), + ("16", "minecraft:beach"), + ("17", "minecraft:desert_hills"), + ("18", "minecraft:wooded_hills"), + ("19", "minecraft:taiga_hills"), + ("20", "minecraft:mountain_edge"), + ("21", "minecraft:jungle"), + ("22", "minecraft:jungle_hills"), + ("23", "minecraft:jungle_edge"), + ("24", "minecraft:deep_ocean"), + ("25", "minecraft:stone_shore"), + ("26", "minecraft:snowy_beach"), + ("27", "minecraft:birch_forest"), + ("28", "minecraft:birch_forest_hills"), + ("29", "minecraft:dark_forest"), + ("30", "minecraft:snowy_taiga"), + ("31", "minecraft:snowy_taiga_hills"), + ("32", "minecraft:giant_tree_taiga"), + ("33", "minecraft:giant_tree_taiga_hills"), + ("34", "minecraft:wooded_mountains"), + ("35", "minecraft:savanna"), + ("36", "minecraft:savanna_plateau"), + ("37", "minecraft:badlands"), + ("38", "minecraft:wooded_badlands_plateau"), + ("39", "minecraft:badlands_plateau"), + ("40", "minecraft:small_end_islands"), + ("41", "minecraft:end_midlands"), + ("42", "minecraft:end_highlands"), + ("43", "minecraft:end_barrens"), + ("44", "minecraft:warm_ocean"), + ("45", "minecraft:lukewarm_ocean"), + ("46", "minecraft:cold_ocean"), + ("47", "minecraft:deep_warm_ocean"), + ("48", "minecraft:deep_lukewarm_ocean"), + ("49", "minecraft:deep_cold_ocean"), + ("50", "minecraft:deep_frozen_ocean"), + ("127", "minecraft:the_void"), + ("129", "minecraft:sunflower_plains"), + ("130", "minecraft:desert_lakes"), + ("131", "minecraft:gravelly_mountains"), + ("132", "minecraft:flower_forest"), + ("133", "minecraft:taiga_mountains"), + ("134", "minecraft:swamp_hills"), + ("140", "minecraft:ice_spikes"), + ("149", "minecraft:modified_jungle"), + ("151", "minecraft:modified_jungle_edge"), + ("155", "minecraft:tall_birch_forest"), + ("156", "minecraft:tall_birch_hills"), + ("157", "minecraft:dark_forest_hills"), + ("158", "minecraft:snowy_taiga_mountains"), + ("160", "minecraft:giant_spruce_taiga"), + ("161", "minecraft:giant_spruce_taiga_hills"), + ("162", "minecraft:modified_gravelly_mountains"), + ("163", "minecraft:shattered_savanna"), + ("164", "minecraft:shattered_savanna_plateau"), + ("165", "minecraft:eroded_badlands"), + ("166", "minecraft:modified_wooded_badlands_plateau"), + ("167", "minecraft:modified_badlands_plateau"), +]; + +pub static SPAWN_EGGS: &[(&str, &str)] = &[ + ("minecraft:bat", "minecraft:bat_spawn_egg"), + ("minecraft:blaze", "minecraft:blaze_spawn_egg"), + ("minecraft:cave_spider", "minecraft:cave_spider_spawn_egg"), + ("minecraft:chicken", "minecraft:chicken_spawn_egg"), + ("minecraft:cow", "minecraft:cow_spawn_egg"), + ("minecraft:creeper", "minecraft:creeper_spawn_egg"), + ("minecraft:donkey", "minecraft:donkey_spawn_egg"), + ("minecraft:elder_guardian", "minecraft:elder_guardian_spawn_egg"), + ("minecraft:ender_dragon", "minecraft:ender_dragon_spawn_egg"), + ("minecraft:enderman", "minecraft:enderman_spawn_egg"), + ("minecraft:endermite", "minecraft:endermite_spawn_egg"), + ("minecraft:evocation_illager", "minecraft:evocation_illager_spawn_egg"), + ("minecraft:ghast", "minecraft:ghast_spawn_egg"), + ("minecraft:guardian", "minecraft:guardian_spawn_egg"), + ("minecraft:horse", "minecraft:horse_spawn_egg"), + ("minecraft:husk", "minecraft:husk_spawn_egg"), + ("minecraft:iron_golem", "minecraft:iron_golem_spawn_egg"), + ("minecraft:llama", "minecraft:llama_spawn_egg"), + ("minecraft:magma_cube", "minecraft:magma_cube_spawn_egg"), + ("minecraft:mooshroom", "minecraft:mooshroom_spawn_egg"), + ("minecraft:mule", "minecraft:mule_spawn_egg"), + ("minecraft:ocelot", "minecraft:ocelot_spawn_egg"), + ("minecraft:pufferfish", "minecraft:pufferfish_spawn_egg"), + ("minecraft:parrot", "minecraft:parrot_spawn_egg"), + ("minecraft:pig", "minecraft:pig_spawn_egg"), + ("minecraft:polar_bear", "minecraft:polar_bear_spawn_egg"), + ("minecraft:rabbit", "minecraft:rabbit_spawn_egg"), + ("minecraft:sheep", "minecraft:sheep_spawn_egg"), + ("minecraft:shulker", "minecraft:shulker_spawn_egg"), + ("minecraft:silverfish", "minecraft:silverfish_spawn_egg"), + ("minecraft:skeleton", "minecraft:skeleton_spawn_egg"), + ("minecraft:skeleton_horse", "minecraft:skeleton_horse_spawn_egg"), + ("minecraft:slime", "minecraft:slime_spawn_egg"), + ("minecraft:snow_golem", "minecraft:snow_golem_spawn_egg"), + ("minecraft:spider", "minecraft:spider_spawn_egg"), + ("minecraft:squid", "minecraft:squid_spawn_egg"), + ("minecraft:stray", "minecraft:stray_spawn_egg"), + ("minecraft:turtle", "minecraft:turtle_spawn_egg"), + ("minecraft:vex", "minecraft:vex_spawn_egg"), + ("minecraft:villager", "minecraft:villager_spawn_egg"), + ("minecraft:vindication_illager", "minecraft:vindication_illager_spawn_egg"), + ("minecraft:witch", "minecraft:witch_spawn_egg"), + ("minecraft:wither", "minecraft:wither_spawn_egg"), + ("minecraft:wither_skeleton", "minecraft:wither_skeleton_spawn_egg"), + ("minecraft:wolf", "minecraft:wolf_spawn_egg"), + ("minecraft:zombie", "minecraft:zombie_spawn_egg"), + ("minecraft:zombie_horse", "minecraft:zombie_horse_spawn_egg"), + ("minecraft:zombie_pigman", "minecraft:zombie_pigman_spawn_egg"), + ("minecraft:zombie_villager", "minecraft:zombie_villager_spawn_egg"), +]; + +pub static ENCHANTMENTS: &[(i32, &str)] = &[ + (0, "minecraft:protection"), + (1, "minecraft:fire_protection"), + (2, "minecraft:feather_falling"), + (3, "minecraft:blast_protection"), + (4, "minecraft:projectile_protection"), + (5, "minecraft:respiration"), + (6, "minecraft:aqua_affinity"), + (7, "minecraft:thorns"), + (8, "minecraft:depth_strider"), + (9, "minecraft:frost_walker"), + (10, "minecraft:binding_curse"), + (16, "minecraft:sharpness"), + (17, "minecraft:smite"), + (18, "minecraft:bane_of_arthropods"), + (19, "minecraft:knockback"), + (20, "minecraft:fire_aspect"), + (21, "minecraft:looting"), + (22, "minecraft:sweeping"), + (32, "minecraft:efficiency"), + (33, "minecraft:silk_touch"), + (34, "minecraft:unbreaking"), + (35, "minecraft:fortune"), + (48, "minecraft:power"), + (49, "minecraft:punch"), + (50, "minecraft:flame"), + (51, "minecraft:infinity"), + (61, "minecraft:luck_of_the_sea"), + (62, "minecraft:lure"), + (65, "minecraft:loyalty"), + (66, "minecraft:impaling"), + (67, "minecraft:riptide"), + (68, "minecraft:channeling"), + (70, "minecraft:mending"), + (71, "minecraft:vanishing_curse"), +]; + +pub static CORAL: &[(&str, &str)] = &[ + ("minecraft:blue_coral", "minecraft:tube_coral_block"), + ("minecraft:pink_coral", "minecraft:brain_coral_block"), + ("minecraft:purple_coral", "minecraft:bubble_coral_block"), + ("minecraft:red_coral", "minecraft:fire_coral_block"), + ("minecraft:yellow_coral", "minecraft:horn_coral_block"), + ("minecraft:blue_coral_plant", "minecraft:tube_coral"), + ("minecraft:pink_coral_plant", "minecraft:brain_coral"), + ("minecraft:purple_coral_plant", "minecraft:bubble_coral"), + ("minecraft:red_coral_plant", "minecraft:fire_coral"), + ("minecraft:yellow_coral_plant", "minecraft:horn_coral"), + ("minecraft:blue_coral_fan", "minecraft:tube_coral_fan"), + ("minecraft:pink_coral_fan", "minecraft:brain_coral_fan"), + ("minecraft:purple_coral_fan", "minecraft:bubble_coral_fan"), + ("minecraft:red_coral_fan", "minecraft:fire_coral_fan"), + ("minecraft:yellow_coral_fan", "minecraft:horn_coral_fan"), + ("minecraft:blue_dead_coral", "minecraft:dead_tube_coral"), + ("minecraft:pink_dead_coral", "minecraft:dead_brain_coral"), + ("minecraft:purple_dead_coral", "minecraft:dead_bubble_coral"), + ("minecraft:red_dead_coral", "minecraft:dead_fire_coral"), + ("minecraft:yellow_dead_coral", "minecraft:dead_horn_coral"), +]; + +pub static CORAL_FANS: &[(&str, &str)] = &[ + ("minecraft:tube_coral_fan", "minecraft:tube_coral_wall_fan"), + ("minecraft:brain_coral_fan", "minecraft:brain_coral_wall_fan"), + ("minecraft:bubble_coral_fan", "minecraft:bubble_coral_wall_fan"), + ("minecraft:fire_coral_fan", "minecraft:fire_coral_wall_fan"), + ("minecraft:horn_coral_fan", "minecraft:horn_coral_wall_fan"), +]; + +pub static THE_RENAMENING_ENTITIES: &[(&str, &str)] = &[ + ("minecraft:commandblock_minecart", "minecraft:command_block_minecart"), + ("minecraft:ender_crystal", "minecraft:end_crystal"), + ("minecraft:snowman", "minecraft:snow_golem"), + ("minecraft:evocation_illager", "minecraft:evoker"), + ("minecraft:evocation_fangs", "minecraft:evoker_fangs"), + ("minecraft:illusion_illager", "minecraft:illusioner"), + ("minecraft:vindication_illager", "minecraft:vindicator"), + ("minecraft:villager_golem", "minecraft:iron_golem"), + ("minecraft:xp_orb", "minecraft:experience_orb"), + ("minecraft:xp_bottle", "minecraft:experience_bottle"), + ("minecraft:eye_of_ender_signal", "minecraft:eye_of_ender"), + ("minecraft:fireworks_rocket", "minecraft:firework_rocket"), +]; + +pub static THE_RENAMENING_BLOCKS: &[(&str, &str)] = &[ + ("minecraft:portal", "minecraft:nether_portal"), + ("minecraft:oak_bark", "minecraft:oak_wood"), + ("minecraft:spruce_bark", "minecraft:spruce_wood"), + ("minecraft:birch_bark", "minecraft:birch_wood"), + ("minecraft:jungle_bark", "minecraft:jungle_wood"), + ("minecraft:acacia_bark", "minecraft:acacia_wood"), + ("minecraft:dark_oak_bark", "minecraft:dark_oak_wood"), + ("minecraft:stripped_oak_bark", "minecraft:stripped_oak_wood"), + ("minecraft:stripped_spruce_bark", "minecraft:stripped_spruce_wood"), + ("minecraft:stripped_birch_bark", "minecraft:stripped_birch_wood"), + ("minecraft:stripped_jungle_bark", "minecraft:stripped_jungle_wood"), + ("minecraft:stripped_acacia_bark", "minecraft:stripped_acacia_wood"), + ("minecraft:stripped_dark_oak_bark", "minecraft:stripped_dark_oak_wood"), + ("minecraft:mob_spawner", "minecraft:spawner"), +]; + +pub static COD_SALMON: &[(&str, &str)] = &[ + ("minecraft:salmon_mob", "minecraft:salmon"), + ("minecraft:cod_mob", "minecraft:cod"), +]; + +pub static COD_SALMON_EGGS: &[(&str, &str)] = &[ + ("minecraft:salmon_mob_spawn_egg", "minecraft:salmon_spawn_egg"), + ("minecraft:cod_mob_spawn_egg", "minecraft:cod_spawn_egg"), +]; + +/// `ChunkStructuresTemplateRenameFix.RENAMES`: structure id, child id, template renames. +pub static STRUCTURE_TEMPLATE_RENAMES: &[(&str, &str, &[(&str, &str)])] = &[ + ("EndCity", "ECP", &[ + ("second_floor", "second_floor_1"), + ("third_floor", "third_floor_1"), + ("third_floor_c", "third_floor_2"), + ]), + ("Mansion", "WMP", &[ + ("carpet_south", "carpet_south_1"), + ("carpet_west", "carpet_west_1"), + ("indoors_door", "indoors_door_1"), + ("indoors_wall", "indoors_wall_1"), + ]), + ("Igloo", "Iglu", &[ + ("minecraft:igloo/igloo_bottom", "minecraft:igloo/bottom"), + ("minecraft:igloo/igloo_middle", "minecraft:igloo/middle"), + ("minecraft:igloo/igloo_top", "minecraft:igloo/top"), + ]), + ("Ocean_Ruin", "ORP", &[ + ("minecraft:ruin/big_ruin1_brick", "minecraft:underwater_ruin/big_brick_1"), + ("minecraft:ruin/big_ruin2_brick", "minecraft:underwater_ruin/big_brick_2"), + ("minecraft:ruin/big_ruin3_brick", "minecraft:underwater_ruin/big_brick_3"), + ("minecraft:ruin/big_ruin8_brick", "minecraft:underwater_ruin/big_brick_8"), + ("minecraft:ruin/big_ruin1_cracked", "minecraft:underwater_ruin/big_cracked_1"), + ("minecraft:ruin/big_ruin2_cracked", "minecraft:underwater_ruin/big_cracked_2"), + ("minecraft:ruin/big_ruin3_cracked", "minecraft:underwater_ruin/big_cracked_3"), + ("minecraft:ruin/big_ruin8_cracked", "minecraft:underwater_ruin/big_cracked_8"), + ("minecraft:ruin/big_ruin1_mossy", "minecraft:underwater_ruin/big_mossy_1"), + ("minecraft:ruin/big_ruin2_mossy", "minecraft:underwater_ruin/big_mossy_2"), + ("minecraft:ruin/big_ruin3_mossy", "minecraft:underwater_ruin/big_mossy_3"), + ("minecraft:ruin/big_ruin8_mossy", "minecraft:underwater_ruin/big_mossy_8"), + ("minecraft:ruin/big_ruin_warm4", "minecraft:underwater_ruin/big_warm_4"), + ("minecraft:ruin/big_ruin_warm5", "minecraft:underwater_ruin/big_warm_5"), + ("minecraft:ruin/big_ruin_warm6", "minecraft:underwater_ruin/big_warm_6"), + ("minecraft:ruin/big_ruin_warm7", "minecraft:underwater_ruin/big_warm_7"), + ("minecraft:ruin/ruin1_brick", "minecraft:underwater_ruin/brick_1"), + ("minecraft:ruin/ruin2_brick", "minecraft:underwater_ruin/brick_2"), + ("minecraft:ruin/ruin3_brick", "minecraft:underwater_ruin/brick_3"), + ("minecraft:ruin/ruin4_brick", "minecraft:underwater_ruin/brick_4"), + ("minecraft:ruin/ruin5_brick", "minecraft:underwater_ruin/brick_5"), + ("minecraft:ruin/ruin6_brick", "minecraft:underwater_ruin/brick_6"), + ("minecraft:ruin/ruin7_brick", "minecraft:underwater_ruin/brick_7"), + ("minecraft:ruin/ruin8_brick", "minecraft:underwater_ruin/brick_8"), + ("minecraft:ruin/ruin1_cracked", "minecraft:underwater_ruin/cracked_1"), + ("minecraft:ruin/ruin2_cracked", "minecraft:underwater_ruin/cracked_2"), + ("minecraft:ruin/ruin3_cracked", "minecraft:underwater_ruin/cracked_3"), + ("minecraft:ruin/ruin4_cracked", "minecraft:underwater_ruin/cracked_4"), + ("minecraft:ruin/ruin5_cracked", "minecraft:underwater_ruin/cracked_5"), + ("minecraft:ruin/ruin6_cracked", "minecraft:underwater_ruin/cracked_6"), + ("minecraft:ruin/ruin7_cracked", "minecraft:underwater_ruin/cracked_7"), + ("minecraft:ruin/ruin8_cracked", "minecraft:underwater_ruin/cracked_8"), + ("minecraft:ruin/ruin1_mossy", "minecraft:underwater_ruin/mossy_1"), + ("minecraft:ruin/ruin2_mossy", "minecraft:underwater_ruin/mossy_2"), + ("minecraft:ruin/ruin3_mossy", "minecraft:underwater_ruin/mossy_3"), + ("minecraft:ruin/ruin4_mossy", "minecraft:underwater_ruin/mossy_4"), + ("minecraft:ruin/ruin5_mossy", "minecraft:underwater_ruin/mossy_5"), + ("minecraft:ruin/ruin6_mossy", "minecraft:underwater_ruin/mossy_6"), + ("minecraft:ruin/ruin7_mossy", "minecraft:underwater_ruin/mossy_7"), + ("minecraft:ruin/ruin8_mossy", "minecraft:underwater_ruin/mossy_8"), + ("minecraft:ruin/ruin_warm1", "minecraft:underwater_ruin/warm_1"), + ("minecraft:ruin/ruin_warm2", "minecraft:underwater_ruin/warm_2"), + ("minecraft:ruin/ruin_warm3", "minecraft:underwater_ruin/warm_3"), + ("minecraft:ruin/ruin_warm4", "minecraft:underwater_ruin/warm_4"), + ("minecraft:ruin/ruin_warm5", "minecraft:underwater_ruin/warm_5"), + ("minecraft:ruin/ruin_warm6", "minecraft:underwater_ruin/warm_6"), + ("minecraft:ruin/ruin_warm7", "minecraft:underwater_ruin/warm_7"), + ("minecraft:ruin/ruin_warm8", "minecraft:underwater_ruin/warm_8"), + ("minecraft:ruin/big_brick_1", "minecraft:underwater_ruin/big_brick_1"), + ("minecraft:ruin/big_brick_2", "minecraft:underwater_ruin/big_brick_2"), + ("minecraft:ruin/big_brick_3", "minecraft:underwater_ruin/big_brick_3"), + ("minecraft:ruin/big_brick_8", "minecraft:underwater_ruin/big_brick_8"), + ("minecraft:ruin/big_mossy_1", "minecraft:underwater_ruin/big_mossy_1"), + ("minecraft:ruin/big_mossy_2", "minecraft:underwater_ruin/big_mossy_2"), + ("minecraft:ruin/big_mossy_3", "minecraft:underwater_ruin/big_mossy_3"), + ("minecraft:ruin/big_mossy_8", "minecraft:underwater_ruin/big_mossy_8"), + ("minecraft:ruin/big_cracked_1", "minecraft:underwater_ruin/big_cracked_1"), + ("minecraft:ruin/big_cracked_2", "minecraft:underwater_ruin/big_cracked_2"), + ("minecraft:ruin/big_cracked_3", "minecraft:underwater_ruin/big_cracked_3"), + ("minecraft:ruin/big_cracked_8", "minecraft:underwater_ruin/big_cracked_8"), + ("minecraft:ruin/big_warm_4", "minecraft:underwater_ruin/big_warm_4"), + ("minecraft:ruin/big_warm_5", "minecraft:underwater_ruin/big_warm_5"), + ("minecraft:ruin/big_warm_6", "minecraft:underwater_ruin/big_warm_6"), + ("minecraft:ruin/big_warm_7", "minecraft:underwater_ruin/big_warm_7"), + ]), +]; diff --git a/crates/horizon-world/src/datafix/mod.rs b/crates/horizon-world/src/datafix/mod.rs index eecd9c268..5ebcfbc9c 100644 --- a/crates/horizon-world/src/datafix/mod.rs +++ b/crates/horizon-world/src/datafix/mod.rs @@ -9,13 +9,18 @@ //! with the schema just below its own key ([`schema`]). Data older than //! [`OLDEST_SUPPORTED`] needs fixes that are not ported. The fixes of client //! files (options, hotbars, debug profiles) are not ported either. +mod block_state_data; +mod chunk_flatten; +mod chunk_leaves; pub mod dynamic; pub mod files; mod fixes_a; mod fixes_b; mod fixes_c; mod fixes_cliffs; +mod fixes_flat; mod fixes_old; +mod flat_tables; mod items; pub mod json; pub mod schema; @@ -177,6 +182,7 @@ type FixFn = fn(&mut Cx); /// Every ported fix (from the 1.19 schemas on), in DataFixers order. fn fixes() -> Vec<(Key, FixFn)> { let mut out = Vec::new(); + fixes_flat::register(&mut out); fixes_cliffs::register(&mut out); fixes_old::register(&mut out); fixes_a::register(&mut out); @@ -219,7 +225,17 @@ fn read_hooks(root: Ty, data: &mut Tag, k: Key) { *stack = Tag::compound([("id", stack.clone()), ("count", Tag::Int(1))]); } }); - walk(root, data, k, Ty::Objective, &mut fixes_a::unpack_objective); + if k >= key(1451, 6) { + walk(root, data, k, Ty::Objective, &mut fixes_a::unpack_objective); + } + // Namespaced name types read their strings with `ensureNamespaced`. + for ty in [Ty::Biome, Ty::EntityName] { + walk(root, data, k, ty, &mut |name| { + if let Some(n) = as_str(Some(name)) { + *name = string(&dynamic::namespaced(&n)); + } + }); + } } fn write_hooks(root: Ty, data: &mut Tag, k: Key) { diff --git a/crates/horizon-world/src/datafix/schema.rs b/crates/horizon-world/src/datafix/schema.rs index bf627401f..209f4386d 100644 --- a/crates/horizon-world/src/datafix/schema.rs +++ b/crates/horizon-world/src/datafix/schema.rs @@ -8,6 +8,9 @@ use super::dynamic::{as_str, namespaced}; use crate::nbt::Tag; +#[path = "schema_flat.rs"] +mod flat; + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub enum Ty { Level, @@ -144,6 +147,9 @@ impl Walker<'_> { fn children(&mut self, ty: Ty, v: &mut Tag) { let k = self.k; + if k < flat::END && self.legacy_children(ty, v) { + return; + } match ty { Ty::Level => { if k < key(4771, 0) { @@ -833,6 +839,9 @@ impl Walker<'_> { /// Block entity ids the schema at `k` knows (others are read as remainder). pub fn block_entity_known(be: &Tag, k: Key) -> bool { let id = namespaced(&as_str(be.get("id")).unwrap_or_default()); + if k < flat::END { + return flat::legacy_block_entity_known(&id, k); + } let since = match id.as_str() { "minecraft:sculk_catalyst" => key(3076, 0), "minecraft:sculk_shrieker" => key(3078, 0), diff --git a/crates/horizon-world/src/datafix/schema_flat.rs b/crates/horizon-world/src/datafix/schema_flat.rs new file mode 100644 index 000000000..9688da48b --- /dev/null +++ b/crates/horizon-world/src/datafix/schema_flat.rs @@ -0,0 +1,166 @@ +//! The schemas of before 1.14 (keys below 1800): V99 to V1510 as far as the fixes +//! of those versions look. [`Walker::legacy_children`] answers for the types whose +//! shape differs from the general code of [`super`]; the other types fall through. +use super::{Key, Ty, Walker, as_str, key, namespaced}; +use crate::nbt::Tag; + +/// The schemas below this key are described here. +pub(super) const END: Key = key(1800, 0); + +impl Walker<'_> { + /// `children` for a schema below [`END`]; false when the general code applies. + pub(super) fn legacy_children(&mut self, ty: Ty, v: &mut Tag) -> bool { + let k = self.k; + match ty { + Ty::Entity => { + self.legacy_entity(v); + true + } + // STATS is a plain map until V1451_6 turns it into typed counters. + Ty::Stats if k < key(1451, 6) => true, + Ty::Objective if k < key(1451, 6) => { + self.field(Ty::TextComponent, v, "DisplayName"); + true + } + _ => false, + } + } + + /// `ENTITY` of the schemas V705 to V1510 (the ids are `minecraft:...` since V704). + fn legacy_entity(&mut self, v: &mut Tag) { + let k = self.k; + self.list(Ty::ItemStack, v, "ArmorItems"); + self.list(Ty::ItemStack, v, "HandItems"); + self.field(Ty::TextComponent, v, "CustomName"); + let id = namespaced(&as_str(v.get("id")).unwrap_or_default()); + // V1451_3 flattens the blocks of entities; V1510 renames some entities. + let blocks_as_names = k < key(1451, 3); + let renamed = k >= key(1510, 0); + let block = |w: &mut Self, v: &mut Tag, old: &str, new: &str| { + if blocks_as_names { + w.field(Ty::BlockName, v, old); + } else { + w.field(Ty::BlockState, v, new); + } + }; + match id.as_str() { + "minecraft:area_effect_cloud" => self.field(Ty::Particle, v, "Particle"), + "minecraft:arrow" | "minecraft:spectral_arrow" => block(self, v, "inTile", "inBlockState"), + "minecraft:egg" + | "minecraft:ender_pearl" + | "minecraft:fireball" + | "minecraft:small_fireball" + | "minecraft:snowball" + | "minecraft:wither_skull" => { + if blocks_as_names { + self.field(Ty::BlockName, v, "inTile"); + } + } + "minecraft:xp_bottle" if !renamed => { + if blocks_as_names { + self.field(Ty::BlockName, v, "inTile"); + } + } + "minecraft:potion" => { + self.field(Ty::ItemStack, v, "Potion"); + if blocks_as_names { + self.field(Ty::BlockName, v, "inTile"); + } + } + "minecraft:trident" => { + self.field(Ty::BlockState, v, "inBlockState"); + self.field(Ty::ItemStack, v, "Trident"); + } + "minecraft:chest_minecart" | "minecraft:hopper_minecart" => { + block(self, v, "DisplayTile", "DisplayState"); + self.list(Ty::ItemStack, v, "Items"); + } + "minecraft:minecart" | "minecraft:furnace_minecart" | "minecraft:tnt_minecart" => { + block(self, v, "DisplayTile", "DisplayState"); + } + "minecraft:commandblock_minecart" if !renamed => { + block(self, v, "DisplayTile", "DisplayState"); + self.field(Ty::TextComponent, v, "LastOutput"); + } + "minecraft:command_block_minecart" if renamed => { + block(self, v, "DisplayTile", "DisplayState"); + self.field(Ty::TextComponent, v, "LastOutput"); + } + "minecraft:spawner_minecart" => { + block(self, v, "DisplayTile", "DisplayState"); + self.spawner(v); + } + "minecraft:enderman" => block(self, v, "carried", "carriedBlockState"), + "minecraft:falling_block" => { + block(self, v, "Block", "BlockState"); + self.field(Ty::BlockEntity, v, "TileEntityData"); + } + "minecraft:fireworks_rocket" if !renamed => self.field(Ty::ItemStack, v, "FireworksItem"), + "minecraft:firework_rocket" if renamed => self.field(Ty::ItemStack, v, "FireworksItem"), + "minecraft:item" | "minecraft:item_frame" => self.field(Ty::ItemStack, v, "Item"), + "minecraft:horse" => { + self.field(Ty::ItemStack, v, "ArmorItem"); + self.field(Ty::ItemStack, v, "SaddleItem"); + } + "minecraft:donkey" | "minecraft:mule" => { + self.list(Ty::ItemStack, v, "Items"); + self.field(Ty::ItemStack, v, "SaddleItem"); + } + "minecraft:llama" => { + self.list(Ty::ItemStack, v, "Items"); + self.field(Ty::ItemStack, v, "SaddleItem"); + self.field(Ty::ItemStack, v, "DecorItem"); + } + "minecraft:skeleton_horse" | "minecraft:zombie_horse" => { + self.field(Ty::ItemStack, v, "SaddleItem"); + } + "minecraft:villager" => { + self.list(Ty::ItemStack, v, "Inventory"); + if let Some(o) = v.get_mut("Offers") { + self.list(Ty::VillagerTrade, o, "Recipes"); + } + } + "minecraft:zombie_villager" => { + if let Some(o) = v.get_mut("Offers") { + self.list(Ty::VillagerTrade, o, "Recipes"); + } + } + _ => {} + } + } +} + +/// Whether the block entity id is registered in the schema at `k` (before 1.14). +pub(super) fn legacy_block_entity_known(id: &str, k: Key) -> bool { + match id { + "minecraft:furnace" + | "minecraft:chest" + | "minecraft:ender_chest" + | "minecraft:jukebox" + | "minecraft:dispenser" + | "minecraft:dropper" + | "minecraft:sign" + | "minecraft:mob_spawner" + | "minecraft:piston" + | "minecraft:brewing_stand" + | "minecraft:enchanting_table" + | "minecraft:end_portal" + | "minecraft:beacon" + | "minecraft:skull" + | "minecraft:daylight_detector" + | "minecraft:hopper" + | "minecraft:comparator" + | "minecraft:banner" + | "minecraft:structure_block" + | "minecraft:end_gateway" + | "minecraft:command_block" + | "minecraft:shulker_box" => true, + // Registered by V1125 and dropped by V1451_5. + "minecraft:bed" => k >= key(1125, 0), + "minecraft:noteblock" | "minecraft:flower_pot" => k < key(1451, 5), + "minecraft:trapped_chest" => k >= key(1451, 0), + "DUMMY" => k >= key(1466, 0), + "minecraft:conduit" => k >= key(1481, 0), + _ => false, + } +} diff --git a/tools/gen_block_state_data.py b/tools/gen_block_state_data.py new file mode 100644 index 000000000..5a4ab4072 --- /dev/null +++ b/tools/gen_block_state_data.py @@ -0,0 +1,333 @@ +#!/usr/bin/env python3 +"""Convert vanilla's BlockStateData.java into a plain data file. + +Reads .local/minecraft/26.3/sources/server/net/minecraft/util/datafix/fixes/BlockStateData.java +Writes crates/horizon-world/src/datafix/block_state_data.txt + +Output: UTF-8, '#' header lines, then one line per register() call, in the order the +calls execute (the static initializer order of the bootstrap* methods), tab separated: + + ID newName newProps legacyName1 legacyProps1 legacyName2 legacyProps2 ... + +Props are `key=value` pairs joined by `;`, sorted by key; empty string when there are none +(including an explicit `Map.of()`). + +Usage: tools/gen_block_state_data.py [path/to/BlockStateData.java] [-o output.txt] +Re-runnable: the output only depends on the Java file. +""" +import argparse +import re +import sys +from pathlib import Path + +REPO = Path(__file__).resolve().parent.parent +DEFAULT_JAVA = REPO / ".local/minecraft/26.3/sources/server/net/minecraft/util/datafix/fixes/BlockStateData.java" +DEFAULT_OUT = REPO / "crates/horizon-world/src/datafix/block_state_data.txt" + +TOKEN_RE = re.compile( + r""" + (?P\s+) + | (?P//[^\n]*) + | (?P/\*.*?\*/) + | (?P"(?:[^"\\]|\\.)*") + | (?P[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*) + | (?P-?[0-9]+) + | (?P[(),;{}=<>?\[\].@!\-+*/%|&~:^']) + """, + re.X | re.S, +) + + +def tokenize(text): + pos = 0 + out = [] + while pos < len(text): + m = TOKEN_RE.match(text, pos) + if not m: + raise SystemExit(f"tokenize error at offset {pos}: {text[pos:pos+60]!r}") + pos = m.end() + kind = m.lastgroup + if kind in ("ws", "lcomment", "bcomment"): + continue + out.append((kind, m.group())) + return out + + +def unquote(s): + inner = s[1:-1] + if "\\" in inner: + raise SystemExit(f"unexpected escape in string {s}") + return inner + + +class Parser: + """Parses a token list holding a call expression tree: ident(args) / strings / numbers / idents.""" + + def __init__(self, toks, consts): + self.toks = toks + self.i = 0 + self.consts = consts + + def peek(self): + return self.toks[self.i] if self.i < len(self.toks) else (None, None) + + def next(self): + t = self.toks[self.i] + self.i += 1 + return t + + def expect(self, val): + k, v = self.next() + if v != val: + raise SystemExit(f"expected {val!r} got {v!r} at token {self.i}") + + def parse_args(self): + """After '(' consumed: return list of parsed args up to ')'.""" + args = [] + if self.peek()[1] == ")": + self.next() + return args + while True: + args.append(self.parse_expr()) + k, v = self.next() + if v == ")": + return args + if v != ",": + raise SystemExit(f"expected ',' or ')' got {v!r} at token {self.i}") + + def parse_expr(self): + k, v = self.next() + if k == "string": + return ("str", unquote(v)) + if k == "number": + return ("int", int(v)) + if k == "ident": + if self.peek()[1] == "(": + self.next() + args = self.parse_args() + return ("call", v, args) + return ("name", v) + raise SystemExit(f"unexpected token {v!r} at {self.i}") + + +def eval_map(expr, consts): + """Evaluate a Map.of(...) call or a constant name into a dict.""" + if expr[0] == "name": + if expr[1] not in consts: + raise SystemExit(f"unresolved map constant {expr[1]}") + return dict(consts[expr[1]]) + if expr[0] == "call" and expr[1] == "Map.of": + args = expr[2] + if len(args) % 2: + raise SystemExit("odd Map.of args") + d = {} + for a in range(0, len(args), 2): + k, v = args[a], args[a + 1] + if k[0] != "str" or v[0] != "str": + raise SystemExit(f"non-string Map.of entry {k} {v}") + if k[1] in d: + raise SystemExit(f"duplicate key {k[1]}") + d[k[1]] = v[1] + return d + raise SystemExit(f"cannot evaluate map expr {expr}") + + +def fmt_props(d): + for k, v in d.items(): + if not re.fullmatch(r"[a-z0-9_]+", k) or not re.fullmatch(r"[A-Za-z0-9_]+", v): + raise SystemExit(f"unexpected prop chars {k}={v}") + return ";".join(f"{k}={d[k]}" for k in sorted(d)) + + +def eval_create(expr, consts): + if expr[0] != "call" or expr[1] != "create": + raise SystemExit(f"expected create(...) got {expr}") + args = expr[2] + if not args or args[0][0] != "str": + raise SystemExit(f"create without name: {expr}") + name = args[0][1] + if not re.fullmatch(r"[a-z0-9_:]+", name) and name != "%%FILTER_ME%%": + raise SystemExit(f"bad block name {name!r}") + if len(args) == 1: + return name, "" + if len(args) == 2: + return name, fmt_props(eval_map(args[1], consts)) + raise SystemExit(f"create with {len(args)} args") + + +def matching_brace(toks, i): + """toks[i] is '{'; return index of matching '}'.""" + depth = 0 + for j in range(i, len(toks)): + if toks[j][1] == "{": + depth += 1 + elif toks[j][1] == "}": + depth -= 1 + if depth == 0: + return j + raise SystemExit("unbalanced braces") + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("java", nargs="?", default=str(DEFAULT_JAVA)) + ap.add_argument("-o", "--output", default=str(DEFAULT_OUT)) + a = ap.parse_args() + java_path = Path(a.java) + text = java_path.read_text(encoding="utf-8") + + toks = tokenize(text) + + # ---- map constants: `private static final Map NAME = ;` + consts = {} + i = 0 + n = len(toks) + while i < n: + if ( + toks[i][1] == "Map" + and toks[i + 1][1] == "<" + and i >= 3 + and toks[i - 1][1] == "final" + and toks[i - 2][1] == "static" + ): + # Map < String , String > NAME = expr ; + j = i + 1 + while toks[j][1] != ">": + j += 1 + name = toks[j + 1][1] + assert toks[j + 2][1] == "=", toks[j : j + 4] + p = Parser(toks[j + 3 :], consts) + expr = p.parse_expr() + assert toks[j + 3 + p.i][1] == ";", toks[j + 3 + p.i] + if name in consts: + raise SystemExit(f"duplicate const {name}") + consts[name] = eval_map(expr, consts) + i = j + 3 + p.i + else: + i += 1 + + # ---- methods: find `void bootstrapX ( ) {` bodies + bodies = {} + for i in range(n - 5): + if ( + toks[i][1] == "void" + and toks[i + 1][1].startswith("bootstrap") + and toks[i + 2][1] == "(" + and toks[i + 3][1] == ")" + and toks[i + 4][1] == "{" + ): + end = matching_brace(toks, i + 4) + bodies[toks[i + 1][1]] = toks[i + 5 : end] + + # ---- static initializer order + order = None + for i in range(n - 1): + if toks[i][1] == "static" and toks[i + 1][1] == "{": + end = matching_brace(toks, i + 1) + seq = [] + k = i + 2 + while k < end: + if toks[k][0] == "ident" and toks[k][1].startswith("bootstrap") and toks[k + 1][1] == "(": + seq.append(toks[k][1]) + k += 3 + else: + k += 1 + order = seq + if not order: + raise SystemExit("static initializer not found") + if set(order) != set(bodies) or len(order) != len(set(order)): + raise SystemExit(f"bootstrap methods {sorted(bodies)} vs called {order}") + + # ---- parse register calls + lines = [] + total_register = 0 + total_create = 0 + total_legacy = 0 + max_id = -1 + for m in order: + body = bodies[m] + k = 0 + while k < len(body): + t = body[k] + if t[0] == "ident" and t[1] == "register" and body[k + 1][1] == "(": + p = Parser(body[k + 2 :], consts) + args = p.parse_args() + k += 2 + p.i + if body[k][1] != ";": + raise SystemExit(f"{m}: register not followed by ';'") + total_register += 1 + if args[0][0] != "int": + raise SystemExit(f"{m}: register id not int: {args[0]}") + rid = args[0][1] + if len(args) < 2: + raise SystemExit(f"{m}: register({rid}) without new tag") + fields = [str(rid)] + for c in args[1:]: + name, props = eval_create(c, consts) + total_create += 1 + fields += [name, props] + total_legacy += len(args) - 2 + max_id = max(max_id, rid) + lines.append("\t".join(fields)) + else: + # anything other than register(...) ; in a bootstrap body is unexpected + raise SystemExit(f"{m}: unexpected token {t} in body") + k += 1 + k += 1 # skip ';' + + # ---- independent validation: count `register(` occurrences inside bootstrap bodies (text based) + src_lines = text.split("\n") + in_body = False + textual = 0 + for ln in src_lines: + if re.match(r"\s*private static void bootstrap\w*\(\)\s*\{", ln): + in_body = True + continue + if in_body: + if re.match(r" \}\s*$", ln): + in_body = False + continue + textual += len(re.findall(r"\bregister\(", ln)) + if textual != total_register or textual != len(lines): + raise SystemExit(f"register count mismatch: textual {textual}, parsed {total_register}, lines {len(lines)}") + textual_create = 0 + in_body = False + for ln in src_lines: + if re.match(r"\s*private static void bootstrap\w*\(\)\s*\{", ln): + in_body = True + continue + if in_body: + if re.match(r" \}\s*$", ln): + in_body = False + continue + textual_create += len(re.findall(r"\bcreate\(", ln)) + if textual_create != total_create: + raise SystemExit(f"create count mismatch: textual {textual_create}, parsed {total_create}") + + header = [ + "# Generated by tools/gen_block_state_data.py from vanilla 26.3 BlockStateData.java. Do not edit.", + "# One line per register(ID, new, legacy...) call, in execution order of the static initializer", + "# (bootstrap0, 1, 2, 3_1, 3_2, 4 .. 9, A .. F).", + "# Format (tab separated): ID newName newProps [ legacyName legacyProps]...", + "# ID is the decimal 1.12 (blockId << 4 | data) id; newName/newProps is the 1.13 block state;", + "# each legacy pair is a 1.12 Name + Properties tag that maps to ID.", + "# Props: key=value pairs joined by ';', sorted by key; empty string when there are none.", + "# newName may be the literal %%FILTER_ME%% (vanilla FILTER_ME marker, the skull ids 2304..2317).", + ] + out = Path(a.output) + out.parent.mkdir(parents=True, exist_ok=True) + out.write_text("\n".join(header + lines) + "\n", encoding="utf-8") + + print(f"java: {java_path}") + print(f"output: {out}") + print(f"map constants: {len(consts)}") + print(f"bootstrap order: {' '.join(order)}") + print(f"register calls: {total_register} (grep count {textual})") + print(f"data lines: {len(lines)}") + print(f"create() calls: {total_create} (all resolved; grep count {textual_create})") + print(f"legacy tags: {total_legacy}") + print(f"highest ID: {max_id}") + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/tools/gen_flat_tables.py b/tools/gen_flat_tables.py new file mode 100644 index 000000000..5feb93463 --- /dev/null +++ b/tools/gen_flat_tables.py @@ -0,0 +1,144 @@ +#!/usr/bin/env python3 +"""Copy the lookup tables of vanilla's flattening-era DataFixers (1.12.2 -> 1.13.2) into +crates/horizon-world/src/datafix/flat_tables.rs, so that the Rust fixes use exactly vanilla's +data. Run from the repository root; the vanilla sources are the ones under .local/minecraft. + + gen_flat_tables.py [-o OUT] +""" +import argparse +import re +import sys +from pathlib import Path + +ROOT = Path(__file__).resolve().parent.parent +FIXES = ROOT / '.local' / 'minecraft' / '26.3' / 'sources' / 'server' / 'net' / 'minecraft' / 'util' / 'datafix' / 'fixes' +OUT = ROOT / 'crates' / 'horizon-world' / 'src' / 'datafix' / 'flat_tables.rs' + +STR = r'"((?:[^"\\]|\\.)*)"' + + +def declaration(text, var): + """The source of `NAME = ...;` for a field called `var`.""" + m = re.search(r'\b' + re.escape(var) + r'\s*=', text) + if not m: + sys.exit(f'declaration {var} not found') + depth = 0 + i = m.end() + while True: + c = text[i] + if c in '({[': + depth += 1 + elif c in ')}]': + depth -= 1 + elif c == '"': + i = text.index('"', i + 1) + while text[i - 1] == '\\': + i = text.index('"', i + 1) + elif c == ';' and depth == 0: + return text[m.end():i] + i += 1 + + +def pairs(path, var, value_int=False, key_int=False): + body = declaration((FIXES / path).read_text(), var) + key = r'(\d+)' if key_int else STR + value = r'(\d+)' if value_int else STR + out = re.findall(r'put\(\s*' + key + r',\s*' + value + r'\s*\)', body) + if not out: + sys.exit(f'{path} {var}: no entries') + return out + + +def strings(path, var, call): + body = declaration((FIXES / path).read_text(), var) + out = re.findall(call + r'\(\s*' + STR + r'\s*\)', body) if call else re.findall(STR, body) + if not out: + sys.exit(f'{path} {var}: no entries') + return out + + +def rs_str(s): + return '"' + s.replace('\\', '\\\\').replace('"', '\\"') + '"' + + +def emit_pairs(name, entries, int_key=False, int_value=False, doc=''): + lines = [f'/// {doc}'] if doc else [] + kt = 'i32' if int_key else '&str' + vt = 'i32' if int_value else '&str' + lines.append(f'pub static {name}: &[({kt}, {vt})] = &[') + for k, v in entries: + a = k if int_key else rs_str(k) + b = v if int_value else rs_str(v) + lines.append(f' ({a}, {b}),') + lines.append('];') + return '\n'.join(lines) + + +def emit_strs(name, entries, doc=''): + lines = [f'/// {doc}'] if doc else [] + lines.append(f'pub static {name}: &[&str] = &[') + lines += [f' {rs_str(s)},' for s in entries] + lines.append('];') + return '\n'.join(lines) + + +def structure_renames(): + text = (FIXES / 'ChunkStructuresTemplateRenameFix.java').read_text() + out = [] + for m in re.finditer(r'\.put\(\s*' + STR + r',\s*Pair\.of\(\s*' + STR + r',\s*ImmutableMap\.builder\(\)((?:\s*\.put\(' + STR + r',\s*' + STR + r'\))*)\s*\.build\(\)', text): + structure, child = m.group(1), m.group(2) + entries = re.findall(r'\.put\(' + STR + r',\s*' + STR + r'\)', m.group(3)) + out.append((structure, child, entries)) + if len(out) != 4: + sys.exit(f'expected 4 structure renames, found {len(out)}') + lines = ['/// `ChunkStructuresTemplateRenameFix.RENAMES`: structure id, child id, template renames.', + 'pub static STRUCTURE_TEMPLATE_RENAMES: &[(&str, &str, &[(&str, &str)])] = &['] + for structure, child, entries in out: + lines.append(f' ({rs_str(structure)}, {rs_str(child)}, &[') + lines += [f' ({rs_str(a)}, {rs_str(b)}),' for a, b in entries] + lines.append(' ]),') + lines.append('];') + return '\n'.join(lines) + + +def main(): + p = argparse.ArgumentParser() + p.add_argument('-o', '--out', default=str(OUT)) + args = p.parse_args() + parts = [ + '//! Lookup tables of the DataFixers of 1.13 (DataVersion 1343 to 1631), copied from vanilla\'s\n' + '//! sources by `tools/gen_flat_tables.py`. Do not edit.\n', + emit_pairs('ITEM_FLATTENING', pairs('ItemStackTheFlatteningFix.java', 'MAP'), + doc='`ItemStackTheFlatteningFix.MAP`: `id.damage` to the flattened item.'), + emit_strs('ITEM_DAMAGE_IDS', strings('ItemStackTheFlatteningFix.java', 'DAMAGE_IDS', ''), + doc='`ItemStackTheFlatteningFix.DAMAGE_IDS`: items that keep their damage in `tag.Damage`.'), + emit_pairs('BLOCK_IDS', pairs('EntityBlockStateFix.java', 'MAP', value_int=True), int_value=True, + doc='`EntityBlockStateFix.MAP`: 1.12 block name to numeric id.'), + emit_pairs('ITEM_IDS', pairs('ItemIdFix.java', 'ITEM_NAMES', key_int=True), int_key=True, + doc='`ItemIdFix.ITEM_NAMES`: numeric item id to name.'), + emit_strs('SPECIAL_OBJECTIVE_CRITERIA', strings('StatsCounterFix.java', 'SPECIAL_OBJECTIVE_CRITERIA', '')), + emit_strs('STATS_SKIP', strings('StatsCounterFix.java', 'SKIP', 'add')), + emit_pairs('STATS_CUSTOM', pairs('StatsCounterFix.java', 'CUSTOM_MAP')), + emit_pairs('STATS_ITEM_KEYS', pairs('StatsCounterFix.java', 'ITEM_KEYS')), + emit_pairs('STATS_ENTITY_KEYS', pairs('StatsCounterFix.java', 'ENTITY_KEYS')), + emit_pairs('STATS_ENTITIES', pairs('StatsCounterFix.java', 'ENTITIES')), + emit_pairs('RECIPES', pairs('RecipesFix.java', 'RECIPES')), + emit_pairs('RECIPES_RENAMENING', pairs('RecipesRenameningFix.java', 'RECIPES')), + emit_pairs('ADVANCEMENTS', pairs('AdvancementsFix.java', 'RENAMES')), + emit_pairs('GENERATOR_BIOMES', pairs('LevelDataGeneratorOptionsFix.java', 'MAP')), + emit_pairs('SPAWN_EGGS', pairs('ItemStackSpawnEggFix.java', 'MAP')), + emit_pairs('ENCHANTMENTS', pairs('ItemStackEnchantmentNamesFix.java', 'MAP', key_int=True), int_key=True), + emit_pairs('CORAL', pairs('RenamedCoralFix.java', 'RENAMED_IDS')), + emit_pairs('CORAL_FANS', pairs('RenamedCoralFansFix.java', 'RENAMED_IDS')), + emit_pairs('THE_RENAMENING_ENTITIES', pairs('EntityTheRenameningFix.java', 'RENAMED_IDS')), + emit_pairs('THE_RENAMENING_BLOCKS', pairs('EntityTheRenameningFix.java', 'RENAMED_BLOCKS')), + emit_pairs('COD_SALMON', pairs('EntityCodSalmonFix.java', 'RENAMED_IDS')), + emit_pairs('COD_SALMON_EGGS', pairs('EntityCodSalmonFix.java', 'RENAMED_EGG_IDS')), + structure_renames(), + ] + Path(args.out).write_text('\n\n'.join(parts) + '\n') + print('wrote', args.out) + + +if __name__ == '__main__': + main() From 0e2fc82f4eeec6472eaa86fbcea7b149d12261ef Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:32:00 +0200 Subject: [PATCH 09/25] Datafix: thrown potion item field; legacy scene additions for 1.13.2 to 1.15 --- crates/horizon-world/src/datafix/fixes_mid.rs | 11 ++ tools/datafix_scene.py | 17 +++ tools/datafix_scene_old.py | 123 ++++++++++++++++++ tools/datafix_worlds.py | 11 +- 4 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 tools/datafix_scene_old.py diff --git a/crates/horizon-world/src/datafix/fixes_mid.rs b/crates/horizon-world/src/datafix/fixes_mid.rs index 54e6e67b9..54a4f51c0 100644 --- a/crates/horizon-world/src/datafix/fixes_mid.rs +++ b/crates/horizon-world/src/datafix/fixes_mid.rs @@ -177,6 +177,17 @@ pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { ) })); out.push((key(2511, 0), projectile_owner)); + // `SplashPotionItemFieldRenameFix` casts the thrown potion to the type whose + // item stack field is `Item`: the typed `Potion` value takes its place, and + // writing the entity gives `Potion` back from the map it was read from. + out.push((key(2511, 1), |cx| { + cx.entity("minecraft:potion", |e| { + if let Some(item) = e.get("Potion").cloned() { + set(e, "Item", item); + } + super::drop_typed(e, "Potion"); + }) + })); out.push((key(2514, 0), entity_uuids)); out.push((key(2514, 0), block_entity_uuids)); out.push((key(2514, 0), player_uuids)); diff --git a/tools/datafix_scene.py b/tools/datafix_scene.py index 0f1861487..2afac5fcc 100644 --- a/tools/datafix_scene.py +++ b/tools/datafix_scene.py @@ -138,6 +138,9 @@ def experiments(version): def items(e, version=None): """The sample stacks of an era, in the exact component formats `version` accepts.""" stacks = ITEMS_A if e == A else ITEMS_B if e == B else ITEMS_C + if version is not None and version < 2586: # 1.13.2 to 1.15 + import datafix_scene_old + stacks = stacks + datafix_scene_old.items(version) if version is None: return stacks return [v for v in (versioned(s, version) for s in stacks) if available(v, version)] @@ -237,6 +240,9 @@ def block_entities(e, version): out = [(b, '{SpawnData:{id:"minecraft:zombie",ArmorItems:[{},{},{},{id:"minecraft:iron_helmet",Count:1b}]},' 'SpawnPotentials:[{Weight:1,Entity:{id:"minecraft:skeleton"}}]}') if b == 'spawner' else (b, nbt) for b, nbt in out] + if version < 2586: + import datafix_scene_old + out += datafix_scene_old.block_entities(version) if version >= 3682: out.append(('crafter', '{Items:[{Slot:0b,id:"minecraft:stone",Count:1b}],triggered:1,crafting_ticks_remaining:2}')) # Blocks the 1.20 experiment brought in 1.19.3 and 1.19.4. @@ -312,6 +318,9 @@ def entities(e, version): ] since = {'allay': 3105, 'chest_boat': 3105, 'text_display': 3325, 'item_display': 3325, 'goat': 2700} out = [(k, x) for k, x in out if version >= since.get(k, 0)] + if version < 2586: # 1.13.2 to 1.15: entities in the formats those versions write + import datafix_scene_old + out += datafix_scene_old.entities(version) if version < 3086: # cats before 1.19 have a numeric CatType out = [(k, 'CatType:1' if k == 'cat' else x) for k, x in out] if 3105 <= version < 3322: # darkness counts its factor from a timestamp before 1.19.4 @@ -363,6 +372,14 @@ def entities(e, version): return out +def blocks(version): + """Plain blocks whose states changed over the versions.""" + if version < 2586: + import datafix_scene_old + return datafix_scene_old.blocks(version) + return [] + + def player_commands(e, name, version=None): """Give the joined bot a varied inventory and ender chest.""" out = [] diff --git a/tools/datafix_scene_old.py b/tools/datafix_scene_old.py new file mode 100644 index 000000000..8cc310540 --- /dev/null +++ b/tools/datafix_scene_old.py @@ -0,0 +1,123 @@ +"""Scene additions for worlds saved by 1.13.2 to 1.16.5 (DataVersion 1631 to 2586): the entities, block +entities and items whose save format those versions changed, in the syntax and format of the version +that writes them (numeric UUIDMost/UUIDLeast, string owner UUIDs, Profession/Career villagers, ...). + +Every entry is (minimum DataVersion, maximum DataVersion exclusive, value); datafix_scene.py adds the +ones valid for the world's version to its general scene. +""" + +U1 = '11111111-2222-3333-4444-555555555555' +U2 = '66666666-7777-8888-9999-aaaaaaaaaaaa' +MODIFIERS = ('[{Name:"horse.jumpStrength",Base:0.7d},{Name:"generic.maxHealth",Base:20.0d,' + 'Modifiers:[{Name:"m",Amount:1.0d,Operation:0,UUIDMost:5L,UUIDLeast:6L}]}]') +TRADES = ('{buy:{id:"minecraft:wheat",Count:20b},sell:{id:"minecraft:emerald",Count:1b},maxUses:16,uses:1,rewardExp:1b},' + '{buy:{id:"minecraft:paper",Count:24b},sell:{id:"minecraft:emerald",Count:1b},maxUses:16,uses:0},' + '{buy:{id:"minecraft:book",Count:4b},sell:{id:"minecraft:emerald",Count:1b},maxUses:12,uses:0},' + '{buy:{id:"minecraft:ink_sac",Count:5b},sell:{id:"minecraft:emerald",Count:1b},maxUses:12,uses:0}') + +# (since, until, entity, fields) +ENTITIES = [ + # 1.13.2: professions are numbers + (1631, 1900, 'villager', 'Profession:1,Career:2,CareerLevel:2,Offers:{Recipes:[%s]},Inventory:[{id:"minecraft:bread",Count:3b}]' % TRADES), + (1631, 1900, 'villager', 'Profession:3,Career:3,CareerLevel:1'), + (1631, 1900, 'zombie_villager', 'Profession:4,Career:2'), + (1631, 1900, 'ocelot', 'CatType:2,OwnerUUID:"%s"' % U1), + (1631, 1900, 'ocelot', 'CatType:0'), + (1631, 1900, 'ocelot', 'CatType:0,OwnerUUID:"%s"' % U2), + # 1.14: VillagerData and Xp; some without them + (1900, 2100, 'villager', 'VillagerData:{profession:"minecraft:farmer",level:1,type:"minecraft:plains"},' + 'Offers:{Recipes:[%s]},Gossips:[{Type:"golem",Value:5},{Type:"major_positive",Value:2}]' % TRADES), + (1900, 2100, 'villager', 'VillagerData:{profession:"minecraft:armorer",level:3,type:"minecraft:desert"},Xp:70'), + (1900, 2100, 'zombie_villager', 'VillagerData:{profession:"minecraft:cleric",level:2,type:"minecraft:plains"}'), + (1900, 2100, 'cat', 'CatType:9'), + (1900, 2100, 'cat', 'CatType:3,CollarColor:5b'), + (1900, 2100, 'pillager', 'Inventory:[{id:"minecraft:arrow",Count:2b}]'), + (1900, 2100, 'fox', 'Type:"red",TrustedUUIDs:[{M:3L,L:4L}]'), + (1631, 2586, 'wolf', 'Owner:"%s",OwnerUUID:"%s",CollarColor:3b,Health:15.0f' % ('Steve', U1)), + (1631, 2586, 'horse', 'Tame:1b,OwnerUUID:"%s",SaddleItem:{id:"minecraft:saddle",Count:1b},' + 'ArmorItem:{id:"minecraft:iron_horse_armor",Count:1b},Attributes:%s' % (U2, MODIFIERS)), + (1631, 2586, 'armor_stand', 'Attributes:%s' % MODIFIERS), + (1631, 2586, 'cow', 'Leash:{UUIDMost:7L,UUIDLeast:8L}'), + (1631, 2586, 'zombie_pigman', 'Anger:100s,HurtBy:"%s"' % U1), + (1631, 2586, 'item', 'Item:{id:"minecraft:diamond",Count:3b},Owner:{M:9L,L:10L},Thrower:{M:11L,L:12L}'), + (1631, 2586, 'area_effect_cloud', 'OwnerUUIDMost:13L,OwnerUUIDLeast:14L,Particle:"entity_effect",Radius:2.0f,Duration:600'), + (1631, 2586, 'arrow', 'OwnerUUIDMost:15L,OwnerUUIDLeast:16L,inGround:1b'), + (1631, 2586, 'trident', 'OwnerUUIDMost:17L,OwnerUUIDLeast:18L,Trident:{id:"minecraft:trident",Count:1b}'), + (1631, 2586, 'potion', 'Potion:{id:"minecraft:splash_potion",Count:1b,tag:{Potion:"minecraft:swiftness"}},owner:{M:19L,L:20L}'), + (1631, 2586, 'snowball', 'owner:{M:21L,L:22L}'), + (1631, 2586, 'egg', 'owner:{M:23L,L:24L}'), + (1631, 2586, 'ender_pearl', 'owner:{M:25L,L:26L}'), + (1631, 2586, 'experience_bottle', 'owner:{M:27L,L:28L}'), + (1631, 2586, 'llama_spit', 'Owner:{OwnerUUIDMost:29L,OwnerUUIDLeast:30L}'), + (1631, 2586, 'shulker_bullet', 'Owner:{M:31L,L:32L},Target:{M:33L,L:34L}'), + (1631, 2586, 'evoker_fangs', 'OwnerUUIDMost:35L,OwnerUUIDLeast:36L'), + (1631, 2586, 'shulker', 'Rotation:[40.0f,0.0f],Peek:0b'), + (1631, 2586, 'bat', ''), + (2100, 2586, 'bee', 'HurtBy:"%s",HasNectar:1b,Anger:50' % U1), + (2100, 2586, 'villager', 'VillagerData:{profession:"minecraft:farmer",level:2,type:"minecraft:plains"},Xp:20,' + 'Brain:{memories:{"minecraft:job_site":{pos:[I;1,2,3],dimension:"minecraft:overworld"}}}'), + (2500, 2586, 'piglin', 'IsBaby:0b,Brain:{memories:{"minecraft:angry_at":"%s"}}' % U1), + (2500, 2586, 'strider', 'NoGravity:1b,Saddle:1b'), + (2500, 2586, 'zombified_piglin', 'HurtBy:"%s",Anger:60' % U2), + (2500, 2586, 'hoglin', 'IsImmuneToZombification:1b'), +] + +# (since, until, block, nbt) +BLOCK_ENTITIES = [ + (1631, 2586, 'white_banner', '{CustomName:\'{"translate":"block.minecraft.illager_banner","color":"gold"}\',' + 'Patterns:[{Pattern:"cre",Color:15}]}'), + (1631, 2586, 'chest', '{LootTable:"minecraft:chests/village_blacksmith"}'), + (1631, 2586, 'furnace', '{BurnTime:100s,CookTime:20s,CookTimeTotal:200s,RecipesUsedSize:2,RecipeLocation0:"minecraft:iron_ingot",' + 'RecipeAmount0:3,RecipeLocation1:"minecraft:glass",RecipeAmount1:1}'), + (1631, 2586, 'blast_furnace', '{RecipesUsedSize:1,RecipeLocation0:"minecraft:iron_ingot",RecipeAmount0:2}') if False else None, + (1631, 2586, 'player_head', '{Owner:{Id:"%s",Name:"Notch"}}' % U1), + (1631, 2586, 'conduit', '{target_uuid:{M:5L,L:6L},Target:{M:5L,L:6L}}'), + (1631, 2586, 'oak_sign', '{Text1:\'{"text":"one"}\',Text2:\'{"text":"two"}\'}'), + (1900, 2586, 'jigsaw[facing=up]', '{attachement_type:"minecraft:bottom",target_pool:"minecraft:village/plains/houses",' + 'final_state:"minecraft:air"}'), + (1900, 2586, 'jigsaw[facing=east]', '{attachement_type:"minecraft:empty",target_pool:"minecraft:empty"}'), + (1900, 2586, 'lectern', '{Book:{id:"minecraft:written_book",Count:1b,tag:{title:"L",author:"A",pages:[\'"x"\']}},Page:0}'), + (2100, 2586, 'beehive', '{Bees:[{EntityData:{id:"minecraft:bee"},TicksInHive:3,MinOccupationTicks:600}]}'), +] +BLOCK_ENTITIES = [b for b in BLOCK_ENTITIES if b] + +# Plain blocks whose states changed: (since, until, command tail after "setblock x y z") +BLOCKS = [ + (1900, 2500, 'cobblestone_wall[east=true,west=false,north=true,south=false]'), + (1900, 2500, 'andesite_wall[east=true,west=true,north=false,south=false,up=true]'), + (1631, 2500, 'redstone_wire[east=none,west=none,north=none,south=none,power=0]'), + (1631, 2500, 'redstone_wire[east=up,west=none,north=none,south=none,power=3]'), + (1631, 2500, 'redstone_wire[east=none,west=none,north=side,south=none,power=1]'), + (1631, 2500, 'oak_sign[rotation=3]'), + (1631, 1900, 'stone_slab[type=bottom]'), + (1631, 2100, 'bee_nest') if False else None, +] +BLOCKS = [b for b in BLOCKS if b] + +ITEMS = [ + (1631, 2586, '{id:"minecraft:white_banner",Count:1b,tag:{display:{Name:\'{"translate":"block.minecraft.illager_banner","color":"gold"}\',' + 'Lore:[\'first\',\'{"text":"second"}\']},BlockEntityTag:{Patterns:[{Pattern:"cre",Color:15}]}}}'), + (1631, 2586, '{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:{Id:"%s",Name:"Notch"}}}' % U2), + (1631, 2586, '{id:"minecraft:diamond_sword",Count:1b,tag:{AttributeModifiers:[{AttributeName:"generic.attackDamage",Name:"x",Amount:2.5d,' + 'Operation:0,UUIDMost:41L,UUIDLeast:42L,Slot:"mainhand"}]}}'), + (1631, 2586, '{id:"minecraft:filled_map",Count:1b,tag:{map:0}}'), + (1631, 2586, '{id:"minecraft:cactus_green",Count:1b}') if False else None, + (1631, 2586, '{id:"minecraft:stone_slab",Count:2b}') if False else None, +] +ITEMS = [i for i in ITEMS if i] + + +def entities(version): + return [(kind, fields) for since, until, kind, fields in ENTITIES if since <= version < until] + + +def block_entities(version): + return [(block, nbt) for since, until, block, nbt in BLOCK_ENTITIES if since <= version < until] + + +def blocks(version): + return [block for since, until, block in BLOCKS if since <= version < until] + + +def items(version): + return [stack for since, until, stack in ITEMS if since <= version < until] diff --git a/tools/datafix_worlds.py b/tools/datafix_worlds.py index 6cae508c0..8b3533e3e 100644 --- a/tools/datafix_worlds.py +++ b/tools/datafix_worlds.py @@ -348,6 +348,13 @@ def uuid_nbt(i): return f'[I;{UUID_BASE},0,0,{i}]' +def uuid_fields(data_version, i): + """The UUID of a summoned entity: an int array since 1.16, two longs before.""" + if data_version >= 2514: + return f'UUID:{uuid_nbt(i)}' + return f'UUIDMost:{UUID_BASE << 32}L,UUIDLeast:{i + 1}L' + + def build(version, force=False): jar, data_version, protocol = server_jar(version) target = SHARED / 'worlds' / version @@ -376,8 +383,10 @@ def build(version, force=False): run(f'setblock {x} 100 {z} minecraft:{block}{nbt}') for i, (kind, extra) in enumerate(scene.entities(era, data_version)): x, z = 1.5 + 3 * (i % 15), 25.5 + 3 * (i // 15) - fields = f'UUID:{uuid_nbt(i)},NoAI:1b,Silent:1b,NoGravity:1b,Invulnerable:1b,PersistenceRequired:1b' + fields = f'{uuid_fields(data_version, i)},NoAI:1b,Silent:1b,NoGravity:1b,Invulnerable:1b,PersistenceRequired:1b' run(f'summon minecraft:{kind} {x} 100 {z} {{{fields}' + (',' + extra if extra else '') + '}') + for i, block in enumerate(scene.blocks(data_version)): + run(f'setblock {1 + 3 * (i % 15)} 100 {19 + 3 * (i // 15)} minecraft:{block}') run('setworldspawn 20 101 20') bot = Bot(port, protocol, BOT) time.sleep(3) From b5a6b6a99e5f270a7962011bb4582da8480052de Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:35:54 +0200 Subject: [PATCH 10/25] Port LegacyStructureFileFix (1493) and run the file fixes of the range in the band harness Co-Authored-By: Claude Sonnet 5.5 --- .../src/datafix/chunk_flatten.rs | 36 +- .../horizon-world/src/datafix/chunk_leaves.rs | 20 +- crates/horizon-world/src/datafix/files.rs | 147 +- .../horizon-world/src/datafix/fixes_flat.rs | 85 +- .../horizon-world/src/datafix/flat_tables.rs | 1203 +++++++++++++---- .../horizon-world/src/datafix/schema_flat.rs | 8 +- .../parity/VanillaDataFixOracle.java | 12 + tools/gen_flat_tables.py | 2 + 8 files changed, 1210 insertions(+), 303 deletions(-) diff --git a/crates/horizon-world/src/datafix/chunk_flatten.rs b/crates/horizon-world/src/datafix/chunk_flatten.rs index 368d698d4..e3c116d93 100644 --- a/crates/horizon-world/src/datafix/chunk_flatten.rs +++ b/crates/horizon-world/src/datafix/chunk_flatten.rs @@ -94,7 +94,10 @@ fn consts() -> &'static Consts { ("minecraft:sapling4", "minecraft:potted_acacia_sapling"), ("minecraft:sapling5", "minecraft:potted_dark_oak_sapling"), ("minecraft:red_mushroom0", "minecraft:potted_red_mushroom"), - ("minecraft:brown_mushroom0", "minecraft:potted_brown_mushroom"), + ( + "minecraft:brown_mushroom0", + "minecraft:potted_brown_mushroom", + ), ("minecraft:deadbush0", "minecraft:potted_dead_bush"), ("minecraft:tallgrass2", "minecraft:potted_fern"), ("minecraft:cactus0", "minecraft:potted_cactus"), @@ -444,8 +447,8 @@ impl Section { if start != end { let shift = 64 - start_bit; let wanted = bits - shift; - storage[end] = ((storage[end] as u64) >> wanted << wanted) as i64 - | (value & mask) >> shift; + storage[end] = + ((storage[end] as u64) >> wanted << wanted) as i64 | (value & mask) >> shift; } } set(&mut section, "BlockStates", Tag::LongArray(storage)); @@ -463,7 +466,12 @@ enum Direction { } fn relative(pos: i64, direction: Direction) -> i64 { - let y = (pos >> 8) + if matches!(direction, Direction::Up) { 1 } else { -1 }; + let y = (pos >> 8) + + if matches!(direction, Direction::Up) { + 1 + } else { + -1 + }; if (0..=255).contains(&y) { pos & 0xFF | y << 8 } else { @@ -583,7 +591,13 @@ fn upgrade_level(level: &Tag) -> Tag { set( &mut out, "TileEntities", - Tag::List(chunk.block_entities.iter().map(|(_, v)| v.clone()).collect()), + Tag::List( + chunk + .block_entities + .iter() + .map(|(_, v)| v.clone()) + .collect(), + ), ); } let mut indices = crate::nbt::Compound::new(); @@ -659,8 +673,16 @@ fn fix_block(chunk: &mut UpgradeChunk, c: &Consts, block: usize, pos: i64, alpha if lower.name == upper.name { let facing = lower.property("facing"); let open = lower.property("open"); - let hinge = if alpha { "left" } else { upper.property("hinge") }; - let powered = if alpha { "false" } else { upper.property("powered") }; + let hinge = if alpha { + "left" + } else { + upper.property("hinge") + }; + let powered = if alpha { + "false" + } else { + upper.property("powered") + }; let name = &lower.name; let lo = c .door diff --git a/crates/horizon-world/src/datafix/chunk_leaves.rs b/crates/horizon-world/src/datafix/chunk_leaves.rs index ffefc7060..9cd2fd3d9 100644 --- a/crates/horizon-world/src/datafix/chunk_leaves.rs +++ b/crates/horizon-world/src/datafix/chunk_leaves.rs @@ -6,7 +6,7 @@ //! emulated here (`IntOpenHashSet` and the key order of an `Int2ObjectOpenHashMap`). use std::collections::{HashMap, HashSet}; -use super::dynamic::{as_int, as_long_stream, as_str, ceillog2, remove, set}; +use super::dynamic::{as_int, as_long_stream, as_str, ceillog2, set}; use crate::nbt::Tag; /// `PackedBitStorage`. @@ -34,7 +34,8 @@ impl Packed { let end = ((index + 1) * self.bits - 1) >> 6; let start_bit = position ^ (start << 6); let value = i64::from(value); - self.data[start] = self.data[start] & !(self.mask << start_bit) | (value & self.mask) << start_bit; + self.data[start] = + self.data[start] & !(self.mask << start_bit) | (value & self.mask) << start_bit; if start != end { let shift = 64 - start_bit; let wanted = self.bits - shift; @@ -51,7 +52,8 @@ impl Packed { return (((self.data[start] as u64) >> start_bit) as i64 & self.mask) as i32; } let shift = 64 - start_bit; - ((((self.data[start] as u64) >> start_bit) as i64 | self.data[end] << shift) & self.mask) as i32 + ((((self.data[start] as u64) >> start_bit) as i64 | self.data[end] << shift) & self.mask) + as i32 } } @@ -250,10 +252,15 @@ impl Section { for i in 0..s.palette.len() { let name = name_of(&s.palette[i]); if leaf_index(&name).is_some() { - let persistent = as_str(s.palette[i].get("Properties").and_then(|p| p.get("decayable"))) - .is_some_and(|d| d == "false"); + let persistent = as_str( + s.palette[i] + .get("Properties") + .and_then(|p| p.get("decayable")), + ) + .is_some_and(|d| d == "false"); s.leaf_ids.insert(i as i32); - s.state_to_id.insert(state_id(&name, persistent, 7), i as i32); + s.state_to_id + .insert(state_id(&name, persistent, 7), i as i32); s.palette[i] = leaf_tag(&name, persistent, 7); } if LOGS.contains(&name.as_str()) { @@ -503,5 +510,4 @@ pub(super) fn trapped_chest_fix(chunk: &mut Tag) { } } } - let _ = remove; } diff --git a/crates/horizon-world/src/datafix/files.rs b/crates/horizon-world/src/datafix/files.rs index 643cd4390..fb0935806 100644 --- a/crates/horizon-world/src/datafix/files.rs +++ b/crates/horizon-world/src/datafix/files.rs @@ -19,7 +19,7 @@ pub const VERSION_NAME: &str = "26.3"; const FILE_FIXER_INTRODUCTION: i32 = 4772; /// The versions of the file fixes, in order. -const FILE_FIXES: [i32; 3] = [4772, 4773, 4899]; +const FILE_FIXES: [i32; 4] = [1493, 4772, 4773, 4899]; fn invalid(message: impl Into) -> io::Error { io::Error::new(io::ErrorKind::InvalidData, message.into()) @@ -381,6 +381,141 @@ fn level_dat_to_saved_data(base: &Path) -> io::Result<()> { write_level(base, content, V) } +/// 1493: `LegacyStructureFileFix`. The structures of `data/*.dat` (1.12) become the +/// `Structures` of the chunks they reach, in the region folders of the old layout. +pub(crate) fn fix_1493(base: &Path) -> io::Result<()> { + use std::collections::{BTreeMap, HashMap}; + const LEGACY_TO_CURRENT: [(&str, &str); 4] = [ + ("Iglu", "Igloo"), + ("TeDP", "Desert_Pyramid"), + ("TeJP", "Jungle_Pyramid"), + ("TeSH", "Swamp_Hut"), + ]; + #[derive(Default)] + struct LegacyData { + starts: HashMap, + indexes: BTreeMap>, + } + let pack = |x: i32, z: i32| i64::from(x) & 0xFFFF_FFFF | (i64::from(z) & 0xFFFF_FFFF) << 32; + let Some(level) = read_level(base, 1493)? else { + return Ok(()); + }; + let overworld_generator = match as_str(level.get("generatorName")).as_deref() { + Some("flat") => "minecraft:flat", + Some("debug_all_block_states") => "minecraft:debug", + _ => "minecraft:noise", + }; + let dimensions: [(&[&str], &str, &str, &str); 3] = [ + ( + &["Monument", "Stronghold", "Mineshaft", "Temple", "Mansion"], + "", + "minecraft:overworld", + overworld_generator, + ), + ( + &["Fortress"], + "DIM-1", + "minecraft:the_nether", + "minecraft:noise", + ), + (&["EndCity"], "DIM1", "minecraft:the_end", "minecraft:noise"), + ]; + for (ids, folder, dimension, generator) in dimensions { + let mut structures: BTreeMap<(i32, i32), LegacyData> = BTreeMap::new(); + for id in ids { + let path = base.join("data").join(format!("{id}.dat")); + let Some(data) = read_saved_data(&path, Ty::SavedStructureFeatureIndices, 1493)? else { + continue; + }; + let Some(Tag::Compound(features)) = data.get("Features") else { + continue; + }; + let values: Vec<(String, Tag)> = features + .iter() + .map(|(k, v)| (k.to_string_lossy(), v.clone())) + .collect(); + for (_, mut value) in super::items::java_hash_order(values, |(k, _)| k.clone()) { + let chunk_x = as_int(value.get("ChunkX"), 0); + let chunk_z = as_int(value.get("ChunkZ"), 0); + let children = super::dynamic::stream(value.get("Children")); + if let Some(first) = children.first() + && let Some(current) = as_str(first.get("id")) + .and_then(|i| LEGACY_TO_CURRENT.iter().find(|(from, _)| *from == i)) + { + set(&mut value, "id", string(current.1)); + } + let Some(feature_id) = as_str(value.get("id")) else { + continue; + }; + structures + .entry((chunk_x, chunk_z)) + .or_default() + .starts + .insert(feature_id.clone(), value); + for nx in chunk_x - 8..=chunk_x + 8 { + for nz in chunk_z - 8..=chunk_z + 8 { + structures + .entry((nx, nz)) + .or_default() + .indexes + .entry(feature_id.clone()) + .or_default() + .push(pack(chunk_x, chunk_z)); + } + } + } + } + if structures.is_empty() { + continue; + } + let region = if folder.is_empty() { + base.join("region") + } else { + base.join(folder).join("region") + }; + upgrade_regions(®ion, |tag| { + let version = as_int(tag.get("DataVersion"), -1); + let x = as_int(tag.get("Level").and_then(|l| l.get("xPos")), 0); + let z = as_int(tag.get("Level").and_then(|l| l.get("zPos")), 0); + let Some(legacy) = structures.get(&(x, z)) else { + return; + }; + let _ = version; + super::update_chunk_to(tag, dimension, Some(generator), 1493); + let mut level = tag + .get("Level") + .cloned() + .unwrap_or_else(super::dynamic::empty_map); + let mut structure = level + .get("Structures") + .cloned() + .filter(|s| matches!(s, Tag::Compound(_))) + .unwrap_or_else(super::dynamic::empty_map); + let mut starts = structure + .get("Starts") + .cloned() + .filter(|s| matches!(s, Tag::Compound(_))) + .unwrap_or_else(super::dynamic::empty_map); + let mut references = structure + .get("References") + .cloned() + .filter(|s| matches!(s, Tag::Compound(_))) + .unwrap_or_else(super::dynamic::empty_map); + for (id, value) in &legacy.starts { + set(&mut starts, id, value.clone()); + } + for (id, indexes) in &legacy.indexes { + set(&mut references, id, Tag::LongArray(indexes.clone())); + } + set(&mut structure, "Starts", starts); + set(&mut structure, "References", references); + set(&mut level, "Structures", structure); + set(tag, "Level", level); + })?; + } + Ok(()) +} + /// 4773: `GeneratedStructuresRenameFileFix`. fn fix_4773(base: &Path) -> io::Result<()> { for ns in subdirectories(&base.join("generated")) { @@ -456,6 +591,7 @@ pub fn fix_world_files(base: &Path) -> io::Result { for version in FILE_FIXES { if version > start && version <= CURRENT { match version { + 1493 => fix_1493(base)?, 4772 => fix_4772(base)?, 4773 => fix_4773(base)?, _ => fix_4899(base)?, @@ -678,10 +814,13 @@ pub fn upgrade_world_data(base: &Path) -> io::Result<()> { /// A world in the layout of before 1.16 (dimension folders in the world folder, /// `playerdata`, `stats`, `advancements`) brought to DataVersion `target` and -/// no further, without the file fixes: the harness checks the data fixes of a -/// range of versions on their own (the vanilla oracle does the same given a -/// target). +/// no further, with the file fixes of that range but not the ones that move the +/// files into the 26.x layout: the harness checks the fixes of a range of +/// versions on their own (the vanilla oracle does the same given a target). pub fn upgrade_band(base: &Path, target: i32) -> io::Result<()> { + if target >= 1493 { + fix_1493(base)?; + } let level = base.join("level.dat"); if let Some(mut root) = read_dat(&level)? { let mut data = root diff --git a/crates/horizon-world/src/datafix/fixes_flat.rs b/crates/horizon-world/src/datafix/fixes_flat.rs index 751bc3659..c55a628ea 100644 --- a/crates/horizon-world/src/datafix/fixes_flat.rs +++ b/crates/horizon-world/src/datafix/fixes_flat.rs @@ -11,7 +11,7 @@ use super::dynamic::{ }; use super::flat_tables as t; use super::schema::{Key, Ty, key}; -use super::{Cx, FixFn, id_is, items, mark_read, reread, reread_as}; +use super::{Cx, FixFn, items, mark_read, reread, reread_as}; use crate::nbt::{Compound, JavaString, Tag}; pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { @@ -63,10 +63,16 @@ pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { }) })); out.push((key(1474, 0), |cx| { - legacy_block_rename(cx, &only("minecraft:purple_shulker_box", "minecraft:shulker_box")) + legacy_block_rename( + cx, + &only("minecraft:purple_shulker_box", "minecraft:shulker_box"), + ) })); out.push((key(1474, 0), |cx| { - item_rename(cx, &only("minecraft:purple_shulker_box", "minecraft:shulker_box")) + item_rename( + cx, + &only("minecraft:purple_shulker_box", "minecraft:shulker_box"), + ) })); out.push((key(1475, 0), |cx| { legacy_block_rename( @@ -85,7 +91,10 @@ pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { out.push((key(1483, 0), |cx| { item_rename( cx, - &only("minecraft:puffer_fish_spawn_egg", "minecraft:pufferfish_spawn_egg"), + &only( + "minecraft:puffer_fish_spawn_egg", + "minecraft:pufferfish_spawn_egg", + ), ) })); const SEAGRASS: &[(&str, &str)] = &[ @@ -96,7 +105,9 @@ pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { out.push((key(1484, 0), |cx| legacy_block_rename(cx, &table(SEAGRASS)))); out.push((key(1484, 0), heightmap_renaming)); out.push((key(1486, 0), |cx| entity_rename(cx, &table(t::COD_SALMON)))); - out.push((key(1486, 0), |cx| item_rename(cx, &table(t::COD_SALMON_EGGS)))); + out.push((key(1486, 0), |cx| { + item_rename(cx, &table(t::COD_SALMON_EGGS)) + })); const PRISMARINE: &[(&str, &str)] = &[ ( "minecraft:prismarine_bricks_slab", @@ -108,7 +119,9 @@ pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { ), ]; out.push((key(1487, 0), |cx| item_rename(cx, &table(PRISMARINE)))); - out.push((key(1487, 0), |cx| legacy_block_rename(cx, &table(PRISMARINE)))); + out.push((key(1487, 0), |cx| { + legacy_block_rename(cx, &table(PRISMARINE)) + })); out.push((key(1488, 0), |cx| { legacy_block_rename( cx, @@ -133,13 +146,18 @@ pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { &table(&[ ("minecraft:melon_block", "minecraft:melon"), ("minecraft:melon", "minecraft:melon_slice"), - ("minecraft:speckled_melon", "minecraft:glistering_melon_slice"), + ( + "minecraft:speckled_melon", + "minecraft:glistering_melon_slice", + ), ]), ) })); out.push((key(1492, 0), structure_template_rename)); out.push((key(1494, 0), enchantment_names)); - out.push((key(1496, 0), |cx| cx.each(Ty::Chunk, chunk_leaves::leaves_fix))); + out.push((key(1496, 0), |cx| { + cx.each(Ty::Chunk, chunk_leaves::leaves_fix) + })); out.push((key(1500, 0), |cx| { cx.block_entity("DUMMY", |be| set(be, "keepPacked", Tag::Byte(1))) })); @@ -155,9 +173,13 @@ pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { out.push((key(1510, 0), |cx| { rename_names(cx, Ty::Recipe, &table(t::RECIPES_RENAMENING)) })); - out.push((key(1510, 0), |cx| entity_rename(cx, &the_renamening_entities))); + out.push((key(1510, 0), |cx| { + entity_rename(cx, &the_renamening_entities) + })); out.push((key(1510, 0), swim_stats_rename)); - out.push((key(1514, 0), |cx| display_name_to_component(cx, Ty::Objective))); + out.push((key(1514, 0), |cx| { + display_name_to_component(cx, Ty::Objective) + })); out.push((key(1514, 0), |cx| display_name_to_component(cx, Ty::Team))); out.push((key(1514, 0), objective_render_type)); out.push((key(1515, 0), |cx| { @@ -264,12 +286,7 @@ fn the_renamening_items(name: &str) -> Option { ) } -/// `LegacyComponentDataFixUtils.createTextComponentJson`. -fn text_json(text: &str) -> Tag { - let units: Vec = text.encode_utf16().collect(); - Tag::String(JavaString(super::json::text_component_json(&units))) -} - +/// `LegacyComponentDataFixUtils.createTextComponentJson` of a string tag's text. fn text_json_units(text: &JavaString) -> Tag { Tag::String(JavaString(super::json::text_component_json(&text.0))) } @@ -346,7 +363,9 @@ fn entity_block_state(cx: &mut Cx) { remove(e, f); } } - "minecraft:enderman" => block_to_state(e, "carried", "carriedData", "carriedBlockState"), + "minecraft:enderman" => { + block_to_state(e, "carried", "carriedData", "carriedBlockState") + } "minecraft:arrow" | "minecraft:spectral_arrow" => { block_to_state(e, "inTile", "inData", "inBlockState") } @@ -396,7 +415,8 @@ fn block_name_flattening(cx: &mut Cx) { /// `ItemStackTheFlatteningFix.updateItem`. fn update_item(name: &str, data: i32) -> Option<&'static str> { - static MAP: OnceLock<(HashMap<&'static str, &'static str>, Vec<&'static str>)> = OnceLock::new(); + static MAP: OnceLock<(HashMap<&'static str, &'static str>, Vec<&'static str>)> = + OnceLock::new(); let (map, ids) = MAP.get_or_init(|| { let map: HashMap<_, _> = t::ITEM_FLATTENING.iter().copied().collect(); let mut ids: Vec<&str> = t::ITEM_FLATTENING @@ -550,9 +570,7 @@ fn flat_generator_string(options: &str) -> String { to_int(block_string, 0) }; let data_index = name_index + 1; - let data = block_parts - .get(data_index) - .map_or(0, |d| to_int(d, 0)); + let data = block_parts.get(data_index).map_or(0, |d| to_int(d, 0)); let tag = bsd::get_tag(block << 4 | data); let name = as_str(tag.get("Name")).unwrap_or_default(); format!( @@ -579,7 +597,11 @@ fn flat_generator_info(cx: &mut Cx) { return; } if let Some(options) = as_str(l.get("generatorOptions")) { - set(l, "generatorOptions", string(&flat_generator_string(&options))); + set( + l, + "generatorOptions", + string(&flat_generator_string(&options)), + ); } }); } @@ -608,10 +630,7 @@ fn unpack_legacy_key(k: &str) -> Option<(String, String)> { let prefix = &k[..split]; let rest = k[split + 1..].replace('.', ":"); if prefix == "stat.mineBlock" { - return Some(( - "minecraft:mined".to_owned(), - bsd::upgrade_block_name(&rest), - )); + return Some(("minecraft:mined".to_owned(), bsd::upgrade_block_name(&rest))); } if let Some(item_key) = lookup(t::STATS_ITEM_KEYS, prefix) { let new = update_item(&rest, 0).map_or(rest.clone(), str::to_owned); @@ -1068,7 +1087,8 @@ fn flat_options(flat: &str) -> Tag { continue; } let mut options = Vec::new(); - if separated.len() > 1 && separated[1].ends_with(')') && separated[1].len() > 1 { + if separated.len() > 1 && separated[1].ends_with(')') && separated[1].len() > 1 + { let inner = &separated[1][..separated[1].len() - 1]; for part in java_split(inner, " ", 0) { let split = java_split(part, "=", 2); @@ -1105,7 +1125,10 @@ fn flat_options(flat: &str) -> Tag { .into_iter() .map(|(k, v)| (super::dynamic::key(&k), string(&v))) .collect(); - (super::dynamic::key(&name.to_lowercase()), Tag::Compound(options)) + ( + super::dynamic::key(&name.to_lowercase()), + Tag::Compound(options), + ) }) .collect(); Tag::compound([ @@ -1189,9 +1212,3 @@ fn objective_render_type(cx: &mut Cx) { } }); } - -#[allow(dead_code)] -fn unused(_: &Tag) -> bool { - let _ = (text_json, id_is); - false -} diff --git a/crates/horizon-world/src/datafix/flat_tables.rs b/crates/horizon-world/src/datafix/flat_tables.rs index 590a6c795..5fcd442bb 100644 --- a/crates/horizon-world/src/datafix/flat_tables.rs +++ b/crates/horizon-world/src/datafix/flat_tables.rs @@ -1,7 +1,6 @@ //! Lookup tables of the DataFixers of 1.13 (DataVersion 1343 to 1631), copied from vanilla's //! sources by `tools/gen_flat_tables.py`. Do not edit. - /// `ItemStackTheFlatteningFix.MAP`: `id.damage` to the flattened item. pub static ITEM_FLATTENING: &[(&str, &str)] = &[ ("minecraft:stone.0", "minecraft:stone"), @@ -41,7 +40,10 @@ pub static ITEM_FLATTENING: &[(&str, &str)] = &[ ("minecraft:sand.0", "minecraft:sand"), ("minecraft:sand.1", "minecraft:red_sand"), ("minecraft:quartz_block.0", "minecraft:quartz_block"), - ("minecraft:quartz_block.1", "minecraft:chiseled_quartz_block"), + ( + "minecraft:quartz_block.1", + "minecraft:chiseled_quartz_block", + ), ("minecraft:quartz_block.2", "minecraft:quartz_pillar"), ("minecraft:anvil.0", "minecraft:anvil"), ("minecraft:anvil.1", "minecraft:chipped_anvil"), @@ -79,55 +81,181 @@ pub static ITEM_FLATTENING: &[(&str, &str)] = &[ ("minecraft:carpet.14", "minecraft:red_carpet"), ("minecraft:carpet.15", "minecraft:black_carpet"), ("minecraft:hardened_clay.0", "minecraft:terracotta"), - ("minecraft:stained_hardened_clay.0", "minecraft:white_terracotta"), - ("minecraft:stained_hardened_clay.1", "minecraft:orange_terracotta"), - ("minecraft:stained_hardened_clay.2", "minecraft:magenta_terracotta"), - ("minecraft:stained_hardened_clay.3", "minecraft:light_blue_terracotta"), - ("minecraft:stained_hardened_clay.4", "minecraft:yellow_terracotta"), - ("minecraft:stained_hardened_clay.5", "minecraft:lime_terracotta"), - ("minecraft:stained_hardened_clay.6", "minecraft:pink_terracotta"), - ("minecraft:stained_hardened_clay.7", "minecraft:gray_terracotta"), - ("minecraft:stained_hardened_clay.8", "minecraft:light_gray_terracotta"), - ("minecraft:stained_hardened_clay.9", "minecraft:cyan_terracotta"), - ("minecraft:stained_hardened_clay.10", "minecraft:purple_terracotta"), - ("minecraft:stained_hardened_clay.11", "minecraft:blue_terracotta"), - ("minecraft:stained_hardened_clay.12", "minecraft:brown_terracotta"), - ("minecraft:stained_hardened_clay.13", "minecraft:green_terracotta"), - ("minecraft:stained_hardened_clay.14", "minecraft:red_terracotta"), - ("minecraft:stained_hardened_clay.15", "minecraft:black_terracotta"), - ("minecraft:silver_glazed_terracotta.0", "minecraft:light_gray_glazed_terracotta"), + ( + "minecraft:stained_hardened_clay.0", + "minecraft:white_terracotta", + ), + ( + "minecraft:stained_hardened_clay.1", + "minecraft:orange_terracotta", + ), + ( + "minecraft:stained_hardened_clay.2", + "minecraft:magenta_terracotta", + ), + ( + "minecraft:stained_hardened_clay.3", + "minecraft:light_blue_terracotta", + ), + ( + "minecraft:stained_hardened_clay.4", + "minecraft:yellow_terracotta", + ), + ( + "minecraft:stained_hardened_clay.5", + "minecraft:lime_terracotta", + ), + ( + "minecraft:stained_hardened_clay.6", + "minecraft:pink_terracotta", + ), + ( + "minecraft:stained_hardened_clay.7", + "minecraft:gray_terracotta", + ), + ( + "minecraft:stained_hardened_clay.8", + "minecraft:light_gray_terracotta", + ), + ( + "minecraft:stained_hardened_clay.9", + "minecraft:cyan_terracotta", + ), + ( + "minecraft:stained_hardened_clay.10", + "minecraft:purple_terracotta", + ), + ( + "minecraft:stained_hardened_clay.11", + "minecraft:blue_terracotta", + ), + ( + "minecraft:stained_hardened_clay.12", + "minecraft:brown_terracotta", + ), + ( + "minecraft:stained_hardened_clay.13", + "minecraft:green_terracotta", + ), + ( + "minecraft:stained_hardened_clay.14", + "minecraft:red_terracotta", + ), + ( + "minecraft:stained_hardened_clay.15", + "minecraft:black_terracotta", + ), + ( + "minecraft:silver_glazed_terracotta.0", + "minecraft:light_gray_glazed_terracotta", + ), ("minecraft:stained_glass.0", "minecraft:white_stained_glass"), - ("minecraft:stained_glass.1", "minecraft:orange_stained_glass"), - ("minecraft:stained_glass.2", "minecraft:magenta_stained_glass"), - ("minecraft:stained_glass.3", "minecraft:light_blue_stained_glass"), - ("minecraft:stained_glass.4", "minecraft:yellow_stained_glass"), + ( + "minecraft:stained_glass.1", + "minecraft:orange_stained_glass", + ), + ( + "minecraft:stained_glass.2", + "minecraft:magenta_stained_glass", + ), + ( + "minecraft:stained_glass.3", + "minecraft:light_blue_stained_glass", + ), + ( + "minecraft:stained_glass.4", + "minecraft:yellow_stained_glass", + ), ("minecraft:stained_glass.5", "minecraft:lime_stained_glass"), ("minecraft:stained_glass.6", "minecraft:pink_stained_glass"), ("minecraft:stained_glass.7", "minecraft:gray_stained_glass"), - ("minecraft:stained_glass.8", "minecraft:light_gray_stained_glass"), + ( + "minecraft:stained_glass.8", + "minecraft:light_gray_stained_glass", + ), ("minecraft:stained_glass.9", "minecraft:cyan_stained_glass"), - ("minecraft:stained_glass.10", "minecraft:purple_stained_glass"), + ( + "minecraft:stained_glass.10", + "minecraft:purple_stained_glass", + ), ("minecraft:stained_glass.11", "minecraft:blue_stained_glass"), - ("minecraft:stained_glass.12", "minecraft:brown_stained_glass"), - ("minecraft:stained_glass.13", "minecraft:green_stained_glass"), + ( + "minecraft:stained_glass.12", + "minecraft:brown_stained_glass", + ), + ( + "minecraft:stained_glass.13", + "minecraft:green_stained_glass", + ), ("minecraft:stained_glass.14", "minecraft:red_stained_glass"), - ("minecraft:stained_glass.15", "minecraft:black_stained_glass"), - ("minecraft:stained_glass_pane.0", "minecraft:white_stained_glass_pane"), - ("minecraft:stained_glass_pane.1", "minecraft:orange_stained_glass_pane"), - ("minecraft:stained_glass_pane.2", "minecraft:magenta_stained_glass_pane"), - ("minecraft:stained_glass_pane.3", "minecraft:light_blue_stained_glass_pane"), - ("minecraft:stained_glass_pane.4", "minecraft:yellow_stained_glass_pane"), - ("minecraft:stained_glass_pane.5", "minecraft:lime_stained_glass_pane"), - ("minecraft:stained_glass_pane.6", "minecraft:pink_stained_glass_pane"), - ("minecraft:stained_glass_pane.7", "minecraft:gray_stained_glass_pane"), - ("minecraft:stained_glass_pane.8", "minecraft:light_gray_stained_glass_pane"), - ("minecraft:stained_glass_pane.9", "minecraft:cyan_stained_glass_pane"), - ("minecraft:stained_glass_pane.10", "minecraft:purple_stained_glass_pane"), - ("minecraft:stained_glass_pane.11", "minecraft:blue_stained_glass_pane"), - ("minecraft:stained_glass_pane.12", "minecraft:brown_stained_glass_pane"), - ("minecraft:stained_glass_pane.13", "minecraft:green_stained_glass_pane"), - ("minecraft:stained_glass_pane.14", "minecraft:red_stained_glass_pane"), - ("minecraft:stained_glass_pane.15", "minecraft:black_stained_glass_pane"), + ( + "minecraft:stained_glass.15", + "minecraft:black_stained_glass", + ), + ( + "minecraft:stained_glass_pane.0", + "minecraft:white_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.1", + "minecraft:orange_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.2", + "minecraft:magenta_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.3", + "minecraft:light_blue_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.4", + "minecraft:yellow_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.5", + "minecraft:lime_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.6", + "minecraft:pink_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.7", + "minecraft:gray_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.8", + "minecraft:light_gray_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.9", + "minecraft:cyan_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.10", + "minecraft:purple_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.11", + "minecraft:blue_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.12", + "minecraft:brown_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.13", + "minecraft:green_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.14", + "minecraft:red_stained_glass_pane", + ), + ( + "minecraft:stained_glass_pane.15", + "minecraft:black_stained_glass_pane", + ), ("minecraft:prismarine.0", "minecraft:prismarine"), ("minecraft:prismarine.1", "minecraft:prismarine_bricks"), ("minecraft:prismarine.2", "minecraft:dark_prismarine"), @@ -147,29 +275,83 @@ pub static ITEM_FLATTENING: &[(&str, &str)] = &[ ("minecraft:concrete.13", "minecraft:green_concrete"), ("minecraft:concrete.14", "minecraft:red_concrete"), ("minecraft:concrete.15", "minecraft:black_concrete"), - ("minecraft:concrete_powder.0", "minecraft:white_concrete_powder"), - ("minecraft:concrete_powder.1", "minecraft:orange_concrete_powder"), - ("minecraft:concrete_powder.2", "minecraft:magenta_concrete_powder"), - ("minecraft:concrete_powder.3", "minecraft:light_blue_concrete_powder"), - ("minecraft:concrete_powder.4", "minecraft:yellow_concrete_powder"), - ("minecraft:concrete_powder.5", "minecraft:lime_concrete_powder"), - ("minecraft:concrete_powder.6", "minecraft:pink_concrete_powder"), - ("minecraft:concrete_powder.7", "minecraft:gray_concrete_powder"), - ("minecraft:concrete_powder.8", "minecraft:light_gray_concrete_powder"), - ("minecraft:concrete_powder.9", "minecraft:cyan_concrete_powder"), - ("minecraft:concrete_powder.10", "minecraft:purple_concrete_powder"), - ("minecraft:concrete_powder.11", "minecraft:blue_concrete_powder"), - ("minecraft:concrete_powder.12", "minecraft:brown_concrete_powder"), - ("minecraft:concrete_powder.13", "minecraft:green_concrete_powder"), - ("minecraft:concrete_powder.14", "minecraft:red_concrete_powder"), - ("minecraft:concrete_powder.15", "minecraft:black_concrete_powder"), + ( + "minecraft:concrete_powder.0", + "minecraft:white_concrete_powder", + ), + ( + "minecraft:concrete_powder.1", + "minecraft:orange_concrete_powder", + ), + ( + "minecraft:concrete_powder.2", + "minecraft:magenta_concrete_powder", + ), + ( + "minecraft:concrete_powder.3", + "minecraft:light_blue_concrete_powder", + ), + ( + "minecraft:concrete_powder.4", + "minecraft:yellow_concrete_powder", + ), + ( + "minecraft:concrete_powder.5", + "minecraft:lime_concrete_powder", + ), + ( + "minecraft:concrete_powder.6", + "minecraft:pink_concrete_powder", + ), + ( + "minecraft:concrete_powder.7", + "minecraft:gray_concrete_powder", + ), + ( + "minecraft:concrete_powder.8", + "minecraft:light_gray_concrete_powder", + ), + ( + "minecraft:concrete_powder.9", + "minecraft:cyan_concrete_powder", + ), + ( + "minecraft:concrete_powder.10", + "minecraft:purple_concrete_powder", + ), + ( + "minecraft:concrete_powder.11", + "minecraft:blue_concrete_powder", + ), + ( + "minecraft:concrete_powder.12", + "minecraft:brown_concrete_powder", + ), + ( + "minecraft:concrete_powder.13", + "minecraft:green_concrete_powder", + ), + ( + "minecraft:concrete_powder.14", + "minecraft:red_concrete_powder", + ), + ( + "minecraft:concrete_powder.15", + "minecraft:black_concrete_powder", + ), ("minecraft:cobblestone_wall.0", "minecraft:cobblestone_wall"), - ("minecraft:cobblestone_wall.1", "minecraft:mossy_cobblestone_wall"), + ( + "minecraft:cobblestone_wall.1", + "minecraft:mossy_cobblestone_wall", + ), ("minecraft:sandstone.0", "minecraft:sandstone"), ("minecraft:sandstone.1", "minecraft:chiseled_sandstone"), ("minecraft:sandstone.2", "minecraft:cut_sandstone"), ("minecraft:red_sandstone.0", "minecraft:red_sandstone"), - ("minecraft:red_sandstone.1", "minecraft:chiseled_red_sandstone"), + ( + "minecraft:red_sandstone.1", + "minecraft:chiseled_red_sandstone", + ), ("minecraft:red_sandstone.2", "minecraft:cut_red_sandstone"), ("minecraft:stonebrick.0", "minecraft:stone_bricks"), ("minecraft:stonebrick.1", "minecraft:mossy_stone_bricks"), @@ -178,9 +360,18 @@ pub static ITEM_FLATTENING: &[(&str, &str)] = &[ ("minecraft:monster_egg.0", "minecraft:infested_stone"), ("minecraft:monster_egg.1", "minecraft:infested_cobblestone"), ("minecraft:monster_egg.2", "minecraft:infested_stone_bricks"), - ("minecraft:monster_egg.3", "minecraft:infested_mossy_stone_bricks"), - ("minecraft:monster_egg.4", "minecraft:infested_cracked_stone_bricks"), - ("minecraft:monster_egg.5", "minecraft:infested_chiseled_stone_bricks"), + ( + "minecraft:monster_egg.3", + "minecraft:infested_mossy_stone_bricks", + ), + ( + "minecraft:monster_egg.4", + "minecraft:infested_cracked_stone_bricks", + ), + ( + "minecraft:monster_egg.5", + "minecraft:infested_chiseled_stone_bricks", + ), ("minecraft:yellow_flower.0", "minecraft:dandelion"), ("minecraft:red_flower.0", "minecraft:poppy"), ("minecraft:red_flower.1", "minecraft:blue_orchid"), @@ -234,7 +425,10 @@ pub static ITEM_FLATTENING: &[(&str, &str)] = &[ ("minecraft:skull.4", "minecraft:creeper_head"), ("minecraft:skull.5", "minecraft:dragon_head"), ("minecraft:golden_apple.0", "minecraft:golden_apple"), - ("minecraft:golden_apple.1", "minecraft:enchanted_golden_apple"), + ( + "minecraft:golden_apple.1", + "minecraft:enchanted_golden_apple", + ), ("minecraft:fireworks.0", "minecraft:firework_rocket"), ("minecraft:firework_charge.0", "minecraft:firework_star"), ("minecraft:dye.0", "minecraft:ink_sac"), @@ -253,7 +447,10 @@ pub static ITEM_FLATTENING: &[(&str, &str)] = &[ ("minecraft:dye.13", "minecraft:magenta_dye"), ("minecraft:dye.14", "minecraft:orange_dye"), ("minecraft:dye.15", "minecraft:bone_meal"), - ("minecraft:silver_shulker_box.0", "minecraft:light_gray_shulker_box"), + ( + "minecraft:silver_shulker_box.0", + "minecraft:light_gray_shulker_box", + ), ("minecraft:fence.0", "minecraft:oak_fence"), ("minecraft:fence_gate.0", "minecraft:oak_fence_gate"), ("minecraft:wooden_door.0", "minecraft:oak_door"), @@ -262,10 +459,16 @@ pub static ITEM_FLATTENING: &[(&str, &str)] = &[ ("minecraft:pumpkin.0", "minecraft:carved_pumpkin"), ("minecraft:trapdoor.0", "minecraft:oak_trapdoor"), ("minecraft:nether_brick.0", "minecraft:nether_bricks"), - ("minecraft:red_nether_brick.0", "minecraft:red_nether_bricks"), + ( + "minecraft:red_nether_brick.0", + "minecraft:red_nether_bricks", + ), ("minecraft:netherbrick.0", "minecraft:nether_brick"), ("minecraft:wooden_button.0", "minecraft:oak_button"), - ("minecraft:wooden_pressure_plate.0", "minecraft:oak_pressure_plate"), + ( + "minecraft:wooden_pressure_plate.0", + "minecraft:oak_pressure_plate", + ), ("minecraft:noteblock.0", "minecraft:note_block"), ("minecraft:bed.0", "minecraft:white_bed"), ("minecraft:bed.1", "minecraft:orange_bed"), @@ -1047,7 +1250,10 @@ pub static STATS_CUSTOM: &[(&str, &str)] = &[ ("stat.cauldronUsed", "minecraft:use_cauldron"), ("stat.armorCleaned", "minecraft:clean_armor"), ("stat.bannerCleaned", "minecraft:clean_banner"), - ("stat.brewingstandInteraction", "minecraft:interact_with_brewingstand"), + ( + "stat.brewingstandInteraction", + "minecraft:interact_with_brewingstand", + ), ("stat.beaconInteraction", "minecraft:interact_with_beacon"), ("stat.dropperInspected", "minecraft:inspect_dropper"), ("stat.hopperInspected", "minecraft:inspect_hopper"), @@ -1055,12 +1261,18 @@ pub static STATS_CUSTOM: &[(&str, &str)] = &[ ("stat.noteblockPlayed", "minecraft:play_noteblock"), ("stat.noteblockTuned", "minecraft:tune_noteblock"), ("stat.flowerPotted", "minecraft:pot_flower"), - ("stat.trappedChestTriggered", "minecraft:trigger_trapped_chest"), + ( + "stat.trappedChestTriggered", + "minecraft:trigger_trapped_chest", + ), ("stat.enderchestOpened", "minecraft:open_enderchest"), ("stat.itemEnchanted", "minecraft:enchant_item"), ("stat.recordPlayed", "minecraft:play_record"), ("stat.furnaceInteraction", "minecraft:interact_with_furnace"), - ("stat.craftingTableInteraction", "minecraft:interact_with_crafting_table"), + ( + "stat.craftingTableInteraction", + "minecraft:interact_with_crafting_table", + ), ("stat.chestOpened", "minecraft:open_chest"), ("stat.sleepInBed", "minecraft:sleep_in_bed"), ("stat.shulkerBoxOpened", "minecraft:open_shulker_box"), @@ -1128,58 +1340,130 @@ pub static STATS_ENTITIES: &[(&str, &str)] = &[ pub static RECIPES: &[(&str, &str)] = &[ ("minecraft:acacia_wooden_slab", "minecraft:acacia_slab"), ("minecraft:birch_wooden_slab", "minecraft:birch_slab"), - ("minecraft:black_stained_hardened_clay", "minecraft:black_terracotta"), - ("minecraft:blue_stained_hardened_clay", "minecraft:blue_terracotta"), + ( + "minecraft:black_stained_hardened_clay", + "minecraft:black_terracotta", + ), + ( + "minecraft:blue_stained_hardened_clay", + "minecraft:blue_terracotta", + ), ("minecraft:boat", "minecraft:oak_boat"), - ("minecraft:bone_meal_from_block", "minecraft:bone_meal_from_bone_block"), + ( + "minecraft:bone_meal_from_block", + "minecraft:bone_meal_from_bone_block", + ), ("minecraft:bone_meal_from_bone", "minecraft:bone_meal"), ("minecraft:brick_block", "minecraft:bricks"), - ("minecraft:brown_stained_hardened_clay", "minecraft:brown_terracotta"), - ("minecraft:chiseled_stonebrick", "minecraft:chiseled_stone_bricks"), - ("minecraft:cyan_stained_hardened_clay", "minecraft:cyan_terracotta"), + ( + "minecraft:brown_stained_hardened_clay", + "minecraft:brown_terracotta", + ), + ( + "minecraft:chiseled_stonebrick", + "minecraft:chiseled_stone_bricks", + ), + ( + "minecraft:cyan_stained_hardened_clay", + "minecraft:cyan_terracotta", + ), ("minecraft:dark_oak_wooden_slab", "minecraft:dark_oak_slab"), ("minecraft:end_bricks", "minecraft:end_stone_bricks"), ("minecraft:fence_gate", "minecraft:oak_fence_gate"), ("minecraft:fence", "minecraft:oak_fence"), ("minecraft:golden_rail", "minecraft:powered_rail"), - ("minecraft:gold_ingot_from_block", "minecraft:gold_ingot_from_gold_block"), - ("minecraft:gray_stained_hardened_clay", "minecraft:gray_terracotta"), - ("minecraft:green_stained_hardened_clay", "minecraft:green_terracotta"), - ("minecraft:iron_ingot_from_block", "minecraft:iron_ingot_from_iron_block"), + ( + "minecraft:gold_ingot_from_block", + "minecraft:gold_ingot_from_gold_block", + ), + ( + "minecraft:gray_stained_hardened_clay", + "minecraft:gray_terracotta", + ), + ( + "minecraft:green_stained_hardened_clay", + "minecraft:green_terracotta", + ), + ( + "minecraft:iron_ingot_from_block", + "minecraft:iron_ingot_from_iron_block", + ), ("minecraft:jungle_wooden_slab", "minecraft:jungle_slab"), - ("minecraft:light_blue_stained_hardened_clay", "minecraft:light_blue_terracotta"), - ("minecraft:light_gray_stained_hardened_clay", "minecraft:light_gray_terracotta"), - ("minecraft:lime_stained_hardened_clay", "minecraft:lime_terracotta"), + ( + "minecraft:light_blue_stained_hardened_clay", + "minecraft:light_blue_terracotta", + ), + ( + "minecraft:light_gray_stained_hardened_clay", + "minecraft:light_gray_terracotta", + ), + ( + "minecraft:lime_stained_hardened_clay", + "minecraft:lime_terracotta", + ), ("minecraft:lit_pumpkin", "minecraft:jack_o_lantern"), - ("minecraft:magenta_stained_hardened_clay", "minecraft:magenta_terracotta"), + ( + "minecraft:magenta_stained_hardened_clay", + "minecraft:magenta_terracotta", + ), ("minecraft:magma", "minecraft:magma_block"), ("minecraft:melon_block", "minecraft:melon"), ("minecraft:mossy_stonebrick", "minecraft:mossy_stone_bricks"), ("minecraft:noteblock", "minecraft:note_block"), ("minecraft:oak_wooden_slab", "minecraft:oak_slab"), - ("minecraft:orange_stained_hardened_clay", "minecraft:orange_terracotta"), + ( + "minecraft:orange_stained_hardened_clay", + "minecraft:orange_terracotta", + ), ("minecraft:pillar_quartz_block", "minecraft:quartz_pillar"), - ("minecraft:pink_stained_hardened_clay", "minecraft:pink_terracotta"), + ( + "minecraft:pink_stained_hardened_clay", + "minecraft:pink_terracotta", + ), ("minecraft:purple_shulker_box", "minecraft:shulker_box"), - ("minecraft:purple_stained_hardened_clay", "minecraft:purple_terracotta"), + ( + "minecraft:purple_stained_hardened_clay", + "minecraft:purple_terracotta", + ), ("minecraft:red_nether_brick", "minecraft:red_nether_bricks"), - ("minecraft:red_stained_hardened_clay", "minecraft:red_terracotta"), + ( + "minecraft:red_stained_hardened_clay", + "minecraft:red_terracotta", + ), ("minecraft:slime", "minecraft:slime_block"), - ("minecraft:smooth_red_sandstone", "minecraft:cut_red_sandstone"), + ( + "minecraft:smooth_red_sandstone", + "minecraft:cut_red_sandstone", + ), ("minecraft:smooth_sandstone", "minecraft:cut_sandstone"), ("minecraft:snow_layer", "minecraft:snow"), ("minecraft:snow", "minecraft:snow_block"), - ("minecraft:speckled_melon", "minecraft:glistering_melon_slice"), + ( + "minecraft:speckled_melon", + "minecraft:glistering_melon_slice", + ), ("minecraft:spruce_wooden_slab", "minecraft:spruce_slab"), ("minecraft:stonebrick", "minecraft:stone_bricks"), ("minecraft:stone_stairs", "minecraft:cobblestone_stairs"), - ("minecraft:string_to_wool", "minecraft:white_wool_from_string"), + ( + "minecraft:string_to_wool", + "minecraft:white_wool_from_string", + ), ("minecraft:trapdoor", "minecraft:oak_trapdoor"), - ("minecraft:white_stained_hardened_clay", "minecraft:white_terracotta"), + ( + "minecraft:white_stained_hardened_clay", + "minecraft:white_terracotta", + ), ("minecraft:wooden_button", "minecraft:oak_button"), ("minecraft:wooden_door", "minecraft:oak_door"), - ("minecraft:wooden_pressure_plate", "minecraft:oak_pressure_plate"), - ("minecraft:yellow_stained_hardened_clay", "minecraft:yellow_terracotta"), + ( + "minecraft:wooden_pressure_plate", + "minecraft:oak_pressure_plate", + ), + ( + "minecraft:yellow_stained_hardened_clay", + "minecraft:yellow_terracotta", + ), ]; pub static RECIPES_RENAMENING: &[(&str, &str)] = &[ @@ -1192,61 +1476,226 @@ pub static RECIPES_RENAMENING: &[(&str, &str)] = &[ ]; pub static ADVANCEMENTS: &[(&str, &str)] = &[ - ("minecraft:recipes/brewing/speckled_melon", "minecraft:recipes/brewing/glistering_melon_slice"), - ("minecraft:recipes/building_blocks/black_stained_hardened_clay", "minecraft:recipes/building_blocks/black_terracotta"), - ("minecraft:recipes/building_blocks/blue_stained_hardened_clay", "minecraft:recipes/building_blocks/blue_terracotta"), - ("minecraft:recipes/building_blocks/brown_stained_hardened_clay", "minecraft:recipes/building_blocks/brown_terracotta"), - ("minecraft:recipes/building_blocks/cyan_stained_hardened_clay", "minecraft:recipes/building_blocks/cyan_terracotta"), - ("minecraft:recipes/building_blocks/gray_stained_hardened_clay", "minecraft:recipes/building_blocks/gray_terracotta"), - ("minecraft:recipes/building_blocks/green_stained_hardened_clay", "minecraft:recipes/building_blocks/green_terracotta"), - ("minecraft:recipes/building_blocks/light_blue_stained_hardened_clay", "minecraft:recipes/building_blocks/light_blue_terracotta"), - ("minecraft:recipes/building_blocks/light_gray_stained_hardened_clay", "minecraft:recipes/building_blocks/light_gray_terracotta"), - ("minecraft:recipes/building_blocks/lime_stained_hardened_clay", "minecraft:recipes/building_blocks/lime_terracotta"), - ("minecraft:recipes/building_blocks/magenta_stained_hardened_clay", "minecraft:recipes/building_blocks/magenta_terracotta"), - ("minecraft:recipes/building_blocks/orange_stained_hardened_clay", "minecraft:recipes/building_blocks/orange_terracotta"), - ("minecraft:recipes/building_blocks/pink_stained_hardened_clay", "minecraft:recipes/building_blocks/pink_terracotta"), - ("minecraft:recipes/building_blocks/purple_stained_hardened_clay", "minecraft:recipes/building_blocks/purple_terracotta"), - ("minecraft:recipes/building_blocks/red_stained_hardened_clay", "minecraft:recipes/building_blocks/red_terracotta"), - ("minecraft:recipes/building_blocks/white_stained_hardened_clay", "minecraft:recipes/building_blocks/white_terracotta"), - ("minecraft:recipes/building_blocks/yellow_stained_hardened_clay", "minecraft:recipes/building_blocks/yellow_terracotta"), - ("minecraft:recipes/building_blocks/acacia_wooden_slab", "minecraft:recipes/building_blocks/acacia_slab"), - ("minecraft:recipes/building_blocks/birch_wooden_slab", "minecraft:recipes/building_blocks/birch_slab"), - ("minecraft:recipes/building_blocks/dark_oak_wooden_slab", "minecraft:recipes/building_blocks/dark_oak_slab"), - ("minecraft:recipes/building_blocks/jungle_wooden_slab", "minecraft:recipes/building_blocks/jungle_slab"), - ("minecraft:recipes/building_blocks/oak_wooden_slab", "minecraft:recipes/building_blocks/oak_slab"), - ("minecraft:recipes/building_blocks/spruce_wooden_slab", "minecraft:recipes/building_blocks/spruce_slab"), - ("minecraft:recipes/building_blocks/brick_block", "minecraft:recipes/building_blocks/bricks"), - ("minecraft:recipes/building_blocks/chiseled_stonebrick", "minecraft:recipes/building_blocks/chiseled_stone_bricks"), - ("minecraft:recipes/building_blocks/end_bricks", "minecraft:recipes/building_blocks/end_stone_bricks"), - ("minecraft:recipes/building_blocks/lit_pumpkin", "minecraft:recipes/building_blocks/jack_o_lantern"), - ("minecraft:recipes/building_blocks/magma", "minecraft:recipes/building_blocks/magma_block"), - ("minecraft:recipes/building_blocks/melon_block", "minecraft:recipes/building_blocks/melon"), - ("minecraft:recipes/building_blocks/mossy_stonebrick", "minecraft:recipes/building_blocks/mossy_stone_bricks"), - ("minecraft:recipes/building_blocks/nether_brick", "minecraft:recipes/building_blocks/nether_bricks"), - ("minecraft:recipes/building_blocks/pillar_quartz_block", "minecraft:recipes/building_blocks/quartz_pillar"), - ("minecraft:recipes/building_blocks/red_nether_brick", "minecraft:recipes/building_blocks/red_nether_bricks"), - ("minecraft:recipes/building_blocks/snow", "minecraft:recipes/building_blocks/snow_block"), - ("minecraft:recipes/building_blocks/smooth_red_sandstone", "minecraft:recipes/building_blocks/cut_red_sandstone"), - ("minecraft:recipes/building_blocks/smooth_sandstone", "minecraft:recipes/building_blocks/cut_sandstone"), - ("minecraft:recipes/building_blocks/stonebrick", "minecraft:recipes/building_blocks/stone_bricks"), - ("minecraft:recipes/building_blocks/stone_stairs", "minecraft:recipes/building_blocks/cobblestone_stairs"), - ("minecraft:recipes/building_blocks/string_to_wool", "minecraft:recipes/building_blocks/white_wool_from_string"), - ("minecraft:recipes/decorations/fence", "minecraft:recipes/decorations/oak_fence"), - ("minecraft:recipes/decorations/purple_shulker_box", "minecraft:recipes/decorations/shulker_box"), - ("minecraft:recipes/decorations/slime", "minecraft:recipes/decorations/slime_block"), - ("minecraft:recipes/decorations/snow_layer", "minecraft:recipes/decorations/snow"), - ("minecraft:recipes/misc/bone_meal_from_block", "minecraft:recipes/misc/bone_meal_from_bone_block"), - ("minecraft:recipes/misc/bone_meal_from_bone", "minecraft:recipes/misc/bone_meal"), - ("minecraft:recipes/misc/gold_ingot_from_block", "minecraft:recipes/misc/gold_ingot_from_gold_block"), - ("minecraft:recipes/misc/iron_ingot_from_block", "minecraft:recipes/misc/iron_ingot_from_iron_block"), - ("minecraft:recipes/redstone/fence_gate", "minecraft:recipes/redstone/oak_fence_gate"), - ("minecraft:recipes/redstone/noteblock", "minecraft:recipes/redstone/note_block"), - ("minecraft:recipes/redstone/trapdoor", "minecraft:recipes/redstone/oak_trapdoor"), - ("minecraft:recipes/redstone/wooden_button", "minecraft:recipes/redstone/oak_button"), - ("minecraft:recipes/redstone/wooden_door", "minecraft:recipes/redstone/oak_door"), - ("minecraft:recipes/redstone/wooden_pressure_plate", "minecraft:recipes/redstone/oak_pressure_plate"), - ("minecraft:recipes/transportation/boat", "minecraft:recipes/transportation/oak_boat"), - ("minecraft:recipes/transportation/golden_rail", "minecraft:recipes/transportation/powered_rail"), + ( + "minecraft:recipes/brewing/speckled_melon", + "minecraft:recipes/brewing/glistering_melon_slice", + ), + ( + "minecraft:recipes/building_blocks/black_stained_hardened_clay", + "minecraft:recipes/building_blocks/black_terracotta", + ), + ( + "minecraft:recipes/building_blocks/blue_stained_hardened_clay", + "minecraft:recipes/building_blocks/blue_terracotta", + ), + ( + "minecraft:recipes/building_blocks/brown_stained_hardened_clay", + "minecraft:recipes/building_blocks/brown_terracotta", + ), + ( + "minecraft:recipes/building_blocks/cyan_stained_hardened_clay", + "minecraft:recipes/building_blocks/cyan_terracotta", + ), + ( + "minecraft:recipes/building_blocks/gray_stained_hardened_clay", + "minecraft:recipes/building_blocks/gray_terracotta", + ), + ( + "minecraft:recipes/building_blocks/green_stained_hardened_clay", + "minecraft:recipes/building_blocks/green_terracotta", + ), + ( + "minecraft:recipes/building_blocks/light_blue_stained_hardened_clay", + "minecraft:recipes/building_blocks/light_blue_terracotta", + ), + ( + "minecraft:recipes/building_blocks/light_gray_stained_hardened_clay", + "minecraft:recipes/building_blocks/light_gray_terracotta", + ), + ( + "minecraft:recipes/building_blocks/lime_stained_hardened_clay", + "minecraft:recipes/building_blocks/lime_terracotta", + ), + ( + "minecraft:recipes/building_blocks/magenta_stained_hardened_clay", + "minecraft:recipes/building_blocks/magenta_terracotta", + ), + ( + "minecraft:recipes/building_blocks/orange_stained_hardened_clay", + "minecraft:recipes/building_blocks/orange_terracotta", + ), + ( + "minecraft:recipes/building_blocks/pink_stained_hardened_clay", + "minecraft:recipes/building_blocks/pink_terracotta", + ), + ( + "minecraft:recipes/building_blocks/purple_stained_hardened_clay", + "minecraft:recipes/building_blocks/purple_terracotta", + ), + ( + "minecraft:recipes/building_blocks/red_stained_hardened_clay", + "minecraft:recipes/building_blocks/red_terracotta", + ), + ( + "minecraft:recipes/building_blocks/white_stained_hardened_clay", + "minecraft:recipes/building_blocks/white_terracotta", + ), + ( + "minecraft:recipes/building_blocks/yellow_stained_hardened_clay", + "minecraft:recipes/building_blocks/yellow_terracotta", + ), + ( + "minecraft:recipes/building_blocks/acacia_wooden_slab", + "minecraft:recipes/building_blocks/acacia_slab", + ), + ( + "minecraft:recipes/building_blocks/birch_wooden_slab", + "minecraft:recipes/building_blocks/birch_slab", + ), + ( + "minecraft:recipes/building_blocks/dark_oak_wooden_slab", + "minecraft:recipes/building_blocks/dark_oak_slab", + ), + ( + "minecraft:recipes/building_blocks/jungle_wooden_slab", + "minecraft:recipes/building_blocks/jungle_slab", + ), + ( + "minecraft:recipes/building_blocks/oak_wooden_slab", + "minecraft:recipes/building_blocks/oak_slab", + ), + ( + "minecraft:recipes/building_blocks/spruce_wooden_slab", + "minecraft:recipes/building_blocks/spruce_slab", + ), + ( + "minecraft:recipes/building_blocks/brick_block", + "minecraft:recipes/building_blocks/bricks", + ), + ( + "minecraft:recipes/building_blocks/chiseled_stonebrick", + "minecraft:recipes/building_blocks/chiseled_stone_bricks", + ), + ( + "minecraft:recipes/building_blocks/end_bricks", + "minecraft:recipes/building_blocks/end_stone_bricks", + ), + ( + "minecraft:recipes/building_blocks/lit_pumpkin", + "minecraft:recipes/building_blocks/jack_o_lantern", + ), + ( + "minecraft:recipes/building_blocks/magma", + "minecraft:recipes/building_blocks/magma_block", + ), + ( + "minecraft:recipes/building_blocks/melon_block", + "minecraft:recipes/building_blocks/melon", + ), + ( + "minecraft:recipes/building_blocks/mossy_stonebrick", + "minecraft:recipes/building_blocks/mossy_stone_bricks", + ), + ( + "minecraft:recipes/building_blocks/nether_brick", + "minecraft:recipes/building_blocks/nether_bricks", + ), + ( + "minecraft:recipes/building_blocks/pillar_quartz_block", + "minecraft:recipes/building_blocks/quartz_pillar", + ), + ( + "minecraft:recipes/building_blocks/red_nether_brick", + "minecraft:recipes/building_blocks/red_nether_bricks", + ), + ( + "minecraft:recipes/building_blocks/snow", + "minecraft:recipes/building_blocks/snow_block", + ), + ( + "minecraft:recipes/building_blocks/smooth_red_sandstone", + "minecraft:recipes/building_blocks/cut_red_sandstone", + ), + ( + "minecraft:recipes/building_blocks/smooth_sandstone", + "minecraft:recipes/building_blocks/cut_sandstone", + ), + ( + "minecraft:recipes/building_blocks/stonebrick", + "minecraft:recipes/building_blocks/stone_bricks", + ), + ( + "minecraft:recipes/building_blocks/stone_stairs", + "minecraft:recipes/building_blocks/cobblestone_stairs", + ), + ( + "minecraft:recipes/building_blocks/string_to_wool", + "minecraft:recipes/building_blocks/white_wool_from_string", + ), + ( + "minecraft:recipes/decorations/fence", + "minecraft:recipes/decorations/oak_fence", + ), + ( + "minecraft:recipes/decorations/purple_shulker_box", + "minecraft:recipes/decorations/shulker_box", + ), + ( + "minecraft:recipes/decorations/slime", + "minecraft:recipes/decorations/slime_block", + ), + ( + "minecraft:recipes/decorations/snow_layer", + "minecraft:recipes/decorations/snow", + ), + ( + "minecraft:recipes/misc/bone_meal_from_block", + "minecraft:recipes/misc/bone_meal_from_bone_block", + ), + ( + "minecraft:recipes/misc/bone_meal_from_bone", + "minecraft:recipes/misc/bone_meal", + ), + ( + "minecraft:recipes/misc/gold_ingot_from_block", + "minecraft:recipes/misc/gold_ingot_from_gold_block", + ), + ( + "minecraft:recipes/misc/iron_ingot_from_block", + "minecraft:recipes/misc/iron_ingot_from_iron_block", + ), + ( + "minecraft:recipes/redstone/fence_gate", + "minecraft:recipes/redstone/oak_fence_gate", + ), + ( + "minecraft:recipes/redstone/noteblock", + "minecraft:recipes/redstone/note_block", + ), + ( + "minecraft:recipes/redstone/trapdoor", + "minecraft:recipes/redstone/oak_trapdoor", + ), + ( + "minecraft:recipes/redstone/wooden_button", + "minecraft:recipes/redstone/oak_button", + ), + ( + "minecraft:recipes/redstone/wooden_door", + "minecraft:recipes/redstone/oak_door", + ), + ( + "minecraft:recipes/redstone/wooden_pressure_plate", + "minecraft:recipes/redstone/oak_pressure_plate", + ), + ( + "minecraft:recipes/transportation/boat", + "minecraft:recipes/transportation/oak_boat", + ), + ( + "minecraft:recipes/transportation/golden_rail", + "minecraft:recipes/transportation/powered_rail", + ), ]; pub static GENERATOR_BIOMES: &[(&str, &str)] = &[ @@ -1333,11 +1782,17 @@ pub static SPAWN_EGGS: &[(&str, &str)] = &[ ("minecraft:cow", "minecraft:cow_spawn_egg"), ("minecraft:creeper", "minecraft:creeper_spawn_egg"), ("minecraft:donkey", "minecraft:donkey_spawn_egg"), - ("minecraft:elder_guardian", "minecraft:elder_guardian_spawn_egg"), + ( + "minecraft:elder_guardian", + "minecraft:elder_guardian_spawn_egg", + ), ("minecraft:ender_dragon", "minecraft:ender_dragon_spawn_egg"), ("minecraft:enderman", "minecraft:enderman_spawn_egg"), ("minecraft:endermite", "minecraft:endermite_spawn_egg"), - ("minecraft:evocation_illager", "minecraft:evocation_illager_spawn_egg"), + ( + "minecraft:evocation_illager", + "minecraft:evocation_illager_spawn_egg", + ), ("minecraft:ghast", "minecraft:ghast_spawn_egg"), ("minecraft:guardian", "minecraft:guardian_spawn_egg"), ("minecraft:horse", "minecraft:horse_spawn_egg"), @@ -1357,7 +1812,10 @@ pub static SPAWN_EGGS: &[(&str, &str)] = &[ ("minecraft:shulker", "minecraft:shulker_spawn_egg"), ("minecraft:silverfish", "minecraft:silverfish_spawn_egg"), ("minecraft:skeleton", "minecraft:skeleton_spawn_egg"), - ("minecraft:skeleton_horse", "minecraft:skeleton_horse_spawn_egg"), + ( + "minecraft:skeleton_horse", + "minecraft:skeleton_horse_spawn_egg", + ), ("minecraft:slime", "minecraft:slime_spawn_egg"), ("minecraft:snow_golem", "minecraft:snow_golem_spawn_egg"), ("minecraft:spider", "minecraft:spider_spawn_egg"), @@ -1366,15 +1824,27 @@ pub static SPAWN_EGGS: &[(&str, &str)] = &[ ("minecraft:turtle", "minecraft:turtle_spawn_egg"), ("minecraft:vex", "minecraft:vex_spawn_egg"), ("minecraft:villager", "minecraft:villager_spawn_egg"), - ("minecraft:vindication_illager", "minecraft:vindication_illager_spawn_egg"), + ( + "minecraft:vindication_illager", + "minecraft:vindication_illager_spawn_egg", + ), ("minecraft:witch", "minecraft:witch_spawn_egg"), ("minecraft:wither", "minecraft:wither_spawn_egg"), - ("minecraft:wither_skeleton", "minecraft:wither_skeleton_spawn_egg"), + ( + "minecraft:wither_skeleton", + "minecraft:wither_skeleton_spawn_egg", + ), ("minecraft:wolf", "minecraft:wolf_spawn_egg"), ("minecraft:zombie", "minecraft:zombie_spawn_egg"), ("minecraft:zombie_horse", "minecraft:zombie_horse_spawn_egg"), - ("minecraft:zombie_pigman", "minecraft:zombie_pigman_spawn_egg"), - ("minecraft:zombie_villager", "minecraft:zombie_villager_spawn_egg"), + ( + "minecraft:zombie_pigman", + "minecraft:zombie_pigman_spawn_egg", + ), + ( + "minecraft:zombie_villager", + "minecraft:zombie_villager_spawn_egg", + ), ]; pub static ENCHANTMENTS: &[(i32, &str)] = &[ @@ -1439,14 +1909,23 @@ pub static CORAL: &[(&str, &str)] = &[ pub static CORAL_FANS: &[(&str, &str)] = &[ ("minecraft:tube_coral_fan", "minecraft:tube_coral_wall_fan"), - ("minecraft:brain_coral_fan", "minecraft:brain_coral_wall_fan"), - ("minecraft:bubble_coral_fan", "minecraft:bubble_coral_wall_fan"), + ( + "minecraft:brain_coral_fan", + "minecraft:brain_coral_wall_fan", + ), + ( + "minecraft:bubble_coral_fan", + "minecraft:bubble_coral_wall_fan", + ), ("minecraft:fire_coral_fan", "minecraft:fire_coral_wall_fan"), ("minecraft:horn_coral_fan", "minecraft:horn_coral_wall_fan"), ]; pub static THE_RENAMENING_ENTITIES: &[(&str, &str)] = &[ - ("minecraft:commandblock_minecart", "minecraft:command_block_minecart"), + ( + "minecraft:commandblock_minecart", + "minecraft:command_block_minecart", + ), ("minecraft:ender_crystal", "minecraft:end_crystal"), ("minecraft:snowman", "minecraft:snow_golem"), ("minecraft:evocation_illager", "minecraft:evoker"), @@ -1469,11 +1948,26 @@ pub static THE_RENAMENING_BLOCKS: &[(&str, &str)] = &[ ("minecraft:acacia_bark", "minecraft:acacia_wood"), ("minecraft:dark_oak_bark", "minecraft:dark_oak_wood"), ("minecraft:stripped_oak_bark", "minecraft:stripped_oak_wood"), - ("minecraft:stripped_spruce_bark", "minecraft:stripped_spruce_wood"), - ("minecraft:stripped_birch_bark", "minecraft:stripped_birch_wood"), - ("minecraft:stripped_jungle_bark", "minecraft:stripped_jungle_wood"), - ("minecraft:stripped_acacia_bark", "minecraft:stripped_acacia_wood"), - ("minecraft:stripped_dark_oak_bark", "minecraft:stripped_dark_oak_wood"), + ( + "minecraft:stripped_spruce_bark", + "minecraft:stripped_spruce_wood", + ), + ( + "minecraft:stripped_birch_bark", + "minecraft:stripped_birch_wood", + ), + ( + "minecraft:stripped_jungle_bark", + "minecraft:stripped_jungle_wood", + ), + ( + "minecraft:stripped_acacia_bark", + "minecraft:stripped_acacia_wood", + ), + ( + "minecraft:stripped_dark_oak_bark", + "minecraft:stripped_dark_oak_wood", + ), ("minecraft:mob_spawner", "minecraft:spawner"), ]; @@ -1483,92 +1977,303 @@ pub static COD_SALMON: &[(&str, &str)] = &[ ]; pub static COD_SALMON_EGGS: &[(&str, &str)] = &[ - ("minecraft:salmon_mob_spawn_egg", "minecraft:salmon_spawn_egg"), + ( + "minecraft:salmon_mob_spawn_egg", + "minecraft:salmon_spawn_egg", + ), ("minecraft:cod_mob_spawn_egg", "minecraft:cod_spawn_egg"), ]; /// `ChunkStructuresTemplateRenameFix.RENAMES`: structure id, child id, template renames. pub static STRUCTURE_TEMPLATE_RENAMES: &[(&str, &str, &[(&str, &str)])] = &[ - ("EndCity", "ECP", &[ - ("second_floor", "second_floor_1"), - ("third_floor", "third_floor_1"), - ("third_floor_c", "third_floor_2"), - ]), - ("Mansion", "WMP", &[ - ("carpet_south", "carpet_south_1"), - ("carpet_west", "carpet_west_1"), - ("indoors_door", "indoors_door_1"), - ("indoors_wall", "indoors_wall_1"), - ]), - ("Igloo", "Iglu", &[ - ("minecraft:igloo/igloo_bottom", "minecraft:igloo/bottom"), - ("minecraft:igloo/igloo_middle", "minecraft:igloo/middle"), - ("minecraft:igloo/igloo_top", "minecraft:igloo/top"), - ]), - ("Ocean_Ruin", "ORP", &[ - ("minecraft:ruin/big_ruin1_brick", "minecraft:underwater_ruin/big_brick_1"), - ("minecraft:ruin/big_ruin2_brick", "minecraft:underwater_ruin/big_brick_2"), - ("minecraft:ruin/big_ruin3_brick", "minecraft:underwater_ruin/big_brick_3"), - ("minecraft:ruin/big_ruin8_brick", "minecraft:underwater_ruin/big_brick_8"), - ("minecraft:ruin/big_ruin1_cracked", "minecraft:underwater_ruin/big_cracked_1"), - ("minecraft:ruin/big_ruin2_cracked", "minecraft:underwater_ruin/big_cracked_2"), - ("minecraft:ruin/big_ruin3_cracked", "minecraft:underwater_ruin/big_cracked_3"), - ("minecraft:ruin/big_ruin8_cracked", "minecraft:underwater_ruin/big_cracked_8"), - ("minecraft:ruin/big_ruin1_mossy", "minecraft:underwater_ruin/big_mossy_1"), - ("minecraft:ruin/big_ruin2_mossy", "minecraft:underwater_ruin/big_mossy_2"), - ("minecraft:ruin/big_ruin3_mossy", "minecraft:underwater_ruin/big_mossy_3"), - ("minecraft:ruin/big_ruin8_mossy", "minecraft:underwater_ruin/big_mossy_8"), - ("minecraft:ruin/big_ruin_warm4", "minecraft:underwater_ruin/big_warm_4"), - ("minecraft:ruin/big_ruin_warm5", "minecraft:underwater_ruin/big_warm_5"), - ("minecraft:ruin/big_ruin_warm6", "minecraft:underwater_ruin/big_warm_6"), - ("minecraft:ruin/big_ruin_warm7", "minecraft:underwater_ruin/big_warm_7"), - ("minecraft:ruin/ruin1_brick", "minecraft:underwater_ruin/brick_1"), - ("minecraft:ruin/ruin2_brick", "minecraft:underwater_ruin/brick_2"), - ("minecraft:ruin/ruin3_brick", "minecraft:underwater_ruin/brick_3"), - ("minecraft:ruin/ruin4_brick", "minecraft:underwater_ruin/brick_4"), - ("minecraft:ruin/ruin5_brick", "minecraft:underwater_ruin/brick_5"), - ("minecraft:ruin/ruin6_brick", "minecraft:underwater_ruin/brick_6"), - ("minecraft:ruin/ruin7_brick", "minecraft:underwater_ruin/brick_7"), - ("minecraft:ruin/ruin8_brick", "minecraft:underwater_ruin/brick_8"), - ("minecraft:ruin/ruin1_cracked", "minecraft:underwater_ruin/cracked_1"), - ("minecraft:ruin/ruin2_cracked", "minecraft:underwater_ruin/cracked_2"), - ("minecraft:ruin/ruin3_cracked", "minecraft:underwater_ruin/cracked_3"), - ("minecraft:ruin/ruin4_cracked", "minecraft:underwater_ruin/cracked_4"), - ("minecraft:ruin/ruin5_cracked", "minecraft:underwater_ruin/cracked_5"), - ("minecraft:ruin/ruin6_cracked", "minecraft:underwater_ruin/cracked_6"), - ("minecraft:ruin/ruin7_cracked", "minecraft:underwater_ruin/cracked_7"), - ("minecraft:ruin/ruin8_cracked", "minecraft:underwater_ruin/cracked_8"), - ("minecraft:ruin/ruin1_mossy", "minecraft:underwater_ruin/mossy_1"), - ("minecraft:ruin/ruin2_mossy", "minecraft:underwater_ruin/mossy_2"), - ("minecraft:ruin/ruin3_mossy", "minecraft:underwater_ruin/mossy_3"), - ("minecraft:ruin/ruin4_mossy", "minecraft:underwater_ruin/mossy_4"), - ("minecraft:ruin/ruin5_mossy", "minecraft:underwater_ruin/mossy_5"), - ("minecraft:ruin/ruin6_mossy", "minecraft:underwater_ruin/mossy_6"), - ("minecraft:ruin/ruin7_mossy", "minecraft:underwater_ruin/mossy_7"), - ("minecraft:ruin/ruin8_mossy", "minecraft:underwater_ruin/mossy_8"), - ("minecraft:ruin/ruin_warm1", "minecraft:underwater_ruin/warm_1"), - ("minecraft:ruin/ruin_warm2", "minecraft:underwater_ruin/warm_2"), - ("minecraft:ruin/ruin_warm3", "minecraft:underwater_ruin/warm_3"), - ("minecraft:ruin/ruin_warm4", "minecraft:underwater_ruin/warm_4"), - ("minecraft:ruin/ruin_warm5", "minecraft:underwater_ruin/warm_5"), - ("minecraft:ruin/ruin_warm6", "minecraft:underwater_ruin/warm_6"), - ("minecraft:ruin/ruin_warm7", "minecraft:underwater_ruin/warm_7"), - ("minecraft:ruin/ruin_warm8", "minecraft:underwater_ruin/warm_8"), - ("minecraft:ruin/big_brick_1", "minecraft:underwater_ruin/big_brick_1"), - ("minecraft:ruin/big_brick_2", "minecraft:underwater_ruin/big_brick_2"), - ("minecraft:ruin/big_brick_3", "minecraft:underwater_ruin/big_brick_3"), - ("minecraft:ruin/big_brick_8", "minecraft:underwater_ruin/big_brick_8"), - ("minecraft:ruin/big_mossy_1", "minecraft:underwater_ruin/big_mossy_1"), - ("minecraft:ruin/big_mossy_2", "minecraft:underwater_ruin/big_mossy_2"), - ("minecraft:ruin/big_mossy_3", "minecraft:underwater_ruin/big_mossy_3"), - ("minecraft:ruin/big_mossy_8", "minecraft:underwater_ruin/big_mossy_8"), - ("minecraft:ruin/big_cracked_1", "minecraft:underwater_ruin/big_cracked_1"), - ("minecraft:ruin/big_cracked_2", "minecraft:underwater_ruin/big_cracked_2"), - ("minecraft:ruin/big_cracked_3", "minecraft:underwater_ruin/big_cracked_3"), - ("minecraft:ruin/big_cracked_8", "minecraft:underwater_ruin/big_cracked_8"), - ("minecraft:ruin/big_warm_4", "minecraft:underwater_ruin/big_warm_4"), - ("minecraft:ruin/big_warm_5", "minecraft:underwater_ruin/big_warm_5"), - ("minecraft:ruin/big_warm_6", "minecraft:underwater_ruin/big_warm_6"), - ("minecraft:ruin/big_warm_7", "minecraft:underwater_ruin/big_warm_7"), - ]), + ( + "EndCity", + "ECP", + &[ + ("second_floor", "second_floor_1"), + ("third_floor", "third_floor_1"), + ("third_floor_c", "third_floor_2"), + ], + ), + ( + "Mansion", + "WMP", + &[ + ("carpet_south", "carpet_south_1"), + ("carpet_west", "carpet_west_1"), + ("indoors_door", "indoors_door_1"), + ("indoors_wall", "indoors_wall_1"), + ], + ), + ( + "Igloo", + "Iglu", + &[ + ("minecraft:igloo/igloo_bottom", "minecraft:igloo/bottom"), + ("minecraft:igloo/igloo_middle", "minecraft:igloo/middle"), + ("minecraft:igloo/igloo_top", "minecraft:igloo/top"), + ], + ), + ( + "Ocean_Ruin", + "ORP", + &[ + ( + "minecraft:ruin/big_ruin1_brick", + "minecraft:underwater_ruin/big_brick_1", + ), + ( + "minecraft:ruin/big_ruin2_brick", + "minecraft:underwater_ruin/big_brick_2", + ), + ( + "minecraft:ruin/big_ruin3_brick", + "minecraft:underwater_ruin/big_brick_3", + ), + ( + "minecraft:ruin/big_ruin8_brick", + "minecraft:underwater_ruin/big_brick_8", + ), + ( + "minecraft:ruin/big_ruin1_cracked", + "minecraft:underwater_ruin/big_cracked_1", + ), + ( + "minecraft:ruin/big_ruin2_cracked", + "minecraft:underwater_ruin/big_cracked_2", + ), + ( + "minecraft:ruin/big_ruin3_cracked", + "minecraft:underwater_ruin/big_cracked_3", + ), + ( + "minecraft:ruin/big_ruin8_cracked", + "minecraft:underwater_ruin/big_cracked_8", + ), + ( + "minecraft:ruin/big_ruin1_mossy", + "minecraft:underwater_ruin/big_mossy_1", + ), + ( + "minecraft:ruin/big_ruin2_mossy", + "minecraft:underwater_ruin/big_mossy_2", + ), + ( + "minecraft:ruin/big_ruin3_mossy", + "minecraft:underwater_ruin/big_mossy_3", + ), + ( + "minecraft:ruin/big_ruin8_mossy", + "minecraft:underwater_ruin/big_mossy_8", + ), + ( + "minecraft:ruin/big_ruin_warm4", + "minecraft:underwater_ruin/big_warm_4", + ), + ( + "minecraft:ruin/big_ruin_warm5", + "minecraft:underwater_ruin/big_warm_5", + ), + ( + "minecraft:ruin/big_ruin_warm6", + "minecraft:underwater_ruin/big_warm_6", + ), + ( + "minecraft:ruin/big_ruin_warm7", + "minecraft:underwater_ruin/big_warm_7", + ), + ( + "minecraft:ruin/ruin1_brick", + "minecraft:underwater_ruin/brick_1", + ), + ( + "minecraft:ruin/ruin2_brick", + "minecraft:underwater_ruin/brick_2", + ), + ( + "minecraft:ruin/ruin3_brick", + "minecraft:underwater_ruin/brick_3", + ), + ( + "minecraft:ruin/ruin4_brick", + "minecraft:underwater_ruin/brick_4", + ), + ( + "minecraft:ruin/ruin5_brick", + "minecraft:underwater_ruin/brick_5", + ), + ( + "minecraft:ruin/ruin6_brick", + "minecraft:underwater_ruin/brick_6", + ), + ( + "minecraft:ruin/ruin7_brick", + "minecraft:underwater_ruin/brick_7", + ), + ( + "minecraft:ruin/ruin8_brick", + "minecraft:underwater_ruin/brick_8", + ), + ( + "minecraft:ruin/ruin1_cracked", + "minecraft:underwater_ruin/cracked_1", + ), + ( + "minecraft:ruin/ruin2_cracked", + "minecraft:underwater_ruin/cracked_2", + ), + ( + "minecraft:ruin/ruin3_cracked", + "minecraft:underwater_ruin/cracked_3", + ), + ( + "minecraft:ruin/ruin4_cracked", + "minecraft:underwater_ruin/cracked_4", + ), + ( + "minecraft:ruin/ruin5_cracked", + "minecraft:underwater_ruin/cracked_5", + ), + ( + "minecraft:ruin/ruin6_cracked", + "minecraft:underwater_ruin/cracked_6", + ), + ( + "minecraft:ruin/ruin7_cracked", + "minecraft:underwater_ruin/cracked_7", + ), + ( + "minecraft:ruin/ruin8_cracked", + "minecraft:underwater_ruin/cracked_8", + ), + ( + "minecraft:ruin/ruin1_mossy", + "minecraft:underwater_ruin/mossy_1", + ), + ( + "minecraft:ruin/ruin2_mossy", + "minecraft:underwater_ruin/mossy_2", + ), + ( + "minecraft:ruin/ruin3_mossy", + "minecraft:underwater_ruin/mossy_3", + ), + ( + "minecraft:ruin/ruin4_mossy", + "minecraft:underwater_ruin/mossy_4", + ), + ( + "minecraft:ruin/ruin5_mossy", + "minecraft:underwater_ruin/mossy_5", + ), + ( + "minecraft:ruin/ruin6_mossy", + "minecraft:underwater_ruin/mossy_6", + ), + ( + "minecraft:ruin/ruin7_mossy", + "minecraft:underwater_ruin/mossy_7", + ), + ( + "minecraft:ruin/ruin8_mossy", + "minecraft:underwater_ruin/mossy_8", + ), + ( + "minecraft:ruin/ruin_warm1", + "minecraft:underwater_ruin/warm_1", + ), + ( + "minecraft:ruin/ruin_warm2", + "minecraft:underwater_ruin/warm_2", + ), + ( + "minecraft:ruin/ruin_warm3", + "minecraft:underwater_ruin/warm_3", + ), + ( + "minecraft:ruin/ruin_warm4", + "minecraft:underwater_ruin/warm_4", + ), + ( + "minecraft:ruin/ruin_warm5", + "minecraft:underwater_ruin/warm_5", + ), + ( + "minecraft:ruin/ruin_warm6", + "minecraft:underwater_ruin/warm_6", + ), + ( + "minecraft:ruin/ruin_warm7", + "minecraft:underwater_ruin/warm_7", + ), + ( + "minecraft:ruin/ruin_warm8", + "minecraft:underwater_ruin/warm_8", + ), + ( + "minecraft:ruin/big_brick_1", + "minecraft:underwater_ruin/big_brick_1", + ), + ( + "minecraft:ruin/big_brick_2", + "minecraft:underwater_ruin/big_brick_2", + ), + ( + "minecraft:ruin/big_brick_3", + "minecraft:underwater_ruin/big_brick_3", + ), + ( + "minecraft:ruin/big_brick_8", + "minecraft:underwater_ruin/big_brick_8", + ), + ( + "minecraft:ruin/big_mossy_1", + "minecraft:underwater_ruin/big_mossy_1", + ), + ( + "minecraft:ruin/big_mossy_2", + "minecraft:underwater_ruin/big_mossy_2", + ), + ( + "minecraft:ruin/big_mossy_3", + "minecraft:underwater_ruin/big_mossy_3", + ), + ( + "minecraft:ruin/big_mossy_8", + "minecraft:underwater_ruin/big_mossy_8", + ), + ( + "minecraft:ruin/big_cracked_1", + "minecraft:underwater_ruin/big_cracked_1", + ), + ( + "minecraft:ruin/big_cracked_2", + "minecraft:underwater_ruin/big_cracked_2", + ), + ( + "minecraft:ruin/big_cracked_3", + "minecraft:underwater_ruin/big_cracked_3", + ), + ( + "minecraft:ruin/big_cracked_8", + "minecraft:underwater_ruin/big_cracked_8", + ), + ( + "minecraft:ruin/big_warm_4", + "minecraft:underwater_ruin/big_warm_4", + ), + ( + "minecraft:ruin/big_warm_5", + "minecraft:underwater_ruin/big_warm_5", + ), + ( + "minecraft:ruin/big_warm_6", + "minecraft:underwater_ruin/big_warm_6", + ), + ( + "minecraft:ruin/big_warm_7", + "minecraft:underwater_ruin/big_warm_7", + ), + ], + ), ]; diff --git a/crates/horizon-world/src/datafix/schema_flat.rs b/crates/horizon-world/src/datafix/schema_flat.rs index 9688da48b..d08aa7d6a 100644 --- a/crates/horizon-world/src/datafix/schema_flat.rs +++ b/crates/horizon-world/src/datafix/schema_flat.rs @@ -45,7 +45,9 @@ impl Walker<'_> { }; match id.as_str() { "minecraft:area_effect_cloud" => self.field(Ty::Particle, v, "Particle"), - "minecraft:arrow" | "minecraft:spectral_arrow" => block(self, v, "inTile", "inBlockState"), + "minecraft:arrow" | "minecraft:spectral_arrow" => { + block(self, v, "inTile", "inBlockState") + } "minecraft:egg" | "minecraft:ender_pearl" | "minecraft:fireball" @@ -95,7 +97,9 @@ impl Walker<'_> { block(self, v, "Block", "BlockState"); self.field(Ty::BlockEntity, v, "TileEntityData"); } - "minecraft:fireworks_rocket" if !renamed => self.field(Ty::ItemStack, v, "FireworksItem"), + "minecraft:fireworks_rocket" if !renamed => { + self.field(Ty::ItemStack, v, "FireworksItem") + } "minecraft:firework_rocket" if renamed => self.field(Ty::ItemStack, v, "FireworksItem"), "minecraft:item" | "minecraft:item_frame" => self.field(Ty::ItemStack, v, "Item"), "minecraft:horse" => { diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java index f1c5f92e9..b0c52a6df 100644 --- a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java @@ -21,6 +21,8 @@ import net.minecraft.server.Bootstrap; import net.minecraft.server.level.ChunkMap; import net.minecraft.util.datafix.DataFixTypes; import net.minecraft.util.datafix.DataFixers; +import net.minecraft.util.filefix.FileFix; +import net.minecraft.util.filefix.FileFixerUpper; import net.minecraft.util.worldupdate.UpgradeProgress; import net.minecraft.world.level.ChunkPos; import net.minecraft.world.level.Level; @@ -123,6 +125,16 @@ public final class VanillaDataFixOracle { */ private static void band(Path out, int target) throws Exception { var fixer = DataFixers.getDataFixer(); + // The file fixes of the range (1493, LegacyStructureFileFix), as FileFixerUpper runs them + // (in place; the copy-on-write view and the level.dat rewrite are not what is checked). + var fileFixes = FileFixerUpper.class.getDeclaredField("fileFixes"); + fileFixes.setAccessible(true); + for (Object o : (List) fileFixes.get(DataFixers.getFileFixer())) { + FileFix fileFix = (FileFix) o; + if (fileFix.getVersion() <= target) { + fileFix.runFixOperations(out, new UpgradeProgress()); + } + } Path levelFile = out.resolve("level.dat"); if (Files.exists(levelFile)) { CompoundTag root = NbtIo.readCompressed(levelFile, NbtAccounter.unlimitedHeap()); diff --git a/tools/gen_flat_tables.py b/tools/gen_flat_tables.py index 5feb93463..909c23980 100644 --- a/tools/gen_flat_tables.py +++ b/tools/gen_flat_tables.py @@ -7,6 +7,7 @@ data. Run from the repository root; the vanilla sources are the ones under .loc """ import argparse import re +import subprocess import sys from pathlib import Path @@ -137,6 +138,7 @@ def main(): structure_renames(), ] Path(args.out).write_text('\n\n'.join(parts) + '\n') + subprocess.run(['rustfmt', '--edition', '2024', args.out], check=True) print('wrote', args.out) From 26462a168b90806aa5730563431a7c3a4c91b175 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:36:05 +0200 Subject: [PATCH 11/25] Datafix worlds: 1.15.2 and 1.16.1; scene entries by save format --- tools/datafix_scene.py | 2 +- tools/datafix_scene_old.py | 80 ++++++++++++++++++-------------------- tools/datafix_worlds.py | 2 +- 3 files changed, 40 insertions(+), 44 deletions(-) diff --git a/tools/datafix_scene.py b/tools/datafix_scene.py index 2afac5fcc..9b9a1611c 100644 --- a/tools/datafix_scene.py +++ b/tools/datafix_scene.py @@ -318,7 +318,7 @@ def entities(e, version): ] since = {'allay': 3105, 'chest_boat': 3105, 'text_display': 3325, 'item_display': 3325, 'goat': 2700} out = [(k, x) for k, x in out if version >= since.get(k, 0)] - if version < 2586: # 1.13.2 to 1.15: entities in the formats those versions write + if version < 2514: # 1.13.2 to 1.15: entities in the formats those versions write import datafix_scene_old out += datafix_scene_old.entities(version) if version < 3086: # cats before 1.19 have a numeric CatType diff --git a/tools/datafix_scene_old.py b/tools/datafix_scene_old.py index 8cc310540..9e764be53 100644 --- a/tools/datafix_scene_old.py +++ b/tools/datafix_scene_old.py @@ -33,51 +33,47 @@ ENTITIES = [ (1900, 2100, 'cat', 'CatType:3,CollarColor:5b'), (1900, 2100, 'pillager', 'Inventory:[{id:"minecraft:arrow",Count:2b}]'), (1900, 2100, 'fox', 'Type:"red",TrustedUUIDs:[{M:3L,L:4L}]'), - (1631, 2586, 'wolf', 'Owner:"%s",OwnerUUID:"%s",CollarColor:3b,Health:15.0f' % ('Steve', U1)), - (1631, 2586, 'horse', 'Tame:1b,OwnerUUID:"%s",SaddleItem:{id:"minecraft:saddle",Count:1b},' + (1631, 2514, 'wolf', 'Owner:"%s",OwnerUUID:"%s",CollarColor:3b,Health:15.0f' % ('Steve', U1)), + (1631, 2514, 'horse', 'Tame:1b,OwnerUUID:"%s",SaddleItem:{id:"minecraft:saddle",Count:1b},' 'ArmorItem:{id:"minecraft:iron_horse_armor",Count:1b},Attributes:%s' % (U2, MODIFIERS)), - (1631, 2586, 'armor_stand', 'Attributes:%s' % MODIFIERS), - (1631, 2586, 'cow', 'Leash:{UUIDMost:7L,UUIDLeast:8L}'), - (1631, 2586, 'zombie_pigman', 'Anger:100s,HurtBy:"%s"' % U1), - (1631, 2586, 'item', 'Item:{id:"minecraft:diamond",Count:3b},Owner:{M:9L,L:10L},Thrower:{M:11L,L:12L}'), - (1631, 2586, 'area_effect_cloud', 'OwnerUUIDMost:13L,OwnerUUIDLeast:14L,Particle:"entity_effect",Radius:2.0f,Duration:600'), - (1631, 2586, 'arrow', 'OwnerUUIDMost:15L,OwnerUUIDLeast:16L,inGround:1b'), - (1631, 2586, 'trident', 'OwnerUUIDMost:17L,OwnerUUIDLeast:18L,Trident:{id:"minecraft:trident",Count:1b}'), - (1631, 2586, 'potion', 'Potion:{id:"minecraft:splash_potion",Count:1b,tag:{Potion:"minecraft:swiftness"}},owner:{M:19L,L:20L}'), - (1631, 2586, 'snowball', 'owner:{M:21L,L:22L}'), - (1631, 2586, 'egg', 'owner:{M:23L,L:24L}'), - (1631, 2586, 'ender_pearl', 'owner:{M:25L,L:26L}'), - (1631, 2586, 'experience_bottle', 'owner:{M:27L,L:28L}'), - (1631, 2586, 'llama_spit', 'Owner:{OwnerUUIDMost:29L,OwnerUUIDLeast:30L}'), - (1631, 2586, 'shulker_bullet', 'Owner:{M:31L,L:32L},Target:{M:33L,L:34L}'), - (1631, 2586, 'evoker_fangs', 'OwnerUUIDMost:35L,OwnerUUIDLeast:36L'), - (1631, 2586, 'shulker', 'Rotation:[40.0f,0.0f],Peek:0b'), - (1631, 2586, 'bat', ''), - (2100, 2586, 'bee', 'HurtBy:"%s",HasNectar:1b,Anger:50' % U1), - (2100, 2586, 'villager', 'VillagerData:{profession:"minecraft:farmer",level:2,type:"minecraft:plains"},Xp:20,' + (1631, 2514, 'armor_stand', 'Attributes:%s' % MODIFIERS), + (1631, 2514, 'cow', 'Leash:{UUIDMost:7L,UUIDLeast:8L}'), + (1631, 2509, 'zombie_pigman', 'Anger:100s,HurtBy:"%s"' % U1), + (1631, 2514, 'item', 'Item:{id:"minecraft:diamond",Count:3b},Owner:{M:9L,L:10L},Thrower:{M:11L,L:12L}'), + (1631, 2514, 'area_effect_cloud', 'OwnerUUIDMost:13L,OwnerUUIDLeast:14L,Particle:"entity_effect",Radius:2.0f,Duration:600'), + (1631, 2514, 'arrow', 'OwnerUUIDMost:15L,OwnerUUIDLeast:16L,inGround:1b'), + (1631, 2514, 'trident', 'OwnerUUIDMost:17L,OwnerUUIDLeast:18L,Trident:{id:"minecraft:trident",Count:1b}'), + (1631, 2514, 'potion', 'Potion:{id:"minecraft:splash_potion",Count:1b,tag:{Potion:"minecraft:swiftness"}},owner:{M:19L,L:20L}'), + (1631, 2514, 'snowball', 'owner:{M:21L,L:22L}'), + (1631, 2514, 'egg', 'owner:{M:23L,L:24L}'), + (1631, 2514, 'ender_pearl', 'owner:{M:25L,L:26L}'), + (1631, 2514, 'experience_bottle', 'owner:{M:27L,L:28L}'), + (1631, 2514, 'llama_spit', 'Owner:{OwnerUUIDMost:29L,OwnerUUIDLeast:30L}'), + (1631, 2514, 'shulker_bullet', 'Owner:{M:31L,L:32L},Target:{M:33L,L:34L}'), + (1631, 2514, 'evoker_fangs', 'OwnerUUIDMost:35L,OwnerUUIDLeast:36L'), + (1631, 2514, 'shulker', 'Rotation:[40.0f,0.0f],Peek:0b'), + (1631, 2514, 'bat', ''), + (2100, 2514, "bee", 'HurtBy:"%s",HasNectar:1b,Anger:50' % U1), + (2100, 2514, 'villager', 'VillagerData:{profession:"minecraft:farmer",level:2,type:"minecraft:plains"},Xp:20,' 'Brain:{memories:{"minecraft:job_site":{pos:[I;1,2,3],dimension:"minecraft:overworld"}}}'), - (2500, 2586, 'piglin', 'IsBaby:0b,Brain:{memories:{"minecraft:angry_at":"%s"}}' % U1), - (2500, 2586, 'strider', 'NoGravity:1b,Saddle:1b'), - (2500, 2586, 'zombified_piglin', 'HurtBy:"%s",Anger:60' % U2), - (2500, 2586, 'hoglin', 'IsImmuneToZombification:1b'), ] # (since, until, block, nbt) BLOCK_ENTITIES = [ - (1631, 2586, 'white_banner', '{CustomName:\'{"translate":"block.minecraft.illager_banner","color":"gold"}\',' + (1631, 2514, 'white_banner', '{CustomName:\'{"translate":"block.minecraft.illager_banner","color":"gold"}\',' 'Patterns:[{Pattern:"cre",Color:15}]}'), - (1631, 2586, 'chest', '{LootTable:"minecraft:chests/village_blacksmith"}'), - (1631, 2586, 'furnace', '{BurnTime:100s,CookTime:20s,CookTimeTotal:200s,RecipesUsedSize:2,RecipeLocation0:"minecraft:iron_ingot",' + (1631, 2514, 'chest', '{LootTable:"minecraft:chests/village_blacksmith"}'), + (1631, 2514, 'furnace', '{BurnTime:100s,CookTime:20s,CookTimeTotal:200s,RecipesUsedSize:2,RecipeLocation0:"minecraft:iron_ingot",' 'RecipeAmount0:3,RecipeLocation1:"minecraft:glass",RecipeAmount1:1}'), - (1631, 2586, 'blast_furnace', '{RecipesUsedSize:1,RecipeLocation0:"minecraft:iron_ingot",RecipeAmount0:2}') if False else None, - (1631, 2586, 'player_head', '{Owner:{Id:"%s",Name:"Notch"}}' % U1), - (1631, 2586, 'conduit', '{target_uuid:{M:5L,L:6L},Target:{M:5L,L:6L}}'), - (1631, 2586, 'oak_sign', '{Text1:\'{"text":"one"}\',Text2:\'{"text":"two"}\'}'), - (1900, 2586, 'jigsaw[facing=up]', '{attachement_type:"minecraft:bottom",target_pool:"minecraft:village/plains/houses",' + (1631, 2514, 'blast_furnace', '{RecipesUsedSize:1,RecipeLocation0:"minecraft:iron_ingot",RecipeAmount0:2}') if False else None, + (1631, 2514, 'player_head', '{Owner:{Id:"%s",Name:"Notch"}}' % U1), + (1631, 2514, 'conduit', '{target_uuid:{M:5L,L:6L},Target:{M:5L,L:6L}}'), + (1631, 2514, 'oak_sign', '{Text1:\'{"text":"one"}\',Text2:\'{"text":"two"}\'}'), + (1900, 2514, 'jigsaw[facing=up]', '{attachement_type:"minecraft:bottom",target_pool:"minecraft:village/plains/houses",' 'final_state:"minecraft:air"}'), - (1900, 2586, 'jigsaw[facing=east]', '{attachement_type:"minecraft:empty",target_pool:"minecraft:empty"}'), - (1900, 2586, 'lectern', '{Book:{id:"minecraft:written_book",Count:1b,tag:{title:"L",author:"A",pages:[\'"x"\']}},Page:0}'), - (2100, 2586, 'beehive', '{Bees:[{EntityData:{id:"minecraft:bee"},TicksInHive:3,MinOccupationTicks:600}]}'), + (1900, 2514, 'jigsaw[facing=east]', '{attachement_type:"minecraft:empty",target_pool:"minecraft:empty"}'), + (1900, 2514, 'lectern', '{Book:{id:"minecraft:written_book",Count:1b,tag:{title:"L",author:"A",pages:[\'"x"\']}},Page:0}'), + (2100, 2514, "bee"ive', '{Bees:[{EntityData:{id:"minecraft:bee"},TicksInHive:3,MinOccupationTicks:600}]}'), ] BLOCK_ENTITIES = [b for b in BLOCK_ENTITIES if b] @@ -95,14 +91,14 @@ BLOCKS = [ BLOCKS = [b for b in BLOCKS if b] ITEMS = [ - (1631, 2586, '{id:"minecraft:white_banner",Count:1b,tag:{display:{Name:\'{"translate":"block.minecraft.illager_banner","color":"gold"}\',' + (1631, 2514, '{id:"minecraft:white_banner",Count:1b,tag:{display:{Name:\'{"translate":"block.minecraft.illager_banner","color":"gold"}\',' 'Lore:[\'first\',\'{"text":"second"}\']},BlockEntityTag:{Patterns:[{Pattern:"cre",Color:15}]}}}'), - (1631, 2586, '{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:{Id:"%s",Name:"Notch"}}}' % U2), - (1631, 2586, '{id:"minecraft:diamond_sword",Count:1b,tag:{AttributeModifiers:[{AttributeName:"generic.attackDamage",Name:"x",Amount:2.5d,' + (1631, 2514, '{id:"minecraft:player_head",Count:1b,tag:{SkullOwner:{Id:"%s",Name:"Notch"}}}' % U2), + (1631, 2514, '{id:"minecraft:diamond_sword",Count:1b,tag:{AttributeModifiers:[{AttributeName:"generic.attackDamage",Name:"x",Amount:2.5d,' 'Operation:0,UUIDMost:41L,UUIDLeast:42L,Slot:"mainhand"}]}}'), - (1631, 2586, '{id:"minecraft:filled_map",Count:1b,tag:{map:0}}'), - (1631, 2586, '{id:"minecraft:cactus_green",Count:1b}') if False else None, - (1631, 2586, '{id:"minecraft:stone_slab",Count:2b}') if False else None, + (1631, 2514, '{id:"minecraft:filled_map",Count:1b,tag:{map:0}}'), + (1631, 2514, '{id:"minecraft:cactus_green",Count:1b}') if False else None, + (1631, 2514, '{id:"minecraft:stone_slab",Count:2b}') if False else None, ] ITEMS = [i for i in ITEMS if i] diff --git a/tools/datafix_worlds.py b/tools/datafix_worlds.py index 8b3533e3e..35dccd5d3 100644 --- a/tools/datafix_worlds.py +++ b/tools/datafix_worlds.py @@ -37,7 +37,7 @@ LOCAL = ROOT / '.local' / 'datafix' # Old server jars and their worlds are inputs, not outputs: keep them beside the # vanilla data, which parallel worktrees share (.local/minecraft links there). SHARED = (ROOT / '.local' / 'minecraft').resolve().parent / 'datafix' -VERSIONS = ['1.12.2', '1.13.2', '1.14.4', '1.16.5', '1.17.1', '1.18.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4', '1.20.5', '1.20.6', '1.21.1', +VERSIONS = ['1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.1', '1.16.5', '1.17.1', '1.18.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4', '1.20.5', '1.20.6', '1.21.1', '1.21.3', '1.21.4', '1.21.5', '1.21.6', '1.21.8', '1.21.9', '1.21.10', '1.21.11', '26.1', '26.1.2', '26.2'] MANIFEST = 'https://piston-meta.mojang.com/mc/game/version_manifest_v2.json' LOCK = json.loads((ROOT / 'research-lock.json').read_text())['java_runtimes'] From 951b43daac638357d4e4328ea420a281c579e2ed Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:46:45 +0200 Subject: [PATCH 12/25] Datafix worlds: world type variants for the level.dat generator settings --- tools/datafix_scene_old.py | 4 +-- tools/datafix_worlds.py | 57 ++++++++++++++++++++++++------------ tools/test_datafix_parity.py | 2 +- 3 files changed, 41 insertions(+), 22 deletions(-) diff --git a/tools/datafix_scene_old.py b/tools/datafix_scene_old.py index 9e764be53..fe670c50d 100644 --- a/tools/datafix_scene_old.py +++ b/tools/datafix_scene_old.py @@ -53,7 +53,7 @@ ENTITIES = [ (1631, 2514, 'evoker_fangs', 'OwnerUUIDMost:35L,OwnerUUIDLeast:36L'), (1631, 2514, 'shulker', 'Rotation:[40.0f,0.0f],Peek:0b'), (1631, 2514, 'bat', ''), - (2100, 2514, "bee", 'HurtBy:"%s",HasNectar:1b,Anger:50' % U1), + (2100, 2514, 'bee', 'HurtBy:"%s",HasNectar:1b,Anger:50' % U1), (2100, 2514, 'villager', 'VillagerData:{profession:"minecraft:farmer",level:2,type:"minecraft:plains"},Xp:20,' 'Brain:{memories:{"minecraft:job_site":{pos:[I;1,2,3],dimension:"minecraft:overworld"}}}'), ] @@ -73,7 +73,7 @@ BLOCK_ENTITIES = [ 'final_state:"minecraft:air"}'), (1900, 2514, 'jigsaw[facing=east]', '{attachement_type:"minecraft:empty",target_pool:"minecraft:empty"}'), (1900, 2514, 'lectern', '{Book:{id:"minecraft:written_book",Count:1b,tag:{title:"L",author:"A",pages:[\'"x"\']}},Page:0}'), - (2100, 2514, "bee"ive', '{Bees:[{EntityData:{id:"minecraft:bee"},TicksInHive:3,MinOccupationTicks:600}]}'), + (2100, 2514, 'beehive', '{Bees:[{EntityData:{id:"minecraft:bee"},TicksInHive:3,MinOccupationTicks:600}]}'), ] BLOCK_ENTITIES = [b for b in BLOCK_ENTITIES if b] diff --git a/tools/datafix_worlds.py b/tools/datafix_worlds.py index 35dccd5d3..7878065e2 100644 --- a/tools/datafix_worlds.py +++ b/tools/datafix_worlds.py @@ -39,6 +39,21 @@ LOCAL = ROOT / '.local' / 'datafix' SHARED = (ROOT / '.local' / 'minecraft').resolve().parent / 'datafix' VERSIONS = ['1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.1', '1.16.5', '1.17.1', '1.18.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4', '1.20.5', '1.20.6', '1.21.1', '1.21.3', '1.21.4', '1.21.5', '1.21.6', '1.21.8', '1.21.9', '1.21.10', '1.21.11', '26.1', '26.1.2', '26.2'] +# Extra worlds of one version with another world type, for the level.dat generator settings: +# name -> (version, server.properties). They get no scene, only a joined player. +VARIANTS = { + '1.13.2-flat': ('1.13.2', {'level-type': 'flat', 'generator-settings': + '3;minecraft:bedrock,2*minecraft:dirt,minecraft:grass_block;1;village,oceanmonument,mansion(distance=30)'}), + '1.14.4-flat': ('1.14.4', {'level-type': 'flat', 'generator-settings': + '3;minecraft:bedrock,3*minecraft:stone,minecraft:grass_block;2;stronghold(distance=20 count=5),village(distance=12),' + 'oceanmonument(spacing=10 separation=4)'}), + '1.14.4-largebiomes': ('1.14.4', {'level-type': 'largebiomes'}), + '1.14.4-amplified': ('1.14.4', {'level-type': 'amplified'}), + '1.13.2-debug': ('1.13.2', {'level-type': 'debug_all_block_states'}), + '1.14.4-buffet': ('1.14.4', {'level-type': 'buffet', 'generator-settings': + '{"chunk_generator":{"type":"minecraft:surface"},"biome_source":{"type":"minecraft:fixed","options":' + '{"biomes":["minecraft:desert"]}}}'}), +} MANIFEST = 'https://piston-meta.mojang.com/mc/game/version_manifest_v2.json' LOCK = json.loads((ROOT / 'research-lock.json').read_text())['java_runtimes'] BOT = 'Upgrader' @@ -136,7 +151,7 @@ def install_runtime(pin, home): class Server: - def __init__(self, directory, jar, port, packs=(), java='java'): + def __init__(self, directory, jar, port, packs=(), java='java', props_override=None): directory.mkdir(parents=True, exist_ok=True) (directory / 'eula.txt').write_text('eula=true\n') props = {'server-port': port, 'online-mode': 'false', 'level-name': 'world', 'level-seed': '4242', @@ -144,6 +159,7 @@ class Server: 'enable-rcon': 'false', 'enable-query': 'false', 'max-tick-time': '-1'} if packs: props['initial-enabled-packs'] = ','.join(['vanilla', *packs]) + props.update(props_override or {}) (directory / 'server.properties').write_text(''.join(f'{k}={v}\n' for k, v in props.items())) self.process = subprocess.Popen([java, '-Xmx2G', '-jar', str(jar), 'nogui'], cwd=directory, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) @@ -355,17 +371,18 @@ def uuid_fields(data_version, i): return f'UUIDMost:{UUID_BASE << 32}L,UUIDLeast:{i + 1}L' -def build(version, force=False): +def build(name, force=False): + version, props = VARIANTS.get(name, (name, None)) jar, data_version, protocol = server_jar(version) - target = SHARED / 'worlds' / version + target = SHARED / 'worlds' / name if target.exists() and not force: print(f'{version}: kept {target}') return [] era = scene.era(data_version) - work = LOCAL / 'gen' / version + work = LOCAL / 'gen' / name shutil.rmtree(work, ignore_errors=True) port = 30000 + (os.getpid() + data_version) % 20000 - server = Server(work, jar, port, scene.experiments(data_version), java(version)) + server = Server(work, jar, port, scene.experiments(data_version), java(version), props) problems = [] def run(command): @@ -375,19 +392,21 @@ def build(version, force=False): problems.append((command[:160], bad[:2])) return out - run('forceload add -48 -48 79 79') - run('fill 0 99 0 47 99 47 minecraft:stone') - run('fill 0 100 0 47 112 47 minecraft:air') - for i, (block, nbt) in enumerate(scene.block_entities(era, data_version)): - x, z = 1 + 3 * (i % 15), 1 + 3 * (i // 15) - run(f'setblock {x} 100 {z} minecraft:{block}{nbt}') - for i, (kind, extra) in enumerate(scene.entities(era, data_version)): - x, z = 1.5 + 3 * (i % 15), 25.5 + 3 * (i // 15) - fields = f'{uuid_fields(data_version, i)},NoAI:1b,Silent:1b,NoGravity:1b,Invulnerable:1b,PersistenceRequired:1b' - run(f'summon minecraft:{kind} {x} 100 {z} {{{fields}' + (',' + extra if extra else '') + '}') - for i, block in enumerate(scene.blocks(data_version)): - run(f'setblock {1 + 3 * (i % 15)} 100 {19 + 3 * (i // 15)} minecraft:{block}') - run('setworldspawn 20 101 20') + if not props: # variants only differ in their world type + run('forceload add -48 -48 79 79') + run('fill 0 99 0 47 99 47 minecraft:stone') + run('fill 0 100 0 47 112 47 minecraft:air') + for i, (block, nbt) in enumerate(scene.block_entities(era, data_version)): + x, z = 1 + 3 * (i % 15), 1 + 3 * (i // 15) + run(f'setblock {x} 100 {z} minecraft:{block}{nbt}') + for i, (kind, extra) in enumerate(scene.entities(era, data_version)): + x, z = 1.5 + 3 * (i % 15), 25.5 + 3 * (i // 15) + fields = f'{uuid_fields(data_version, i)},NoAI:1b,Silent:1b,NoGravity:1b,Invulnerable:1b,PersistenceRequired:1b' + run(f'summon minecraft:{kind} {x} 100 {z} {{{fields}' + (',' + extra if extra else '') + '}') + for i, block in enumerate(scene.blocks(data_version)): + run(f'setblock {1 + 3 * (i % 15)} 100 {19 + 3 * (i // 15)} minecraft:{block}') + if not props: + run('setworldspawn 20 101 20') bot = Bot(port, protocol, BOT) time.sleep(3) for command in scene.player_commands(era, BOT, data_version): @@ -418,7 +437,7 @@ def main(): p.add_argument('versions', nargs='*') p.add_argument('--force', action='store_true') args = p.parse_args() - for version in args.versions or VERSIONS: + for version in args.versions or [*VERSIONS, *VARIANTS]: build(version, args.force) diff --git a/tools/test_datafix_parity.py b/tools/test_datafix_parity.py index 471fccaea..a07bf5557 100644 --- a/tools/test_datafix_parity.py +++ b/tools/test_datafix_parity.py @@ -214,7 +214,7 @@ def main(): WORLDS.parent.mkdir(parents=True, exist_ok=True) with open(WORLDS.parent / 'generate.lock', 'w') as lock: fcntl.flock(lock, fcntl.LOCK_EX) # another worktree may be generating them - missing = [v for v in datafix_worlds.VERSIONS if not (WORLDS / v / 'level.dat').exists()] + missing = [v for v in [*datafix_worlds.VERSIONS, *datafix_worlds.VARIANTS] if not (WORLDS / v / 'level.dat').exists()] if missing: print('generating sample worlds:', ' '.join(missing), flush=True) subprocess.run([sys.executable, str(ROOT / 'tools' / 'datafix_worlds.py'), *missing], cwd=ROOT, check=True) From 67caf1d2ab2345256b0c2667b6093ee464ea5e6b Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:54:43 +0200 Subject: [PATCH 13/25] Datafix scene: boss bar, scoreboard, team and a trip to the nether and the end for worlds before 1.17 --- tools/datafix_scene.py | 20 ++++++++++++++++++++ tools/datafix_worlds.py | 3 +++ 2 files changed, 23 insertions(+) diff --git a/tools/datafix_scene.py b/tools/datafix_scene.py index 9b9a1611c..7f62510bc 100644 --- a/tools/datafix_scene.py +++ b/tools/datafix_scene.py @@ -372,6 +372,26 @@ def entities(e, version): return out +def world_commands(version): + """(command, seconds to wait) for the scoreboard, a boss bar and a trip through the other + dimensions, before 1.17: what makes level.dat, the scoreboard and the other dimension folders carry data.""" + if version >= 2586: + return [] + return [ + ('bossbar add upgrade:boss {"text":"Boss"}', 0), + ('bossbar set upgrade:boss players @a', 0), + ('scoreboard objectives add kills dummy {"text":"Kills"}', 0), + ('scoreboard objectives add zombies minecraft.killed:minecraft.zombie', 0), + ('scoreboard players set Upgrader kills 3', 0), + ('team add red {"text":"Red"}', 0), + ('team modify red prefix {"text":"[R]"}', 0), + ('team join red Upgrader', 0), + ('advancement grant @a only minecraft:story/root', 0), + ('execute in minecraft:the_end run tp Upgrader 100 60 0', 20), + ('execute in minecraft:the_nether run tp Upgrader 0 80 0', 15), + ] + + def blocks(version): """Plain blocks whose states changed over the versions.""" if version < 2586: diff --git a/tools/datafix_worlds.py b/tools/datafix_worlds.py index 7878065e2..a64e42440 100644 --- a/tools/datafix_worlds.py +++ b/tools/datafix_worlds.py @@ -412,6 +412,9 @@ def build(name, force=False): for command in scene.player_commands(era, BOT, data_version): run(command) time.sleep(3) + for command, wait in ([] if props else scene.world_commands(data_version)): + run(command) + time.sleep(wait) run('save-all flush') time.sleep(2) bot.leave() From 955f2be4ae6f28bd57a7c90ac61e011654c66669 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 01:26:43 +0200 Subject: [PATCH 14/25] Flattening fixes: numeric block names normalised by the chunk rewrite, unknown entities stay untyped, spawn egg default; band harness also upgrades the old saved data Co-Authored-By: Claude Sonnet 5.5 --- crates/horizon-world/src/datafix/files.rs | 23 +++ .../horizon-world/src/datafix/fixes_flat.rs | 22 ++- .../horizon-world/src/datafix/flat_tables.rs | 87 ++++++++++++ crates/horizon-world/src/datafix/schema.rs | 2 +- .../horizon-world/src/datafix/schema_flat.rs | 133 ++++++++++++++++++ .../parity/VanillaDataFixOracle.java | 11 ++ tools/gen_flat_tables.py | 13 ++ 7 files changed, 284 insertions(+), 7 deletions(-) diff --git a/crates/horizon-world/src/datafix/files.rs b/crates/horizon-world/src/datafix/files.rs index fb0935806..5125fe1d2 100644 --- a/crates/horizon-world/src/datafix/files.rs +++ b/crates/horizon-world/src/datafix/files.rs @@ -860,6 +860,29 @@ pub fn upgrade_band(base: &Path, target: i32) -> io::Result<()> { upgrade_json_to(&file, ty, target)?; } } + // The saved data of the old layout. + for file in files_with_suffix(&base.join("data"), ".dat") { + let name = file + .file_stem() + .map(|n| n.to_string_lossy().into_owned()) + .unwrap_or_default(); + let ty = match name.as_str() { + "scoreboard" => Ty::SavedScoreboard, + n if n + .strip_prefix("map_") + .is_some_and(|d| !d.is_empty() && d.bytes().all(|b| b.is_ascii_digit())) => + { + Ty::SavedMapData + } + _ => continue, + }; + if let Some(mut tag) = read_dat(&file)? { + let from = data_version(&tag, 1343); + update(ty, &mut tag, from, target); + set(&mut tag, "DataVersion", Tag::Int(target)); + write_dat(&file, &tag)?; + } + } Ok(()) } diff --git a/crates/horizon-world/src/datafix/fixes_flat.rs b/crates/horizon-world/src/datafix/fixes_flat.rs index c55a628ea..0b806df99 100644 --- a/crates/horizon-world/src/datafix/fixes_flat.rs +++ b/crates/horizon-world/src/datafix/fixes_flat.rs @@ -295,6 +295,13 @@ fn text_json_units(text: &JavaString) -> Tag { fn chunk_palettes(cx: &mut Cx) { let k = cx.k; + // The chunk is written with the old type and read with the new one: the numeric + // block names (`DSL.intType()`) come out as ints, whatever tag they were. + cx.each(Ty::BlockName, |v| { + if let Some(n) = as_number(v) { + *v = Tag::Int(n.int_value()); + } + }); cx.each(Ty::Chunk, |c| { super::chunk_flatten::fix(c); reread_as(Ty::Chunk, k, c); @@ -483,18 +490,21 @@ fn remove_block_entity_tags(cx: &mut Cx) { } fn spawn_eggs(cx: &mut Cx) { + let input = cx.k - 1; cx.item( |id| id == "minecraft:spawn_egg", |s| { + // `getOrCreateTyped`: an EntityTag that is missing, or does not read as an entity + // of the schema, is a default entity of it (the first of its table: a wither). let entity_id = s .get("tag") .and_then(|t| t.get("EntityTag")) - .and_then(|e| as_str(e.get("id"))); - if let Some(entity_id) = entity_id { - let egg = lookup(t::SPAWN_EGGS, &namespaced(&entity_id)) - .unwrap_or("minecraft:pig_spawn_egg"); - set(s, "id", string(egg)); - } + .and_then(|e| as_str(e.get("id"))) + .map(|id| namespaced(&id)) + .filter(|id| super::schema::flat::legacy_entity_known(id, input)) + .unwrap_or_else(|| "minecraft:wither".to_owned()); + let egg = lookup(t::SPAWN_EGGS, &entity_id).unwrap_or("minecraft:pig_spawn_egg"); + set(s, "id", string(egg)); }, ); } diff --git a/crates/horizon-world/src/datafix/flat_tables.rs b/crates/horizon-world/src/datafix/flat_tables.rs index 5fcd442bb..c01253e24 100644 --- a/crates/horizon-world/src/datafix/flat_tables.rs +++ b/crates/horizon-world/src/datafix/flat_tables.rs @@ -1984,6 +1984,93 @@ pub static COD_SALMON_EGGS: &[(&str, &str)] = &[ ("minecraft:cod_mob_spawn_egg", "minecraft:cod_spawn_egg"), ]; +/// The entity ids V1460 registers (V705 has the same ones). +pub static ENTITIES_V1460: &[&str] = &[ + "minecraft:area_effect_cloud", + "minecraft:armor_stand", + "minecraft:arrow", + "minecraft:bat", + "minecraft:blaze", + "minecraft:boat", + "minecraft:cave_spider", + "minecraft:chest_minecart", + "minecraft:chicken", + "minecraft:commandblock_minecart", + "minecraft:cow", + "minecraft:creeper", + "minecraft:donkey", + "minecraft:dragon_fireball", + "minecraft:egg", + "minecraft:elder_guardian", + "minecraft:ender_crystal", + "minecraft:ender_dragon", + "minecraft:ender_pearl", + "minecraft:enderman", + "minecraft:endermite", + "minecraft:evocation_fangs", + "minecraft:evocation_illager", + "minecraft:eye_of_ender_signal", + "minecraft:falling_block", + "minecraft:fireball", + "minecraft:fireworks_rocket", + "minecraft:furnace_minecart", + "minecraft:ghast", + "minecraft:giant", + "minecraft:guardian", + "minecraft:hopper_minecart", + "minecraft:horse", + "minecraft:husk", + "minecraft:illusion_illager", + "minecraft:item", + "minecraft:item_frame", + "minecraft:leash_knot", + "minecraft:llama", + "minecraft:llama_spit", + "minecraft:magma_cube", + "minecraft:minecart", + "minecraft:mooshroom", + "minecraft:mule", + "minecraft:ocelot", + "minecraft:painting", + "minecraft:parrot", + "minecraft:pig", + "minecraft:polar_bear", + "minecraft:potion", + "minecraft:rabbit", + "minecraft:sheep", + "minecraft:shulker", + "minecraft:shulker_bullet", + "minecraft:silverfish", + "minecraft:skeleton", + "minecraft:skeleton_horse", + "minecraft:slime", + "minecraft:small_fireball", + "minecraft:snowball", + "minecraft:snowman", + "minecraft:spawner_minecart", + "minecraft:spectral_arrow", + "minecraft:spider", + "minecraft:squid", + "minecraft:stray", + "minecraft:tnt", + "minecraft:tnt_minecart", + "minecraft:vex", + "minecraft:villager", + "minecraft:villager_golem", + "minecraft:vindication_illager", + "minecraft:witch", + "minecraft:wither", + "minecraft:wither_skeleton", + "minecraft:wither_skull", + "minecraft:wolf", + "minecraft:xp_bottle", + "minecraft:xp_orb", + "minecraft:zombie", + "minecraft:zombie_horse", + "minecraft:zombie_pigman", + "minecraft:zombie_villager", +]; + /// `ChunkStructuresTemplateRenameFix.RENAMES`: structure id, child id, template renames. pub static STRUCTURE_TEMPLATE_RENAMES: &[(&str, &str, &[(&str, &str)])] = &[ ( diff --git a/crates/horizon-world/src/datafix/schema.rs b/crates/horizon-world/src/datafix/schema.rs index 209f4386d..f3c4160f4 100644 --- a/crates/horizon-world/src/datafix/schema.rs +++ b/crates/horizon-world/src/datafix/schema.rs @@ -9,7 +9,7 @@ use super::dynamic::{as_str, namespaced}; use crate::nbt::Tag; #[path = "schema_flat.rs"] -mod flat; +pub(super) mod flat; #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] pub enum Ty { diff --git a/crates/horizon-world/src/datafix/schema_flat.rs b/crates/horizon-world/src/datafix/schema_flat.rs index d08aa7d6a..d2f34b2ea 100644 --- a/crates/horizon-world/src/datafix/schema_flat.rs +++ b/crates/horizon-world/src/datafix/schema_flat.rs @@ -3,6 +3,8 @@ //! shape differs from the general code of [`super`]; the other types fall through. use super::{Key, Ty, Walker, as_str, key, namespaced}; use crate::nbt::Tag; +use std::collections::HashSet; +use std::sync::OnceLock; /// The schemas below this key are described here. pub(super) const END: Key = key(1800, 0); @@ -16,6 +18,32 @@ impl Walker<'_> { self.legacy_entity(v); true } + // An entity of an unknown id does not read as a typed value: nothing in it is fixed. + Ty::EntityTree => { + let id = namespaced(&as_str(v.get("id")).unwrap_or_default()); + if legacy_entity_known(&id, k) { + if let Some(Tag::List(trees)) = v.get_mut("Passengers") + && trees.iter().all(|t| { + legacy_entity_known( + &namespaced(&as_str(t.get("id")).unwrap_or_default()), + k, + ) + }) + { + for tree in trees { + self.walk(Ty::EntityTree, tree); + } + } + self.walk(Ty::Entity, v); + } + true + } + Ty::Chunk => { + if let Some(level) = v.get_mut("Level") { + self.legacy_level_chunk(level); + } + true + } // STATS is a plain map until V1451_6 turns it into typed counters. Ty::Stats if k < key(1451, 6) => true, Ty::Objective if k < key(1451, 6) => { @@ -26,6 +54,41 @@ impl Walker<'_> { } } + /// The `Level` of a chunk (V99 to V1510). + fn legacy_level_chunk(&mut self, v: &mut Tag) { + let k = self.k; + // A list of entity trees reads only if every entity of it is known. + if let Some(Tag::List(trees)) = v.get_mut("Entities") + && trees.iter().all(|t| { + legacy_entity_known(&namespaced(&as_str(t.get("id")).unwrap_or_default()), k) + }) + { + for tree in trees { + self.walk(Ty::EntityTree, tree); + } + } + if let Some(Tag::List(items)) = v.get_mut("TileEntities") { + for be in items { + if super::block_entity_known(be, k) { + self.walk(Ty::BlockEntity, be); + } + } + } + self.list_of_field(Ty::BlockName, v, "TileTicks", "i"); + if k >= key(1451, 1) + && let Some(Tag::List(sections)) = v.get_mut("Sections") + { + for s in sections { + self.list(Ty::BlockState, s, "Palette"); + } + } + if k >= key(1466, 0) + && let Some(s) = v.get_mut("Structures") + { + self.values(Ty::StructureFeature, s, "Starts"); + } + } + /// `ENTITY` of the schemas V705 to V1510 (the ids are `minecraft:...` since V704). fn legacy_entity(&mut self, v: &mut Tag) { let k = self.k; @@ -168,3 +231,73 @@ pub(super) fn legacy_block_entity_known(id: &str, k: Key) -> bool { _ => false, } } + +/// Whether `id` is an entity registered by the schema at `k` (V705 to V1510). +pub(in crate::datafix) fn legacy_entity_known(id: &str, k: Key) -> bool { + static ERAS: OnceLock<[HashSet; 5]> = OnceLock::new(); + let eras = ERAS.get_or_init(|| { + let mut set: HashSet = crate::datafix::flat_tables::ENTITIES_V1460 + .iter() + .map(|s| (*s).to_owned()) + .collect(); + let rename = |set: &mut HashSet, from: &str, to: &str| { + if set.remove(from) { + set.insert(to.to_owned()); + } + }; + let base = set.clone(); + // V1470 + for id in [ + "turtle", + "cod_mob", + "tropical_fish", + "salmon_mob", + "puffer_fish", + "phantom", + "dolphin", + "drowned", + "trident", + ] { + set.insert(format!("minecraft:{id}")); + } + let v1470 = set.clone(); + rename(&mut set, "minecraft:puffer_fish", "minecraft:pufferfish"); + let v1483 = set.clone(); + rename(&mut set, "minecraft:cod_mob", "minecraft:cod"); + rename(&mut set, "minecraft:salmon_mob", "minecraft:salmon"); + let v1486 = set.clone(); + for (from, to) in [ + ("commandblock_minecart", "command_block_minecart"), + ("ender_crystal", "end_crystal"), + ("snowman", "snow_golem"), + ("evocation_illager", "evoker"), + ("evocation_fangs", "evoker_fangs"), + ("illusion_illager", "illusioner"), + ("vindication_illager", "vindicator"), + ("villager_golem", "iron_golem"), + ("xp_orb", "experience_orb"), + ("xp_bottle", "experience_bottle"), + ("eye_of_ender_signal", "eye_of_ender"), + ("fireworks_rocket", "firework_rocket"), + ] { + rename( + &mut set, + &format!("minecraft:{from}"), + &format!("minecraft:{to}"), + ); + } + [base, v1470, v1483, v1486, set] + }); + let era = if k < key(1470, 0) { + 0 + } else if k < key(1483, 0) { + 1 + } else if k < key(1486, 0) { + 2 + } else if k < key(1510, 0) { + 3 + } else { + 4 + }; + eras[era].contains(id) +} diff --git a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java index b0c52a6df..d8a0a235a 100644 --- a/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java +++ b/mods/horizon/src/test/java/dev/horizonlab/parity/VanillaDataFixOracle.java @@ -160,6 +160,17 @@ public final class VanillaDataFixOracle { } upgradeJson(out.resolve("advancements"), DataFixTypes.ADVANCEMENTS, true, target); upgradeJson(out.resolve("stats"), DataFixTypes.STATS, false, target); + // The saved data of the old layout (data/scoreboard.dat, data/map_N.dat). + for (Path file : list(out.resolve("data"), ".dat")) { + String name = file.getFileName().toString().replace(".dat", ""); + DataFixTypes type = name.equals("scoreboard") ? DataFixTypes.SAVED_DATA_SCOREBOARD + : name.matches("map_\\d+") ? DataFixTypes.SAVED_DATA_MAP_DATA : null; + if (type != null) { + CompoundTag tag = NbtIo.readCompressed(file, NbtAccounter.unlimitedHeap()); + tag = type.update(fixer, tag, NbtUtils.getDataVersion(tag, 1343), target); + NbtIo.writeCompressed(NbtUtils.addDataVersion(tag, target), file); + } + } } private static void upgradeJson(Path folder, DataFixTypes type, boolean removeVersion, int target) throws Exception { diff --git a/tools/gen_flat_tables.py b/tools/gen_flat_tables.py index 909c23980..d6ec61378 100644 --- a/tools/gen_flat_tables.py +++ b/tools/gen_flat_tables.py @@ -83,6 +83,17 @@ def emit_strs(name, entries, doc=''): return '\n'.join(lines) +def schema_entities(schema_file): + """The entity ids a schema's `registerEntities` registers.""" + text = (FIXES.parent / 'schemas' / schema_file).read_text() + start = text.index('registerEntities') + body = text[start:text.index('return map;', start)] + names = re.findall(r'(?:registerMob|registerSimple|registerThrowableProjectile)\(schema, map, "([^"]+)"', body) + names += re.findall(r'schema\.registerSimple\(map, "([^"]+)"', body) + names += re.findall(r'schema\.register\(\s*map,\s*"([^"]+)"', body) + return sorted(set(names)) + + def structure_renames(): text = (FIXES / 'ChunkStructuresTemplateRenameFix.java').read_text() out = [] @@ -135,6 +146,8 @@ def main(): emit_pairs('THE_RENAMENING_BLOCKS', pairs('EntityTheRenameningFix.java', 'RENAMED_BLOCKS')), emit_pairs('COD_SALMON', pairs('EntityCodSalmonFix.java', 'RENAMED_IDS')), emit_pairs('COD_SALMON_EGGS', pairs('EntityCodSalmonFix.java', 'RENAMED_EGG_IDS')), + emit_strs('ENTITIES_V1460', schema_entities('V1460.java'), + doc='The entity ids V1460 registers (V705 has the same ones).'), structure_renames(), ] Path(args.out).write_text('\n\n'.join(parts) + '\n') From 39cacbdf837c62dfd2a27f1721ff5069de939b54 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 01:59:37 +0200 Subject: [PATCH 15/25] Rich 1.12.2 sample world and a flat one for the DataFixer harness tools/datafix_scene_12.py builds it in 1.12 command syntax: the whole block id/data space, block entities, items, entities, player, scoreboard, advancements, maps and statistics (real ones from a bot, plus a few hand-written fixtures). Co-Authored-By: Claude Sonnet 5.5 --- tools/datafix_scene_12.py | 1733 +++++++++++++++++++++++++++++++++++++ tools/datafix_worlds.py | 44 +- 2 files changed, 1759 insertions(+), 18 deletions(-) create mode 100644 tools/datafix_scene_12.py diff --git a/tools/datafix_scene_12.py b/tools/datafix_scene_12.py new file mode 100644 index 000000000..7b76efc93 --- /dev/null +++ b/tools/datafix_scene_12.py @@ -0,0 +1,1733 @@ +"""The 1.12.2 scene for tools/datafix_worlds.py: a rich sample world for the DataFixers of +1.13 (DataVersion 1343 to 1631), written in the command syntax of 1.12. + +The scene is a set of 96 x 96 stone platforms ("layers", one per chunk section: y = 100, 116 .. 244) +above the spawn area. Every block family of the 1.12 id/data space sits on its own cells, one empty cell +between neighbours (so that no neighbour update rewrites a state), with the tile entities, items, +entities, player data, scoreboard, maps, advancements and statistics that the flattening touches. +States that the game recomputes at once (powered pistons, repeaters, fluids, hanging entities ...) are +placed in the very last tick, together with `save-all flush`, and the server is killed right after: the saved chunks keep them. + + populate(server, Bot, port, protocol, name, problems) -> runs everything, bot joined, returns the bot + +What a real server cannot produce is written by hand after the stop, see `fixtures()` (marked there). +""" +import json +import queue +import re +import shutil +import socket +import struct +import sys +import threading +import time +from pathlib import Path + +BX, BZ, SIZE = 144, 144, 96 # south-west corner and size of the platforms (inside the spawn chunks) +LAYERS = list(range(100, 245, 16)) # platform y levels: one chunk section each, the last one reaches y = 255 +UUID_HI = 0x6000 + +# ------------------------------------------------------------------ tables +# `id:name=data,ranges` of every 1.12 block state (from vanilla's BlockStateData), id = numeric block id. +BLOCKS = """ +0:air=0 1:stone=0-6 2:grass=0 3:dirt=0-2 4:cobblestone=0 5:planks=0-5 6:sapling=0-5,8-13 7:bedrock=0 +8:flowing_water=0-15 9:water=0-15 10:flowing_lava=0-15 11:lava=0-15 12:sand=0-1 13:gravel=0 14:gold_ore=0 +15:iron_ore=0 16:coal_ore=0 17:log=0-15 18:leaves=0-15 19:sponge=0-1 20:glass=0 21:lapis_ore=0 22:lapis_block=0 +23:dispenser=0-5,8-13 24:sandstone=0-2 25:noteblock=0 26:bed=0-3,8-15 27:golden_rail=0-5,8-13 +28:detector_rail=0-5,8-13 29:sticky_piston=0-5,8-13 30:web=0 31:tallgrass=0-2 32:deadbush=0 33:piston=0-5,8-13 +34:piston_head=0-5,8-13 35:wool=0-15 36:piston_extension=0-5,8-13 37:yellow_flower=0 38:red_flower=0-8 +39:brown_mushroom=0 40:red_mushroom=0 41:gold_block=0 42:iron_block=0 43:double_stone_slab=0-15 44:stone_slab=0-15 +45:brick_block=0 46:tnt=0-1 47:bookshelf=0 48:mossy_cobblestone=0 49:obsidian=0 50:torch=1-5 51:fire=0-15 +52:mob_spawner=0 53:oak_stairs=0-7 54:chest=2-5 55:redstone_wire=0-15 56:diamond_ore=0 57:diamond_block=0 +58:crafting_table=0 59:wheat=0-7 60:farmland=0-7 61:furnace=2-5 62:lit_furnace=2-5 63:standing_sign=0-15 +64:wooden_door=0-11 65:ladder=2-5 66:rail=0-9 67:stone_stairs=0-7 68:wall_sign=2-5 69:lever=0-15 +70:stone_pressure_plate=0-1 71:iron_door=0-11 72:wooden_pressure_plate=0-1 73:redstone_ore=0 74:lit_redstone_ore=0 +75:unlit_redstone_torch=1-5 76:redstone_torch=1-5 77:stone_button=0-5,8-13 78:snow_layer=0-7 79:ice=0 80:snow=0 +81:cactus=0-15 82:clay=0 83:reeds=0-15 84:jukebox=0-1 85:fence=0 86:pumpkin=0-3 87:netherrack=0 88:soul_sand=0 +89:glowstone=0 90:portal=1-2 91:lit_pumpkin=0-3 92:cake=0-6 93:unpowered_repeater=0-15 94:powered_repeater=0-15 +95:stained_glass=0-15 96:trapdoor=0-15 97:monster_egg=0-5 98:stonebrick=0-3 99:brown_mushroom_block=0-10,14-15 +100:red_mushroom_block=0-10,14-15 101:iron_bars=0 102:glass_pane=0 103:melon_block=0 104:pumpkin_stem=0-7 +105:melon_stem=0-7 106:vine=0-15 107:fence_gate=0-15 108:brick_stairs=0-7 109:stone_brick_stairs=0-7 110:mycelium=0 +111:waterlily=0 112:nether_brick=0 113:nether_brick_fence=0 114:nether_brick_stairs=0-7 115:nether_wart=0-3 +116:enchanting_table=0 117:brewing_stand=0-7 118:cauldron=0-3 119:end_portal=0 120:end_portal_frame=0-7 +121:end_stone=0 122:dragon_egg=0 123:redstone_lamp=0 124:lit_redstone_lamp=0 125:double_wooden_slab=0-5 +126:wooden_slab=0-5,8-13 127:cocoa=0-11 128:sandstone_stairs=0-7 129:emerald_ore=0 130:ender_chest=2-5 +131:tripwire_hook=0-15 132:tripwire=0-1,4-5,8-9,12-13 133:emerald_block=0 134:spruce_stairs=0-7 135:birch_stairs=0-7 +136:jungle_stairs=0-7 137:command_block=0-5,8-13 138:beacon=0 139:cobblestone_wall=0-1 140:flower_pot=0-15 +141:carrots=0-7 142:potatoes=0-7 143:wooden_button=0-5,8-13 144:skull=0-5,8-13 145:anvil=0-11 146:trapped_chest=2-5 +147:light_weighted_pressure_plate=0-15 148:heavy_weighted_pressure_plate=0-15 149:unpowered_comparator=0-15 +150:powered_comparator=0-15 151:daylight_detector=0-15 152:redstone_block=0 153:quartz_ore=0 154:hopper=0,2-5,8,10-13 +155:quartz_block=0-4 156:quartz_stairs=0-7 157:activator_rail=0-5,8-13 158:dropper=0-5,8-13 +159:stained_hardened_clay=0-15 160:stained_glass_pane=0-15 161:leaves2=0-1,4-5,8-9,12-13 162:log2=0-1,4-5,8-9,12-13 +163:acacia_stairs=0-7 164:dark_oak_stairs=0-7 165:slime=0 166:barrier=0 167:iron_trapdoor=0-15 168:prismarine=0-2 +169:sea_lantern=0 170:hay_block=0,4,8 171:carpet=0-15 172:hardened_clay=0 173:coal_block=0 174:packed_ice=0 +175:double_plant=0-5,8-11 176:standing_banner=0-15 177:wall_banner=2-5 178:daylight_detector_inverted=0-15 +179:red_sandstone=0-2 180:red_sandstone_stairs=0-7 181:double_stone_slab2=0,8 182:stone_slab2=0,8 +183:spruce_fence_gate=0-15 184:birch_fence_gate=0-15 185:jungle_fence_gate=0-15 186:dark_oak_fence_gate=0-15 +187:acacia_fence_gate=0-15 188:spruce_fence=0 189:birch_fence=0 190:jungle_fence=0 191:dark_oak_fence=0 +192:acacia_fence=0 193:spruce_door=0-11 194:birch_door=0-11 195:jungle_door=0-11 196:acacia_door=0-11 +197:dark_oak_door=0-11 198:end_rod=0-5 199:chorus_plant=0 200:chorus_flower=0-5 201:purpur_block=0 +202:purpur_pillar=0,4,8 203:purpur_stairs=0-7 204:purpur_double_slab=0 205:purpur_slab=0,8 206:end_bricks=0 +207:beetroots=0-3 208:grass_path=0 209:end_gateway=0 210:repeating_command_block=0-5,8-13 +211:chain_command_block=0-5,8-13 212:frosted_ice=0-3 213:magma=0 214:nether_wart_block=0 215:red_nether_brick=0 +216:bone_block=0,4,8 217:structure_void=0 218:observer=0-5,8-13 219:white_shulker_box=0-5 220:orange_shulker_box=0-5 +221:magenta_shulker_box=0-5 222:light_blue_shulker_box=0-5 223:yellow_shulker_box=0-5 224:lime_shulker_box=0-5 +225:pink_shulker_box=0-5 226:gray_shulker_box=0-5 227:silver_shulker_box=0-5 228:cyan_shulker_box=0-5 +229:purple_shulker_box=0-5 230:blue_shulker_box=0-5 231:brown_shulker_box=0-5 232:green_shulker_box=0-5 +233:red_shulker_box=0-5 234:black_shulker_box=0-5 235:white_glazed_terracotta=0-3 236:orange_glazed_terracotta=0-3 +237:magenta_glazed_terracotta=0-3 238:light_blue_glazed_terracotta=0-3 239:yellow_glazed_terracotta=0-3 +240:lime_glazed_terracotta=0-3 241:pink_glazed_terracotta=0-3 242:gray_glazed_terracotta=0-3 +243:silver_glazed_terracotta=0-3 244:cyan_glazed_terracotta=0-3 245:purple_glazed_terracotta=0-3 +246:blue_glazed_terracotta=0-3 247:brown_glazed_terracotta=0-3 248:green_glazed_terracotta=0-3 +249:red_glazed_terracotta=0-3 250:black_glazed_terracotta=0-3 251:concrete=0-15 252:concrete_powder=0-15 +255:structure_block=0-3 +""" +# `name=damage ranges` of the items whose damage value picks the flattened item (ItemStackTheFlatteningFix). +ITEM_DAMAGES = """ +stone=0-6 dirt=0-2 leaves=0-3 leaves2=0-1 log=0-3 log2=0-1 sapling=0-5 planks=0-5 sand=0-1 quartz_block=0-2 anvil=0-2 +wool=0-15 carpet=0-15 hardened_clay=0 stained_hardened_clay=0-15 silver_glazed_terracotta=0 stained_glass=0-15 +stained_glass_pane=0-15 prismarine=0-2 concrete=0-15 concrete_powder=0-15 cobblestone_wall=0-1 sandstone=0-2 +red_sandstone=0-2 stonebrick=0-3 monster_egg=0-5 yellow_flower=0 red_flower=0-8 double_plant=0-5 deadbush=0 +tallgrass=0-2 sponge=0-1 purpur_slab=0 stone_slab=0-7 stone_slab2=0 wooden_slab=0-5 coal=0-1 fish=0-3 cooked_fish=0-1 +skull=0-5 golden_apple=0-1 fireworks=0 firework_charge=0 dye=0-15 silver_shulker_box=0 fence=0 fence_gate=0 +wooden_door=0 boat=0 lit_pumpkin=0 pumpkin=0 trapdoor=0 nether_brick=0 red_nether_brick=0 netherbrick=0 +wooden_button=0 wooden_pressure_plate=0 noteblock=0 bed=0-15 banner=0-15 grass=0 brick_block=0 end_bricks=0 +golden_rail=0 magma=0 quartz_ore=0 reeds=0 slime=0 stone_stairs=0 waterlily=0 web=0 snow=0 snow_layer=0 record_11=0 +record_13=0 record_blocks=0 record_cat=0 record_chirp=0 record_far=0 record_mall=0 record_mellohi=0 record_stal=0 +record_strad=0 record_wait=0 record_ward=0 +""" +# Items a 1.12.2 server accepts (numeric ids 0..422 plus later ones). +ITEM_NAMES = """ +stone grass dirt cobblestone planks sapling bedrock sand gravel gold_ore iron_ore coal_ore log leaves sponge glass +lapis_ore lapis_block dispenser sandstone noteblock golden_rail detector_rail sticky_piston web tallgrass deadbush +piston wool yellow_flower red_flower brown_mushroom red_mushroom gold_block iron_block stone_slab brick_block tnt +bookshelf mossy_cobblestone obsidian torch mob_spawner oak_stairs chest diamond_ore diamond_block crafting_table +farmland furnace ladder rail stone_stairs lever stone_pressure_plate wooden_pressure_plate redstone_ore redstone_torch +stone_button snow_layer ice snow cactus clay jukebox fence pumpkin netherrack soul_sand glowstone lit_pumpkin +stained_glass trapdoor monster_egg stonebrick brown_mushroom_block red_mushroom_block iron_bars glass_pane melon_block +vine fence_gate brick_stairs stone_brick_stairs mycelium waterlily nether_brick nether_brick_fence nether_brick_stairs +enchanting_table end_portal_frame end_stone dragon_egg redstone_lamp wooden_slab sandstone_stairs emerald_ore +ender_chest tripwire_hook emerald_block spruce_stairs birch_stairs jungle_stairs command_block beacon cobblestone_wall +wooden_button anvil trapped_chest light_weighted_pressure_plate heavy_weighted_pressure_plate daylight_detector +redstone_block quartz_ore hopper quartz_block quartz_stairs activator_rail dropper stained_hardened_clay +stained_glass_pane leaves2 log2 acacia_stairs dark_oak_stairs hay_block carpet hardened_clay coal_block packed_ice +double_plant iron_shovel iron_pickaxe iron_axe flint_and_steel apple bow arrow coal diamond iron_ingot gold_ingot +iron_sword wooden_sword wooden_shovel wooden_pickaxe wooden_axe stone_sword stone_shovel stone_pickaxe stone_axe +diamond_sword diamond_shovel diamond_pickaxe diamond_axe stick bowl mushroom_stew golden_sword golden_shovel +golden_pickaxe golden_axe string feather gunpowder wooden_hoe stone_hoe iron_hoe diamond_hoe golden_hoe wheat_seeds +wheat bread leather_helmet leather_chestplate leather_leggings leather_boots chainmail_helmet chainmail_chestplate +chainmail_leggings chainmail_boots iron_helmet iron_chestplate iron_leggings iron_boots diamond_helmet +diamond_chestplate diamond_leggings diamond_boots golden_helmet golden_chestplate golden_leggings golden_boots flint +porkchop cooked_porkchop painting golden_apple sign wooden_door bucket water_bucket lava_bucket minecart saddle +iron_door redstone snowball boat leather milk_bucket brick clay_ball reeds paper book slime_ball chest_minecart +furnace_minecart egg compass fishing_rod clock glowstone_dust fish dye bone sugar cake bed repeater cookie filled_map +shears melon pumpkin_seeds melon_seeds beef cooked_beef chicken cooked_chicken rotten_flesh ender_pearl blaze_rod +ghast_tear gold_nugget nether_wart potion glass_bottle spider_eye fermented_spider_eye blaze_powder magma_cream +brewing_stand cauldron ender_eye speckled_melon spawn_egg experience_bottle fire_charge writable_book written_book +emerald item_frame flower_pot carrot potato baked_potato poisonous_potato map golden_carrot skull carrot_on_a_stick +nether_star pumpkin_pie fireworks firework_charge enchanted_book comparator netherbrick quartz tnt_minecart +hopper_minecart iron_horse_armor golden_horse_armor diamond_horse_armor lead name_tag command_block_minecart record_13 +record_cat record_blocks record_chirp record_far record_mall record_mellohi record_stal record_strad record_ward +record_11 record_wait cooked_fish shield elytra totem_of_undying spectral_arrow tipped_arrow splash_potion +lingering_potion beetroot beetroot_seeds beetroot_soup dragon_breath chorus_fruit chorus_flower end_crystal +shulker_shell iron_nugget knowledge_book spruce_boat birch_boat jungle_boat acacia_boat dark_oak_boat mutton +cooked_mutton rabbit cooked_rabbit rabbit_stew rabbit_foot rabbit_hide prismarine_shard prismarine_crystals +purpur_block end_rod structure_block structure_void barrier grass_path observer white_shulker_box silver_shulker_box +white_glazed_terracotta concrete concrete_powder bone_block magma nether_wart_block red_nether_brick +repeating_command_block chain_command_block sea_lantern prismarine red_sandstone red_sandstone_stairs purpur_stairs +purpur_slab purpur_pillar end_bricks spruce_door birch_door jungle_door acacia_door dark_oak_door spruce_fence_gate +spruce_fence stone_slab2 banner iron_trapdoor +""" + + +def parse_ranges(text): + out = [] + for part in text.split(','): + a, _, b = part.partition('-') + out.extend(range(int(a), int(b or a) + 1)) + return out + + +BLOCK_STATES = {} # name -> list of data values +BLOCK_IDS = {} # name -> numeric id +for _entry in BLOCKS.split(): + _id, _, _rest = _entry.partition(':') + _name, _, _data = _rest.partition('=') + BLOCK_IDS[_name] = int(_id) + BLOCK_STATES[_name] = parse_ranges(_data) +ITEM_VARIANTS = {} +for _entry in ITEM_DAMAGES.split(): + _name, _, _data = _entry.partition('=') + ITEM_VARIANTS[_name] = parse_ranges(_data) +ITEMS = ITEM_NAMES.split() + +COLORS = ['white', 'orange', 'magenta', 'light_blue', 'yellow', 'lime', 'pink', 'gray', 'silver', 'cyan', 'purple', + 'blue', 'brown', 'green', 'red', 'black'] +WOODS = ['oak', 'spruce', 'birch', 'jungle', 'acacia', 'dark_oak'] + + +# ------------------------------------------------------------------ NBT text helpers +def q(s): + """A quoted NBT string.""" + return '"' + s.replace('\\', '\\\\').replace('"', '\\"') + '"' + + +def js(obj): + """A JSON text as an NBT string (1.12 stores text components as JSON strings).""" + return q(json.dumps(obj, separators=(',', ':'))) + + +def full(name): + return name if ':' in name else 'minecraft:' + name + + +class Stack(str): + """An item compound that remembers its parts (for `replaceitem` / `give`).""" + + def __new__(cls, text, name, count, damage, tag, numeric): + obj = str.__new__(cls, text) + obj.name, obj.count, obj.damage, obj.tag, obj.numeric = name, count, damage, tag, numeric + return obj + + def command_args(self): + return f'{full(self.name)} {self.count} {self.damage}' + (f' {self.tag}' if self.tag else '') + + +def item(name, count=1, damage=0, tag=None, slot=None, numeric=None): + """An item stack compound. `numeric`: write the 1.7 style numeric `id:Ns` instead of the name.""" + parts = [] + if slot is not None: + parts.append(f'Slot:{slot}b') + parts.append(f'id:{numeric}s' if numeric is not None else f'id:{q(full(name))}') + parts.append(f'Count:{count}b') + parts.append(f'Damage:{damage}s') + if tag: + parts.append(f'tag:{tag}') + return Stack('{' + ','.join(parts) + '}', name, count, damage, tag, numeric) + + +def slotted(stacks, first=0): + """Put `Slot` into the stack compounds (strings starting with `{`).""" + return '[' + ','.join('{Slot:%db,%s' % (first + i, s[1:]) for i, s in enumerate(stacks)) + ']' + + +def ench(*pairs): + """`ench:[{id:16s,lvl:3s}]`: 1.12 enchantments are numeric ids.""" + return 'ench:[' + ','.join('{id:%ds,lvl:%ds}' % p for p in pairs) + ']' + + +def stored_ench(*pairs): + return 'StoredEnchantments:[' + ','.join('{id:%ds,lvl:%ds}' % p for p in pairs) + ']' + + +def display(name=None, lore=None, color=None): + parts = [] + if name is not None: + parts.append(f'Name:{q(name)}') + if lore: + parts.append('Lore:[' + ','.join(q(l) for l in lore) + ']') + if color is not None: + parts.append(f'color:{color}') + return 'display:{' + ','.join(parts) + '}' + + +# ------------------------------------------------------------------ running commands in batches +FAIL = re.compile(r"(couldn't|cannot|can't|unknown|usage:|invalid|no such|not found|outside of the world|" + r"exception|expected|failed|unable|could not|does not exist|there is no|not a valid|" + r"incorrect|malformed|error|no entity|must be|too (big|large|many|long)|not allowed|" + r"not an? |no (item|block|player|entities))", re.I) +FINE = re.compile(r"(already have it|Can't keep up|No blocks filled|logged in with entity id|lost connection|left the game|joined the game)") + + +def clean(line): + return re.sub(r'^\[[0-9:]+\] \[[^\]]*\]: ', '', line) + + +def batch(server, commands, problems, chunk=120, quiet=False): + """Run the commands one after the other (many per tick), return their output lines. Failures go to `problems`.""" + outputs = [] + for start in range(0, len(commands), chunk): + part = commands[start:start + chunk] + marks = [] + text = [] + for c in part: + server.counter += 1 + mark = f'@@{server.counter}@@' + marks.append(mark) + text.append(c) + text.append('say ' + mark) + server.process.stdin.write('\n'.join(text) + '\n') + server.process.stdin.flush() + i = 0 + current = [] + deadline = time.time() + 600 + while i < len(part): + try: + line = clean(server.queue.get(timeout=5)) + except queue.Empty: + if server.process.poll() is not None or time.time() > deadline: + raise TimeoutError(f'server did not answer {part[i][:100]!r}') + continue + if marks[i] in line: + outputs.append(current) + bad = [l for l in current if FAIL.search(l) and not FINE.search(l)] + if bad and not quiet: + problems.append((part[i][:200], bad[:2])) + current = [] + i += 1 + else: + current.append(line) + return outputs + + +# ------------------------------------------------------------------ layout +class Layers: + """Platforms are created on first use; rows of them are handed out to `Packer`s.""" + + def __init__(self, scene): + self.scene = scene + self.next = 0 + self.made = set() + self.y = None + self.z = 0 + self.n = 0 + + def take(self): + """A whole new platform.""" + if self.next >= len(LAYERS): + raise RuntimeError('out of layers') + y = LAYERS[self.next] + self.next += 1 + self.platform(y) + return y + + def fresh(self): + """The next row goes on a new platform (so that the platform is used by one group of things only).""" + self.y = None + + def row(self, zstep): + """The next free row (y, z, parity) of the current platform.""" + if self.y is None or self.z + zstep > BZ + SIZE - 2: + self.y = self.take() + self.z = BZ + 1 + z = self.z + self.z += zstep + (1 if self.n % 2 == 0 else 0) + self.n += 1 + return self.y, z, (self.n % 2) + + def platform(self, y): + if y in self.made: + return + self.made.add(y) + s = self.scene + if y == LAYERS[0]: # clear the natural terrain around the first platform + for x in range(BX, BX + SIZE, 32): + for z in range(BZ, BZ + SIZE, 32): + s.cmd(f'fill {x} {y} {z} {x + 31} {y + 11} {z + 31} minecraft:air 0') + s.cmd(f'fill {BX} {y - 2} {BZ} {BX + SIZE - 1} {y - 1} {BZ + SIZE - 1} minecraft:stone 0') + + +class Packer: + """Hands out cells in rows of the platforms: `cell()` -> (x, y, z), cells `stride` apart. + Rows alternate their start so that both chunk edges (x % 16 == 0 and 15) are used.""" + + def __init__(self, layers, stride=2, zstep=3): + self.layers, self.stride, self.zstep = layers, stride, zstep + self.y = self.x = self.z = None + + def newrow(self): + self.y, self.z, parity = self.layers.row(self.zstep) + self.x = BX + parity + + def cell(self, span=1): + """One cell with room for `span` cells in x.""" + if self.x is None or self.x + self.stride * span > BX + SIZE - 1: + self.newrow() + x = self.x + self.x += self.stride + return x, self.y, self.z + + def gap(self, n=1): + if self.x is not None: + self.x += self.stride * n + + def take(self, n, span=1): + return [self.cell(span) for _ in range(n)] + + +class Scene: + def __init__(self): + self.cmds = [] # the first phase + self.late = [] # the last tick + self.expect = {} # (x, y, z) -> (block, data), what the scene placed + self.tes = {} # (x, y, z) -> block entity id expected + self.layers = Layers(self) + + def cmd(self, c, late=False): + (self.late if late else self.cmds).append(c) + + def block(self, x, y, z, name, data=0, tag=None, late=False, expect=True): + if name in TWO_STEP and data: + self.cmd(f'setblock {x} {y} {z} {full(name)} 0 replace', late) + c = f'setblock {x} {y} {z} {full(name)} {data} replace' + (f' {tag}' if tag else '') + self.cmd(c, late) + if expect: + self.expect[(x, y, z)] = (name, data) + + def fill(self, x1, y1, z1, x2, y2, z2, name, data=0, late=False): + self.cmd(f'fill {x1} {y1} {z1} {x2} {y2} {z2} {full(name)} {data}', late) + + def summon(self, kind, x, y, z, nbt='', late=False): + self.cmd(f'summon {kind} {x} {y} {z} {{{nbt}}}', late) + + +# ------------------------------------------------------------------ items +POTIONS = ['water', 'mundane', 'thick', 'awkward', 'night_vision', 'long_night_vision', 'invisibility', 'long_invisibility', + 'leaping', 'strong_leaping', 'long_leaping', 'fire_resistance', 'long_fire_resistance', 'swiftness', + 'strong_swiftness', 'long_swiftness', 'slowness', 'long_slowness', 'water_breathing', 'long_water_breathing', + 'healing', 'strong_healing', 'harming', 'strong_harming', 'poison', 'strong_poison', 'long_poison', + 'regeneration', 'strong_regeneration', 'long_regeneration', 'strength', 'strong_strength', 'long_strength', + 'weakness', 'long_weakness', 'luck'] +ENCHANT_IDS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 16, 17, 18, 19, 20, 21, 22, 32, 33, 34, 35, 48, 49, 50, 51, 61, 62, 70, 71] +# 1.12 entity ids that a spawn egg or a spawner can carry +MOBS = ['bat', 'blaze', 'cave_spider', 'chicken', 'cow', 'creeper', 'donkey', 'elder_guardian', 'enderman', 'endermite', + 'evocation_illager', 'ghast', 'guardian', 'horse', 'husk', 'llama', 'magma_cube', 'mooshroom', 'mule', 'ocelot', + 'parrot', 'pig', 'polar_bear', 'rabbit', 'sheep', 'shulker', 'silverfish', 'skeleton', 'skeleton_horse', 'slime', + 'spider', 'squid', 'stray', 'vex', 'villager', 'vindication_illager', 'witch', 'wither_skeleton', 'wolf', + 'zombie', 'zombie_horse', 'zombie_pigman', 'zombie_villager', 'villager_golem', 'snowman', 'illusion_illager'] +OLD_NAMES = {'cave_spider': 'CaveSpider', 'elder_guardian': 'ElderGuardian', 'evocation_illager': 'EvocationIllager', + 'magma_cube': 'LavaSlime', 'mooshroom': 'MushroomCow', 'ocelot': 'Ozelot', 'polar_bear': 'PolarBear', + 'skeleton_horse': 'SkeletonHorse', 'vindication_illager': 'VindicationIllager', + 'wither_skeleton': 'WitherSkeleton', 'zombie_horse': 'ZombieHorse', 'zombie_pigman': 'PigZombie', + 'zombie_villager': 'ZombieVillager', 'villager_golem': 'VillagerGolem', 'snowman': 'SnowMan', + 'illusion_illager': 'IllusionIllager'} +BANNER_PATTERNS = ['b', 'bs', 'ls', 'rs', 'ts', 'ms', 'drs', 'dls', 'ss', 'cr', 'sc', 'bt', 'tt', 'bts', 'tts', 'ld', 'rd', + 'lud', 'rud', 'mc', 'mr', 'vh', 'hh', 'vhr', 'hhb', 'bo', 'cbo', 'br', 'tl', 'bl', 'tr', 'gra', 'gru', + 'bri', 'sku', 'cre', 'flo', 'moj', 'cs'] +RECORDS = ['record_13', 'record_cat', 'record_blocks', 'record_chirp', 'record_far', 'record_mall', 'record_mellohi', + 'record_stal', 'record_strad', 'record_ward', 'record_11', 'record_wait'] +DAMAGEABLE = ['bow', 'carrot_on_a_stick', 'chainmail_boots', 'chainmail_chestplate', 'chainmail_helmet', 'chainmail_leggings', + 'diamond_axe', 'diamond_boots', 'diamond_chestplate', 'diamond_helmet', 'diamond_hoe', 'diamond_leggings', + 'diamond_pickaxe', 'diamond_shovel', 'diamond_sword', 'elytra', 'fishing_rod', 'flint_and_steel', 'golden_axe', + 'golden_boots', 'golden_chestplate', 'golden_helmet', 'golden_hoe', 'golden_leggings', 'golden_pickaxe', + 'golden_shovel', 'golden_sword', 'iron_axe', 'iron_boots', 'iron_chestplate', 'iron_helmet', 'iron_hoe', + 'iron_leggings', 'iron_pickaxe', 'iron_shovel', 'iron_sword', 'leather_boots', 'leather_chestplate', + 'leather_helmet', 'leather_leggings', 'shears', 'shield', 'stone_axe', 'stone_hoe', 'stone_pickaxe', + 'stone_shovel', 'stone_sword', 'wooden_axe', 'wooden_hoe', 'wooden_pickaxe', 'wooden_shovel', 'wooden_sword'] + + +def sweep_stacks(): + """Every kind of item the flattening cares about, one stack each (no slot yet).""" + out = [] + for n in ITEMS: + for d in ITEM_VARIANTS.get(n, [0]): + out.append(item(n, damage=d)) + # items whose damage is wear + for i, n in enumerate(DAMAGEABLE): + out.append(item(n, damage=(i * 7) % 60 + 1, tag='{Damage:%d,RepairCost:%d}' % ((i * 7) % 60 + 1, i % 5))) + # damage values the flattening has no entry for, and non-damageable items with damage + for n, d in [('stone', 7), ('stone', 15), ('wool', 16), ('wool', 100), ('log', 4), ('log', 15), ('planks', 6), ('dirt', 3), + ('sand', 2), ('apple', 3), ('stick', 9), ('dye', 16), ('leaves', 8), ('leaves2', 5), ('stonebrick', 7), + ('quartz_block', 5), ('prismarine', 3), ('anvil', 3), ('coal', 2), ('double_plant', 6), ('red_flower', 9), + ('tallgrass', 3), ('sapling', 6), ('cobblestone_wall', 2), ('monster_egg', 6), ('sponge', 2)]: + out.append(item(n, damage=d)) + out.append(item('stone', damage=-1)) + # raw numeric ids (as written by a 1.7 server) are kept inside item tags + for nid, d in [(1, 0), (35, 5), (5, 3), (17, 2), (351, 4), (397, 3), (383, 50), (373, 8261), (322, 1), (349, 3), (263, 1), + (160, 7), (159, 14), (251, 3), (425, 0), (397, 5), (298, 0), (276, 12)]: + out.append(item('air', damage=d, numeric=nid)) + # potions in all four shapes + for kind in ('potion', 'splash_potion', 'lingering_potion', 'tipped_arrow'): + for p in POTIONS: + out.append(item(kind, count=1 if kind != 'tipped_arrow' else 7, tag='{Potion:%s}' % q('minecraft:' + p))) + out.append(item(kind, tag='{CustomPotionEffects:[{Id:1b,Amplifier:1b,Duration:600,Ambient:0b,ShowParticles:1b},' + '{Id:10b,Amplifier:0b,Duration:200}],CustomPotionColor:16711680,Potion:"minecraft:awkward"}')) + out.append(item('potion', damage=8261)) + out.append(item('potion', damage=16453)) + out.append(item('potion', damage=32764)) + # enchantments, numeric ids + for e in ENCHANT_IDS: + out.append(item('enchanted_book', tag='{%s}' % stored_ench((e, 1 + e % 5), (34, 3)))) + out.append(item(DAMAGEABLE[e % len(DAMAGEABLE)], damage=e, tag='{%s,Damage:%d}' % (ench((e, 1 + e % 4), ((e + 7) % 35, 2)), e))) + out.append(item('enchanted_book', tag='{StoredEnchantments:[{id:70s,lvl:1s},{id:71s,lvl:1s},{id:99s,lvl:1s}]}')) + out.append(item('diamond_sword', tag='{ench:[{id:16s,lvl:32767s},{id:-1s,lvl:0s}],Unbreakable:1b,HideFlags:63}')) + # spawn eggs, old style: the entity id in EntityTag + for i, m in enumerate(MOBS): + out.append(item('spawn_egg', tag='{EntityTag:{id:%s}}' % q('minecraft:' + m))) + if m in OLD_NAMES or i % 3 == 0: + out.append(item('spawn_egg', tag='{EntityTag:{id:%s,CustomName:"Egg %d"}}' % (q(OLD_NAMES.get(m, m.title())), i))) + out.append(item('spawn_egg', damage=50, tag='{EntityTag:{id:"minecraft:creeper",powered:1b}}')) + out.append(item('spawn_egg')) + for i in range(0, 130, 9): + out.append(item('spawn_egg', damage=i)) + # names, lore, colors + out.append(item('diamond_sword', tag='{%s,Damage:3}' % display('Blade', ['first line', 'second line']))) + out.append(item('stick', tag='{%s}' % display('{"text":"json looking"}', ['{"text":"lore"}']))) + out.append(item('paper', tag='{%s}' % display(r'§cColoured §lname', ['§7grey lore']))) + out.append(item('stone', tag='{%s,ench:[],Unbreakable:0b}' % display(''))) + for i, c in enumerate([0, 255, 16711680, 65280, 8388608, 16777215, 10511680]): + out.append(item(['leather_helmet', 'leather_chestplate', 'leather_leggings', 'leather_boots'][i % 4], damage=i, + tag='{%s}' % display(color=c))) + # attribute modifiers + out.append(item('iron_sword', tag='{AttributeModifiers:[{AttributeName:"generic.attackDamage",Name:"x",Amount:4.5d,Operation:0,' + 'UUIDMost:1L,UUIDLeast:2L,Slot:"mainhand"},{AttributeName:"generic.movementSpeed",Name:"y",' + 'Amount:0.1d,Operation:1,UUIDMost:3L,UUIDLeast:4L}]}')) + # CanDestroy / CanPlaceOn + out.append(item('diamond_pickaxe', tag='{CanDestroy:["minecraft:stone","dirt","minecraft:log","wool"]}')) + out.append(item('stone', count=3, tag='{CanPlaceOn:["minecraft:grass","sand","minecraft:planks"]}')) + out.append(item('diamond_pickaxe', tag='{CanDestroy:[1,2,3,35,17]}')) + out.append(item('stone', tag='{CanPlaceOn:[2,12,5],CanDestroy:["minecraft:flowing_water"]}')) + # banners and shields + for i, c in enumerate(COLORS): + pats = ','.join('{Pattern:%s,Color:%d}' % (q(BANNER_PATTERNS[(i * 3 + k) % len(BANNER_PATTERNS)]), (i + 5 * k) % 16) + for k in range(1 + i % 5)) + out.append(item('banner', damage=i, tag='{BlockEntityTag:{Base:%d,Patterns:[%s]}}' % (i, pats))) + if i % 2 == 0: + out.append(item('shield', damage=i, tag='{BlockEntityTag:{Base:%d,Patterns:[%s]}}' % (15 - i, pats))) + out.append(item('banner', damage=4, tag='{BlockEntityTag:{Patterns:[{Pattern:"mr",Color:9}]},%s}' % display('Ominous Banner'))) + # skulls + for t in range(6): + out.append(item('skull', damage=t)) + out.append(item('skull', damage=3, tag='{SkullOwner:"Notch"}')) + out.append(item('skull', damage=3, tag='{SkullOwner:{Id:"61699b2e-d327-4a01-9f1e-0ea8c3f06bc6",Name:"Dinnerbone",' + 'Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6e319",Signature:"sig"}]}}}')) + # books + out.append(item('written_book', tag='{title:"Title",author:"Me",generation:1,resolved:1b,pages:[%s,%s,"plain page"]}' + % (js({'text': 'page one', 'bold': True}), js({'text': '', 'extra': [{'text': 'two', 'clickEvent': { + 'action': 'change_page', 'value': '1'}}, {'text': ' hover', 'hoverEvent': { + 'action': 'show_text', 'value': {'text': 'hi'}}}]})))) + out.append(item('written_book', tag='{title:"Old",author:"Ancient",generation:0,pages:["old \\"string\\" page"]}')) + out.append(item('writable_book', tag='{pages:["draft one","draft two"]}')) + # fireworks + out.append(item('fireworks', count=3, tag='{Fireworks:{Flight:2b,Explosions:[{Type:1b,Colors:[I;255,16711680],FadeColors:[I;65280],' + 'Trail:1b,Flicker:0b},{Type:4b,Colors:[I;1],Trail:0b}]}}')) + out.append(item('firework_charge', tag='{Explosion:{Type:3b,Colors:[I;65280],FadeColors:[I;1,2,3],Flicker:1b}}')) + # nested containers in item tags + inner = [item('stone', count=9, slot=0), item('golden_apple', damage=1, slot=3, tag='{%s}' % display('Gold')), + item('dye', damage=4, slot=5), item('wool', damage=14, slot=26), item('air', numeric=35, damage=2, slot=1)] + for i, c in enumerate(COLORS): + out.append(item(c + '_shulker_box' if c != 'silver' else 'silver_shulker_box', tag='{BlockEntityTag:{Items:[%s],id:"minecraft:shulker_box"' + ',CustomName:%s,Lock:"key%d"}}' % (','.join(inner[:1 + i % 5]), q('Box ' + c), i))) + out.append(item('chest', tag='{BlockEntityTag:{Items:[%s],id:"minecraft:chest"}}' % ','.join(inner))) + out.append(item('chest', tag='{BlockEntityTag:{LootTable:"minecraft:chests/simple_dungeon",LootTableSeed:5L}}')) + out.append(item('trapped_chest', tag='{BlockEntityTag:{Items:[%s]}}' % item('wool', damage=3, slot=0))) + out.append(item('furnace', tag='{BlockEntityTag:{Items:[%s],BurnTime:100s,CookTime:50s,CookTimeTotal:200s}}' % item('iron_ore', slot=0))) + out.append(item('mob_spawner', tag='{BlockEntityTag:{SpawnData:{id:"Zombie"},SpawnPotentials:[{Entity:{id:"Skeleton"},Weight:2}]}}')) + out.append(item('beacon', tag='{BlockEntityTag:{Levels:3,Primary:1,Secondary:10}}')) + out.append(item('command_block', tag='{BlockEntityTag:{Command:"say item",TrackOutput:0b}}')) + out.append(item('noteblock', tag='{BlockEntityTag:{note:13b}}')) + out.append(item('standing_banner', damage=3)) + out.append(item('flower_pot', count=2)) + out.append(item('monster_egg', damage=5)) + out.append(item('stained_glass_pane', damage=11, count=16)) + out.append(item('filled_map', damage=0, tag='{display:{MapColor:255}}')) + out.append(item('filled_map', damage=1)) + out.append(item('filled_map', damage=2, tag='{map_is_scaling:1b}')) + out.append(item('map', count=2)) + out.append(item('name_tag', tag='{%s}' % display('Named'))) + out.append(item('minecart', tag='{EntityTag:{id:"minecraft:minecart"}}')) + out.append(item('armor_stand', tag='{EntityTag:{id:"minecraft:armor_stand",ShowArms:1b,Small:1b}}')) + out.append(item('painting', tag='{EntityTag:{Motive:"Pigscene"}}')) + out.append(item('item_frame', tag='{EntityTag:{Item:%s}}' % item('wool', damage=5))) + out.append(item('knowledge_book', tag='{Recipes:["minecraft:stick","minecraft:wooden_slab","minecraft:stained_hardened_clay"]}')) + out.append(item('totem_of_undying')) + out.append(item('golden_apple', damage=1, count=3)) + out.append(item('banner', damage=1, tag='{display:{Name:"Plain"}}')) + for r in RECORDS: + out.append(item(r)) + return out + + +class Stacks: + """A cursor over the sweep: containers take the next stacks, and wrap around at the end.""" + + def __init__(self): + self.stacks = sweep_stacks() + self.i = 0 + + def take(self, n): + out = [self.stacks[(self.i + k) % len(self.stacks)] for k in range(n)] + self.i += n + return out + + def items(self, n, first=0): + return slotted(self.take(n), first) + + +# ------------------------------------------------------------------ block entities +SIGN_TEXTS = [ + [js({'text': 'Hello'}), js({'text': 'World', 'color': 'red', 'bold': True}), js({'text': ''}), js({'text': 'x', 'extra': [{'text': 'a', 'italic': True}]})], + [js('plain string'), js({'text': 'click', 'clickEvent': {'action': 'run_command', 'value': '/say hi'}}), + js({'text': 'hover', 'hoverEvent': {'action': 'show_text', 'value': {'text': 'tip'}}}), js({'text': 'selector', 'extra': [{'selector': '@p'}]})], + [js({'translate': 'chat.type.text', 'with': ['a', 'b']}), js({'score': {'name': 'Upgrader', 'objective': 'kills'}}), js([{'text': 'l1'}, {'text': 'l2'}]), js('')], + [q(''), q(''), q(''), q('')], +] +SKULL_PROFILE = ('Owner:{Id:"61699b2e-d327-4a01-9f1e-0ea8c3f06bc6",Name:"Dinnerbone",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6e319"}]}}') +COMMANDS = ['say hi', 'tp @p ~ ~1 ~', 'execute @e[type=Zombie] ~ ~ ~ detect ~ ~-1 ~ stone 0 say hi', 'scoreboard players set @a kills 1', + 'give @p minecraft:wool 1 5', 'setblock ~ ~1 ~ minecraft:stone', 'testfor @a', 'playsound minecraft:entity.pig.ambient master @a'] + + +def tag_for(name, data, k, stacks): + """The tile entity data for one placed block, or None.""" + if name in ('chest', 'trapped_chest'): + t = 'Items:' + stacks.items(27 if k % 4 else 20) + if k % 5 == 0: + t += ',CustomName:' + q('Chest %d' % k) + if k % 7 == 3: + t += ',Lock:"secret"' + return t + if name in ('furnace', 'lit_furnace'): + t = 'Items:' + slotted(stacks.take(3)) + (',BurnTime:%ds,CookTime:%ds,CookTimeTotal:200s' % ((32000 if name == 'lit_furnace' else 0), 10 + k)) + return t + (',CustomName:"Burner"' if k % 2 else '') + (',RecipesUsed:{"minecraft:iron_ingot":2}' if k % 3 == 0 else '') + if name in ('dispenser', 'dropper'): + return 'Items:' + stacks.items(9) + (',CustomName:%s' % q(name + ' ' + str(k)) if k % 2 else '') + if name == 'hopper': + return 'Items:' + stacks.items(5) + ',TransferCooldown:%d' % (k % 8) + (',CustomName:"Funnel"' if k % 2 else '') + if name == 'brewing_stand': # the block data follows the bottles in the first three slots + picks = stacks.take(3) + slots = ['{Slot:%db,%s' % (i, picks[i][1:]) for i in range(3) if data >> i & 1] + slots += ['{Slot:3b,%s' % stacks.take(1)[0][1:], '{Slot:4b,%s' % item('blaze_powder', 3)[1:]] + return ('Items:[' + ','.join(slots) + ']' + ',BrewTime:%ds,Fuel:%db' % (k * 3, 20 - k) + + (',CustomName:"Brewery"' if k % 2 else '')) + if name == 'enchanting_table': + return 'CustomName:' + q('Enchant ' + str(k)) + if name == 'beacon': + return 'Levels:%d,Primary:%d,Secondary:%d' % (k % 5, 1 + k % 10, k % 3 and 1 + k % 10) + if name == 'jukebox': + return ('RecordItem:' + item(RECORDS[k % len(RECORDS)])) if data else 'Record:%d' % (2256 + k % 12) + if name == 'noteblock': + return 'note:%db,powered:%db' % (k % 25, k % 2) + if name in ('command_block', 'repeating_command_block', 'chain_command_block'): + t = 'Command:%s,SuccessCount:%d,TrackOutput:%db,powered:0b,auto:0b,conditionMet:%db' % ( + q(COMMANDS[k % len(COMMANDS)]), k % 4, k % 2, data // 8) + t += ',LastOutput:%s' % js({'text': '[@] done', 'color': 'white'}) if k % 2 else '' + t += ',CustomName:%s' % q('Cmd ' + str(k)) if k % 3 == 0 else '' + return t + ',UpdateLastExecution:1b,LastExecution:%dL' % (1000 + k) + if name == 'structure_block': + return ('name:"scene:test%d",author:"Me",metadata:"meta",posX:%d,posY:%d,posZ:%d,sizeX:%d,sizeY:%d,sizeZ:%d,rotation:%s,mirror:%s,' + 'mode:%s,integrity:%d.5f,seed:%dL,ignoreEntities:%db,powered:0b,showair:%db,showboundingbox:1b') % ( + k, k % 3 - 1, 1 + k % 2, -k % 3, 2 + k % 5, 3, 4, q(['NONE', 'CLOCKWISE_90', 'CLOCKWISE_180', 'COUNTERCLOCKWISE_90'][k % 4]), + q(['NONE', 'LEFT_RIGHT', 'FRONT_BACK'][k % 3]), q(['SAVE', 'LOAD', 'CORNER', 'DATA'][data & 3]), k % 2, k * 77, k % 2, k % 2) + if name in ('standing_sign', 'wall_sign'): + text = SIGN_TEXTS[k % len(SIGN_TEXTS)] + return ','.join('Text%d:%s' % (i + 1, text[i]) for i in range(4)) + if name == 'mob_spawner': + mob = MOBS[k % len(MOBS)] + spawn = 'SpawnData:{id:%s}' % q(OLD_NAMES.get(mob, mob.title()) if k % 2 else 'minecraft:' + mob) + if k % 3 == 0: + spawn = ('SpawnData:{id:"minecraft:zombie",HandItems:[%s,{}],ArmorItems:[{},{},{},%s],CustomName:"Spawned",Health:5.0f},' + 'SpawnPotentials:[{Entity:{id:"minecraft:skeleton",HandItems:[%s,{}]},Weight:2},{Entity:{id:"Pig"},Weight:1}]' + % (item('stone_sword', damage=3), item('log', damage=2), item('air', numeric=261))) + return (spawn + ',MaxNearbyEntities:%ds,RequiredPlayerRange:1s,SpawnCount:%ds,SpawnRange:%ds,Delay:%ds,MinSpawnDelay:%ds,MaxSpawnDelay:%ds' + % (6 + k % 3, 3 + k % 4, 4 + k % 2, 20 + k, 200, 800)) + if name.endswith('shulker_box'): + return 'Items:' + stacks.items(27 if k % 2 else 12) + (',CustomName:%s' % q('Shulk ' + str(k)) if k % 3 == 0 else '') + ( + ',Lock:"k"' if k % 5 == 1 else '') + if name == 'end_gateway': + return 'Age:%dL,ExactTeleport:%db,ExitPortal:{X:%d,Y:%d,Z:%d}' % (k * 10, k % 2, 10 + k, 70, 20 - k) + if name in ('unpowered_comparator', 'powered_comparator'): + return 'OutputSignal:%d' % (k % 16) + if name == 'skull': + return None # see skull() + return None + + +# ------------------------------------------------------------------ the block sweep +# families the sweep does not place with the generic rule +SPECIAL = set(['air', 'bed', 'wooden_door', 'iron_door', 'spruce_door', 'birch_door', 'jungle_door', 'acacia_door', 'dark_oak_door', + 'double_plant', 'standing_banner', 'wall_banner', 'skull', 'flower_pot', 'piston_head', 'piston_extension', + 'daylight_detector', 'daylight_detector_inverted', 'observer', 'water', 'flowing_water', 'lava', 'flowing_lava', + 'fire', 'portal', 'frosted_ice', 'lit_redstone_lamp', 'hopper']) +# the game recomputes these when they are added: place the block with data 0 first, then the real state (the second +# placement replaces a block of the same kind and does not run `onBlockAdded`) +TWO_STEP = set(['rail', 'golden_rail', 'detector_rail', 'activator_rail', 'redstone_wire', 'unpowered_repeater', 'powered_repeater', + 'unpowered_comparator', 'powered_comparator', 'dispenser', 'dropper', 'piston', 'sticky_piston', 'tripwire_hook', + 'tripwire', 'observer', 'daylight_detector', 'daylight_detector_inverted']) +# placed in the last tick: their state is rewritten by a scheduled tick +LATE_NAMES = set(['powered_repeater', 'powered_comparator']) +# soil under plants: name -> (block, data) +FLOORS = { + 'sapling': ('grass', 0), 'tallgrass': ('grass', 0), 'red_flower': ('grass', 0), 'yellow_flower': ('grass', 0), + 'wheat': ('farmland', 7), 'carrots': ('farmland', 7), 'potatoes': ('farmland', 7), 'beetroots': ('farmland', 7), + 'pumpkin_stem': ('farmland', 7), 'melon_stem': ('farmland', 7), 'nether_wart': ('soul_sand', 0), 'cactus': ('sand', 0), + 'deadbush': ('sand', 1), 'brown_mushroom': ('dirt', 2), 'red_mushroom': ('dirt', 2), 'waterlily': ('water', 0), + 'reeds': ('sand', 0), 'chorus_flower': ('end_stone', 0), 'chorus_plant': ('end_stone', 0), +} +# blocks that need something solid at their side or above: surrounded by the supports +POCKETS = {'torch': 'stone', 'redstone_torch': 'stone', 'lever': 'stone', 'stone_button': 'stone', 'wooden_button': 'stone', + 'ladder': 'stone', 'wall_sign': 'stone', 'wall_banner': 'stone', 'vine': 'stone', 'tripwire_hook': 'stone', + 'cocoa': 'log'} + + +def pocket(scene, x, y, z, support): + block, data = ('stone', 0) if support == 'stone' else ('log', 3) + for dx, dy, dz in ((1, 0, 0), (-1, 0, 0), (0, 0, 1), (0, 0, -1), (0, 1, 0)): + scene.block(x + dx, y + dy, z + dz, block, data, expect=False) + + +def sweep_blocks(scene, stacks): + plain = Packer(scene.layers, stride=2, zstep=3) + pockets = Packer(scene.layers, stride=3, zstep=4) + k = 0 + for name in sorted(BLOCK_STATES, key=lambda n: BLOCK_IDS[n]): + if name in SPECIAL: + continue + datas = BLOCK_STATES[name] + pk = name in POCKETS + packer = pockets if pk else plain + cells = packer.take(len(datas)) + packer.gap() + for (x, y, z), d in zip(cells, datas): + k += 1 + if name in FLOORS: + fb, fd = FLOORS[name] + scene.block(x, y - 1, z, fb, fd, expect=False) + if name == 'reeds': + scene.block(x + 1, y - 1, z, 'water', 0, expect=False) + if pk: + pocket(scene, x, y, z, POCKETS[name]) + t = tag_for(name, d, k, stacks) + scene.block(x, y, z, name, d, '{' + t + '}' if t else None, late=name in LATE_NAMES) + + +# ------------------------------------------------------------------ the player: a bot that answers the server +def pos_long(x, y, z): + return struct.pack('>Q', ((x & 0x3FFFFFF) << 38) | ((y & 0xFFF) << 26) | (z & 0x3FFFFFF)) + + +def make_player(Bot, varint, parse_varint, mcstring): + """A Bot (protocol 340) that keeps the connection alive, confirms teleports and can act: dig, place, use, attack.""" + + class Player(Bot): + def __init__(self, *args): + self.entities = {} # entity id -> mob type id + self.pos = (0.0, 0.0, 0.0) + self.lock = threading.Lock() + super().__init__(*args) + + def idle(self): + self.sock.settimeout(1.0) + while not self.stop.is_set(): + try: + pid, data = self.receive() + except socket.timeout: + continue + except (EOFError, OSError): + break + try: + self.handle(pid, data) + except Exception: + pass + + def handle(self, pid, data): + if pid == 0x1F: # keep alive + self.send(0x0B, data[:8]) + elif pid == 0x2F: # player position and look + x, y, z = struct.unpack('>ddd', data[:24]) + self.pos = (x, y, z) + tid = parse_varint(data, 33)[1] + self.send(0x00, varint(tid)) + self.send(0x0E, struct.pack('>dddffB', x, y, z, 0.0, 0.0, 1)) + elif pid == 0x03: # spawn mob + p, eid = parse_varint(data, 0) + self.entities[eid] = data[p + 16] # skip the uuid, the type byte + + def move(self, x, y, z): + self.pos = (x, y, z) + self.send(0x0D, struct.pack('>dddB', x, y, z, 1)) + + def held(self, slot): + self.send(0x1A, struct.pack('>h', slot)) + + def use_item(self, hand=0): + self.send(0x20, varint(hand)) + + def dig(self, x, y, z, face=1): + self.send(0x14, varint(0) + pos_long(x, y, z) + bytes([face])) + self.send(0x14, varint(2) + pos_long(x, y, z) + bytes([face])) + + def place(self, x, y, z, face=1): + self.send(0x1F, pos_long(x, y, z) + varint(face) + varint(0) + struct.pack('>fff', 0.5, 1.0, 0.5)) + + def attack(self, eid): + self.send(0x0A, varint(eid) + varint(1)) + + def swing(self): + self.send(0x1D, varint(0)) + + def chat(self, text): + self.send(0x02, mcstring(text)) + + def respawn(self): + self.send(0x03, varint(0)) + + return Player + + +# ------------------------------------------------------------------ multi-block and tile entity families +DOORS = ['wooden_door', 'spruce_door', 'birch_door', 'jungle_door', 'acacia_door', 'dark_oak_door', 'iron_door'] +FACE_XZ = {0: (0, 1), 1: (-1, 0), 2: (0, -1), 3: (1, 0)} # horizontal index -> (dx, dz) +FACE_XYZ = {0: (0, -1, 0), 1: (0, 1, 0), 2: (0, 0, -1), 3: (0, 0, 1), 4: (-1, 0, 0), 5: (1, 0, 0)} # piston style facing + + +def doors(scene): + pk = Packer(scene.layers, stride=2, zstep=4) + for name in DOORS: + for lower in range(8): + for upper in (8, 9, 10, 11): + x, y, z = pk.cell() + scene.block(x, y, z, name, lower) + scene.block(x, y + 1, z, name, upper) + for lower in (0, 5): # a door without its upper half + x, y, z = pk.cell() + scene.block(x, y, z, name, lower) + x, y, z = pk.cell() # and an upper half alone + scene.block(x, y + 1, z, name, 9) + pk.gap() + + +def double_plants(scene): + pk = Packer(scene.layers, stride=2, zstep=3) + for lower in range(6): + x, y, z = pk.cell() + scene.block(x, y - 1, z, 'grass', 0, expect=False) + scene.block(x, y, z, 'double_plant', lower) + scene.block(x, y + 1, z, 'double_plant', 8, expect=False) + x, y, z = pk.cell() + scene.block(x, y - 1, z, 'grass', 0, expect=False) + scene.block(x, y, z, 'double_plant', 4) # without upper half + x, y, z = pk.cell() + scene.block(x, y + 1, z, 'double_plant', 8, expect=False) + + +def beds(scene): + pk = Packer(scene.layers, stride=4, zstep=4) + k = 0 + for color in range(16): + for f in range(4): + x, y, z = pk.cell() + dx, dz = FACE_XZ[f] + occupied = 4 if (color + f) % 5 == 0 else 0 + scene.block(x, y, z, 'bed', f, '{color:%d}' % color) + scene.block(x + dx, y, z + dz, 'bed', 8 + f + occupied, '{color:%d}' % color) + k += 1 + for f in range(4): # a foot or a head alone + x, y, z = pk.cell() + scene.block(x, y, z, 'bed', f, '{color:%d}' % (f * 3)) + x, y, z = pk.cell() + scene.block(x, y, z, 'bed', 8 + f, '{color:%d}' % (f * 4 + 1)) + + +def banner_tag(color, k): + n = k % 5 + pats = ','.join('{Pattern:%s,Color:%d}' % (q(BANNER_PATTERNS[(color * 5 + k + j) % len(BANNER_PATTERNS)]), (color + 3 * j + k) % 16) + for j in range(n)) + t = 'Base:%d' % color + if pats: + t += ',Patterns:[%s]' % pats + if k % 7 == 0: + t += ',CustomName:%s' % q('Banner %d' % k) + return '{%s}' % t + + +def banners(scene): + pk = Packer(scene.layers, stride=2, zstep=3) + pp = Packer(scene.layers, stride=3, zstep=4) + k = 0 + for color in range(16): + for rot in range(16): + x, y, z = pk.cell() + scene.block(x, y, z, 'standing_banner', rot, banner_tag(color, k)) + k += 1 + for f in (2, 3, 4, 5): + x, y, z = pp.cell() + pocket(scene, x, y, z, 'stone') + scene.block(x, y, z, 'wall_banner', f, banner_tag(color, k)) + k += 1 + + +def skulls(scene): + pk = Packer(scene.layers, stride=2, zstep=3) + k = 0 + for data in BLOCK_STATES['skull']: + for kind in range(6): + for rot in (range(16) if data == 1 else [0] if data in (0, 8) else [k % 16]): + x, y, z = pk.cell() + tag = 'SkullType:%db,Rot:%db' % (kind, rot) + if kind == 3: + tag += ',' + SKULL_PROFILE if (k + rot) % 2 == 0 else '' + scene.block(x, y, z, 'skull', data, '{%s}' % tag) + k += 1 + + +POT_CONTENTS = ([('', 0)] + [('red_flower', d) for d in range(9)] + [('yellow_flower', 0)] + [('sapling', d) for d in range(6)] + + [('red_mushroom', 0), ('brown_mushroom', 0), ('deadbush', 0), ('tallgrass', 2), ('cactus', 0), ('tallgrass', 0)]) + + +def flower_pots(scene): + pk = Packer(scene.layers, stride=2, zstep=3) + for i in range(len(POT_CONTENTS) * 2): + content, data = POT_CONTENTS[i % len(POT_CONTENTS)] + x, y, z = pk.cell() + if i >= len(POT_CONTENTS) and content: # the second round names the item by its numeric id + it = str(BLOCK_IDS[content]) + else: + it = q('minecraft:' + content if content else '') + scene.block(x, y, z, 'flower_pot', (i * 5) % 16 if i % 3 == 0 else 0, '{Item:%s,Data:%d}' % (it, data), expect=False) + + +def lamps_and_lit_things(scene): + pk = Packer(scene.layers, stride=3, zstep=3) + x, y, z = pk.cell() + scene.block(x + 1, y, z, 'redstone_block', 0) + scene.block(x, y, z, 'lit_redstone_lamp', 0) + x, y, z = pk.cell() + scene.block(x, y, z, 'redstone_lamp', 0) + x, y, z = pk.cell() + scene.block(x, y - 1, z, 'grass', 0, expect=False) + scene.block(x, y, z, 'pumpkin', 0) + x, y, z = pk.cell() # carved pumpkins on grass, dirt and podzol, snow on top (the flattening treats them apart) + for floor, fdata in (('grass', 0), ('dirt', 0), ('dirt', 2), ('mycelium', 0), ('grass', 0), ('dirt', 1)): + scene.block(x, y - 1, z, floor, fdata, expect=False) + scene.block(x, y, z, 'lit_pumpkin' if fdata else 'pumpkin', x % 4) + x, y, z = pk.cell() + for floor, fdata in (('grass', 0), ('dirt', 0), ('dirt', 2), ('mycelium', 0), ('grass', 0)): + scene.block(x, y - 1, z, floor, fdata, expect=False) + scene.block(x, y, z, 'snow_layer', 1 + x % 7) + x, y, z = pk.cell() + # snowy grass (a snow layer on top) + for i in range(4): + scene.block(x, y - 1, z, ['grass', 'dirt', 'mycelium', 'dirt'][i], [0, 2, 0, 0][i], expect=False) + scene.block(x, y, z, 'snow', 0) + x, y, z = pk.cell() + + +def notes_and_spawners(scene): + pk = Packer(scene.layers, stride=2, zstep=3) + for note in range(25): + for powered in (0, 1): + x, y, z = pk.cell() + scene.block(x, y, z, 'noteblock', 0, '{note:%db,powered:%db}' % (note, powered)) + pk.gap() + for i in range(12): + x, y, z = pk.cell() + scene.block(x, y, z, 'mob_spawner', 0, '{%s}' % tag_for('mob_spawner', 0, i, None)) + for i, rec in enumerate(RECORDS): + x, y, z = pk.cell() + scene.block(x, y, z, 'jukebox', 1, '{RecordItem:%s}' % item(rec)) + x, y, z = pk.cell() + scene.block(x, y, z, 'jukebox', 0, '{Record:%d}' % (2256 + i)) + + +def edges(scene): + """The blocks that UpgradeData has to revisit, on both sides of chunk borders, in all four corners and edges.""" + virtual = ['chest', 'trapped_chest', 'noteblock', 'bed', 'fire', 'oak_stairs', 'stone_stairs', 'brick_stairs', 'stone_brick_stairs', + 'nether_brick_stairs', 'sandstone_stairs', 'spruce_stairs', 'birch_stairs', 'jungle_stairs', 'quartz_stairs', + 'acacia_stairs', 'dark_oak_stairs', 'red_sandstone_stairs', 'purpur_stairs', 'redstone_wire', 'fence', + 'nether_brick_fence', 'spruce_fence', 'birch_fence', 'jungle_fence', 'dark_oak_fence', 'acacia_fence', + 'unpowered_repeater', 'powered_repeater', 'iron_bars', 'glass_pane', 'stained_glass_pane', 'fence_gate', + 'spruce_fence_gate', 'birch_fence_gate', 'jungle_fence_gate', 'dark_oak_fence_gate', 'acacia_fence_gate', + 'tripwire', 'cobblestone_wall', 'chorus_plant', 'melon_stem', 'pumpkin_stem', 'snow_layer', 'cauldron', + 'standing_sign', 'mob_spawner'] + y = scene.layers.take() + k = 0 + cells = [] + for chunk in range(1, 6): # borders x = 16 * (9 + chunk): x - 1 and x are on different chunks + bx = BX + 16 * chunk + for i in range(0, SIZE, 2): + cells.append((bx - 1, BZ + 1 + i)) # last column of a chunk, z odd + cells.append((bx, BZ + 2 + i)) # first column of the next chunk, z even + cells.append((BX + 1 + i, bz_of(chunk) - 1)) + cells.append((BX + 2 + i, bz_of(chunk))) + seen = set() + for n, name in enumerate(virtual): + datas = BLOCK_STATES[name][:3] + for j, d in enumerate(datas): + for corner in range(8): + pos = cells[(n * 24 + j * 8 + corner * 31) % len(cells)] + while pos in seen or pos[1] >= BZ + SIZE - 1: + pos = (pos[0], (pos[1] + 2) if pos[1] + 2 < BZ + SIZE - 1 else BZ + 1 + (pos[1] % 2)) + if pos in seen: + pos = (pos[0] + 2, pos[1]) + seen.add(pos) + x, z = pos + if name in FLOORS: + scene.block(x, y - 1, z, FLOORS[name][0], FLOORS[name][1], expect=False) + t = tag_for(name, d, k, None) if name in ('standing_sign', 'wall_sign', 'mob_spawner') else None + if name in ('chest', 'trapped_chest'): + t = 'Items:[%s]' % item('wool', damage=k % 16, slot=0) + k += 1 + if name == 'bed': + scene.block(x, y, z, 'bed', d % 4, '{color:%d}' % (k % 16)) + continue + scene.block(x, y, z, name, d, '{%s}' % t if t else None, late=name in LATE_NAMES) + + +def bz_of(chunk): + return BZ + 16 * chunk + + +def transient_blocks(scene, stacks): + """States the game rewrites within a tick or two: placed in the last tick, before the save.""" + pk = Packer(scene.layers, stride=4, zstep=4) + late = True + # extended pistons, with their heads, powered from behind + for sticky in (0, 1): + for f in range(6): + x, y, z = pk.cell() + if f in (0, 1): + y += 3 + scene.block(x, y - 1, z, 'stone', 0, late=late, expect=False) + dx, dy, dz = FACE_XYZ[f] + name = 'sticky_piston' if sticky else 'piston' + scene.block(x - dx, y - dy, z - dz, 'redstone_block', 0, late=late, expect=False) + scene.block(x, y, z, name, 8 + f, late=late) + scene.block(x + dx, y + dy, z + dz, 'piston_head', f + 8 * sticky, late=late) + # retracted pistons of every facing + for f in range(6): + for name in ('piston', 'sticky_piston'): + x, y, z = pk.cell() + scene.block(x, y, z, name, f, late=late) + # moving pistons + for i in range(12): + x, y, z = pk.cell() + f = i % 6 + bid, bdata = [(1, 0), (35, 5), (54, 2), (17, 1), (5, 3), (159, 9), (95, 14), (44, 11), (155, 2), (24, 1), (3, 2), (12, 1)][i] + scene.block(x, y, z, 'piston_extension', [0, 1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13][i], + '{blockId:%d,blockData:%d,facing:%d,progress:%s,extending:%db,source:%db}' % ( + bid, bdata, f, ['0.0f', '0.5f', '1.0f'][i % 3], i % 2, (i // 2) % 2), late=late) + # daylight detectors + for name in ('daylight_detector', 'daylight_detector_inverted'): + for power in range(16): + x, y, z = pk.cell() + scene.block(x, y, z, name, power, late=late) + # hoppers, the disabled ones next to a power source + for data in BLOCK_STATES['hopper']: + x, y, z = pk.cell() + if data >= 8: + scene.block(x + 1, y, z, 'redstone_block', 0, late=late, expect=False) + scene.block(x, y, z, 'hopper', data, '{Items:%s,TransferCooldown:%d}' % (stacks.items(5), data % 4), late=late) + # observers, powered ones included + for data in range(6): # (the powered states only come from a pulse that takes ticks) + x, y, z = pk.cell() + scene.block(x, y, z, 'observer', data, late=late) + # liquids of every level, still and flowing + for name in ('water', 'flowing_water', 'lava', 'flowing_lava'): + for level in range(16): + x, y, z = pk.cell() + scene.block(x, y, z, name, level, late=late) + # fire of every age, frosted ice + for age in range(16): + x, y, z = pk.cell() + scene.block(x, y, z, 'fire', age, late=late) + for age in range(4): + x, y, z = pk.cell() + scene.block(x, y, z, 'frosted_ice', age, late=late) + # nether portals in both axes: obsidian frames, then the portal blocks with one fill + for axis in (1, 2): + x, y, z = pk.cell(span=2) + pk.gap() + if axis == 1: + scene.fill(x, y, z, x + 3, y + 4, z, 'obsidian', 0, late=late) + scene.fill(x + 1, y + 1, z, x + 2, y + 3, z, 'portal', 1, late=late) + scene.expect[(x + 1, y + 1, z)] = ('portal', 1) + else: + scene.fill(x, y, z, x, y + 4, z + 3, 'obsidian', 0, late=late) + scene.fill(x, y + 1, z + 1, x, y + 3, z + 2, 'portal', 2, late=late) + scene.expect[(x, y + 1, z + 1)] = ('portal', 2) + + +def top(scene, stacks): + """The highest sections: a platform at y = 244 and columns of blocks up to the build limit.""" + scene.layers.platform(244) + for i in range(16): + for y in range(240, 256): + scene.block(BX + 2 + 2 * i, y, BZ + 2, 'wool' if y % 2 else 'stained_hardened_clay', (i + y) % 16) + x, z = BX + 2, BZ + 6 + scene.block(x, 255, z, 'chest', 2, '{Items:%s,CustomName:"Top chest"}' % stacks.items(27)) + scene.block(x + 2, 255, z, 'standing_sign', 7, '{Text1:%s,Text2:%s}' % (js({'text': 'y=255'}), js({'text': 'limit'}))) + scene.block(x + 4, 255, z, 'command_block', 1, '{Command:"say top",TrackOutput:0b}') + scene.block(x + 6, 254, z, 'skull', 1, '{SkullType:5b,Rot:4b}') + scene.block(x + 8, 253, z, 'bed', 1, '{color:14}') + scene.block(x + 7, 253, z, 'bed', 9, '{color:14}') + scene.block(x + 10, 255, z, 'standing_banner', 3, banner_tag(5, 3)) + scene.block(x + 12, 250, z, 'shulker_box' if False else 'purple_shulker_box', 5, '{Items:%s}' % stacks.items(5)) + scene.block(x + 14, 255, z, 'mob_spawner', 0, '{SpawnData:{id:"minecraft:ghast"},MaxNearbyEntities:6s,RequiredPlayerRange:1s}') + for i in range(8): # and the very bottom of the world, next to the bedrock + scene.block(BX + 2 + 2 * i, 5 + i, BZ + 3, 'sponge', i % 2) + scene.block(BX + 2 + 2 * i, 1, BZ + 5, 'wool', i) + + +def build_blocks(scene, stacks): + sweep_blocks(scene, stacks) + doors(scene) + double_plants(scene) + beds(scene) + banners(scene) + skulls(scene) + flower_pots(scene) + lamps_and_lit_things(scene) + notes_and_spawners(scene) + edges(scene) + top(scene, stacks) + + +# ------------------------------------------------------------------ entities +def uuid_tag(n): + return 'UUIDMost:%dL,UUIDLeast:%dL' % (UUID_HI, n) + + +STAY = 'NoAI:1b,Silent:1b,NoGravity:1b,Invulnerable:1b,PersistenceRequired:1b' + + +def equipment(i, stacks=None): + """Hand and armor items with numeric damage and enchantments, as 1.12 mobs carry them.""" + weapons = ['diamond_sword', 'bow', 'iron_axe', 'golden_pickaxe', 'shield', 'fishing_rod', 'stone_hoe', 'wooden_shovel'] + hand = item(weapons[i % 8], damage=i % 40, tag='{%s}' % ench(((i * 3) % 22, 1 + i % 3), (34, 2)) if i % 2 else None) + off = item('shield', damage=i % 5, tag='{BlockEntityTag:{Base:%d,Patterns:[{Pattern:"bs",Color:%d}]}}' % (i % 16, (i + 4) % 16)) if i % 3 == 0 else '{}' + armor = [item('leather_boots', damage=i % 20, tag='{%s}' % display(color=(i * 99991) % 16777216)), + item(['iron', 'golden', 'diamond', 'chainmail'][i % 4] + '_leggings', damage=i % 30), + item(['iron', 'golden', 'diamond', 'chainmail'][(i + 1) % 4] + '_chestplate', damage=i % 30, tag='{%s}' % ench((0, 2), (7, 3))), + (item('skull', damage=i % 6) if i % 4 == 0 else item('pumpkin') if i % 4 == 1 else item('wool', damage=i % 16) if i % 4 == 2 else item('diamond_helmet', damage=7, tag='{%s}' % ench((5, 2))))] + return ('HandItems:[%s,%s],ArmorItems:[%s],HandDropChances:[0.085f,%.3ff],ArmorDropChances:[0.085f,0.0f,1.0f,%.2ff]' + % (hand, off, ','.join(armor), 0.05 * (i % 7), 0.1 * (i % 5))) + + +EFFECTS = 'ActiveEffects:[{Id:1b,Amplifier:1b,Duration:600,Ambient:0b,ShowParticles:1b},{Id:10b,Amplifier:0b,Duration:99999,Ambient:1b,ShowParticles:0b}]' +ATTRS = ('Attributes:[{Name:"generic.maxHealth",Base:30.0d,Modifiers:[{Name:"bonus",Amount:2.0d,Operation:0,UUIDMost:7L,UUIDLeast:8L}]},' + '{Name:"generic.movementSpeed",Base:0.2d},{Name:"generic.followRange",Base:40.0d}]') +TRADE_ITEMS = [('wheat', 0, 18), ('wool', 5, 1), ('dye', 4, 3), ('stained_hardened_clay', 11, 2), ('paper', 0, 24), ('coal', 1, 15), + ('fish', 3, 6), ('cooked_fish', 1, 6), ('stone', 5, 8), ('log', 2, 4), ('record_13', 0, 1), ('golden_apple', 1, 1)] + + +def trades(n): + out = [] + for i in range(n): + b = TRADE_ITEMS[i % len(TRADE_ITEMS)] + s = TRADE_ITEMS[(i * 5 + 3) % len(TRADE_ITEMS)] + t = '{buy:%s,sell:%s,maxUses:%d,uses:%d,rewardExp:%db' % (item(b[0], b[2], b[1]), item(s[0], 1, s[1]), 7 + i, i % 3, i % 2) + if i % 3 == 1: + t += ',buyB:%s' % item('emerald', 1) + if i % 4 == 2: + t = t.replace('sell:' + item(s[0], 1, s[1]), 'sell:' + item('enchanted_book', 1, 0, '{%s}' % stored_ench((34 + i % 2, 2), (70, 1)))) + out.append(t + '}') + return 'Offers:{Recipes:[%s]}' % ','.join(out) + + +def entity_list(stacks): + """(summon id, nbt, late). Fixed uuids are added by the caller.""" + E = [] + + def add(kind, nbt='', late=False, stay=True): + E.append((kind, nbt, late, stay)) + + # monsters + for i, k in enumerate(['zombie', 'husk', 'skeleton', 'stray', 'wither_skeleton', 'creeper', 'spider', 'cave_spider', 'silverfish', + 'endermite', 'blaze', 'ghast', 'witch', 'giant', 'guardian', 'elder_guardian', 'shulker', 'vex', + 'evocation_illager', 'vindication_illager', 'illusion_illager', 'zombie_pigman', 'slime', 'magma_cube']): + extra = equipment(i) + if k == 'creeper': + extra += ',powered:1b,Fuse:30s,ExplosionRadius:4b,ignited:0b' + elif k in ('zombie', 'husk'): + extra += ',IsBaby:1b,CanBreakDoors:1b' + elif k == 'shulker': + extra = 'Color:%db,Peek:30b,AttachFace:0b,APX:1,APY:2,APZ:3' % (i % 16) + elif k == 'vex': + extra += ',BoundX:1,BoundY:2,BoundZ:3,LifeTicks:100' + elif k == 'zombie_pigman': + extra += ',Anger:200s,HurtBy:"61699b2e-d327-4a01-9f1e-0ea8c3f06bc6"' + elif k in ('slime', 'magma_cube'): + extra += ',Size:2' + elif k in ('ghast',): + extra = 'ExplosionPower:3' + elif k.endswith('illager') and k != 'evocation_illager': + extra += ',Johnny:1b' if k == 'vindication_illager' else '' + add(k, extra + ',' + EFFECTS + ',' + ATTRS + ',Health:%d.0f,CustomName:"%s",CustomNameVisible:%db,Tags:["scene","t%d"]' % ( + 5 + i, k.title() + ' ' + str(i), i % 2, i)) + add('skeleton', 'SkeletonType:0b,' + equipment(3)) + add('zombie', 'ZombieType:0,' + equipment(4)) + add('zombie_villager', 'Profession:1,ConversionTime:-1,IsVillager:1b') + for prof in range(6): + add('zombie_villager', 'Profession:%d,ConversionTime:%d,IsBaby:%db,CustomName:"Zombie %d"' % (prof, [-1, 999999, -1][prof % 3], prof % 2, prof)) + add('zombie', 'IsVillager:1b,VillagerProfession:2') + # animals + for color in range(16): + add('sheep', 'Color:%db,Sheared:%db,Age:%d,InLove:0,%s' % (color, color % 2, -24000 if color % 3 == 0 else 0, ATTRS if color == 3 else 'Health:8.0f')) + for color in range(16): + add('wolf', 'CollarColor:%db,Sitting:%db,Angry:%db,%s' % (color, color % 2, color % 5 == 0, 'Owner:"61699b2e-d327-4a01-9f1e-0ea8c3f06bc6",OwnerUUID:"61699b2e-d327-4a01-9f1e-0ea8c3f06bc6"' if color % 2 else 'Health:8.0f')) + for cat in range(4): + add('ocelot', 'CatType:%d,Sitting:%db,Owner:"Dinnerbone"' % (cat, cat % 2)) + for r in (0, 1, 2, 3, 4, 5, 99): + add('rabbit', 'RabbitType:%d,MoreCarrotTicks:%d' % (r, r * 3)) + for v in range(5): + add('parrot', 'Variant:%d,Sitting:%db,OwnerUUID:"61699b2e-d327-4a01-9f1e-0ea8c3f06bc6"' % (v, v % 2)) + for kind in ('pig', 'cow', 'chicken', 'mooshroom', 'polar_bear', 'squid', 'bat', 'snowman', 'villager_golem'): + extra = equipment(5) if kind not in ('bat', 'squid') else '' + if kind == 'pig': + extra = 'Saddle:1b,' + extra + if kind == 'chicken': + extra = 'IsChickenJockey:0b,EggLayTime:5000,' + extra + if kind == 'bat': + extra = 'BatFlags:1b' + if kind == 'snowman': + extra = 'Pumpkin:1b' + if kind == 'villager_golem': + extra = 'PlayerCreated:1b' + add(kind, extra) + # horses + for v in (0, 1, 256, 513, 769, 1024, 1027, 4, 258): + add('horse', 'Variant:%d,Temper:%d,Tame:1b,Bred:%db,EatingHaystack:0b,HasReproduced:0b,OwnerUUID:"61699b2e-d327-4a01-9f1e-0ea8c3f06bc6",' + 'ArmorItem:%s,SaddleItem:%s' % (v, 50 + v % 40, v % 2, item(['iron', 'golden', 'diamond'][v % 3] + '_horse_armor'), item('saddle'))) + add('donkey', 'ChestedHorse:1b,Items:%s,Tame:1b,SaddleItem:%s' % (slotted([item('wool', damage=3), item('apple'), item('dye', damage=15)], 2), item('saddle'))) + add('mule', 'ChestedHorse:1b,Items:%s,Tame:0b' % slotted([item('log', damage=1, count=5)], 2)) + add('skeleton_horse', 'SkeletonTrap:1b,SkeletonTrapTime:100,Tame:1b') + add('zombie_horse', 'Tame:1b') + for v in range(4): + add('llama', 'Variant:%d,Strength:%d,Tame:1b,ChestedHorse:1b,DecorItem:%s,Items:%s,Temper:20' + % (v, 1 + v, item('carpet', damage=v * 4 + 1), slotted([item('wool', damage=v), item('stone', damage=v)], 2))) + # villagers + for prof in range(6): + for career in (1, 2): + add('villager', 'Profession:%d,Career:%d,CareerLevel:%d,Riches:%d,Willing:%db,%s,Inventory:%s,Age:%d' % ( + prof, career, 1 + career, prof * 5, prof % 2, trades(3 + prof), '[%s]' % item('wheat_seeds', 4) if prof % 2 else '[]', -24000 if prof == 3 else 0)) + add('villager', 'Profession:0,Offers:{Recipes:[]}') + # armor stands + for i in range(10): + add('armor_stand', 'ShowArms:%db,Small:%db,NoBasePlate:%db,Invisible:%db,Marker:%db,DisabledSlots:%d,CustomName:"Stand %d",%s,' + 'Pose:{Head:[%d.0f,10.0f,0.0f],Body:[0.0f,%d.0f,5.0f],LeftArm:[-10.0f,0.0f,-10.0f],RightLeg:[1.0f,2.0f,3.0f]}' + % (i % 2, (i // 2) % 2, i % 3 == 0, i % 4 == 0, i % 5 == 0, i * 64, i, equipment(i), i * 5, i * 3)) + # dropped items and orbs + for i, s in enumerate(stacks.stacks[::37][:16]): + add('item', 'Item:%s,Age:100,PickupDelay:32767,Health:5,Owner:"Upgrader",Thrower:"Upgrader"' % s) + add('xp_orb', 'Value:50s,Age:100s,Health:5') + # minecarts and boats + add('minecart', 'CustomDisplayTile:1b,DisplayTile:"minecraft:stone",DisplayData:2,DisplayOffset:8,CustomName:"Cart"') + add('chest_minecart', 'Items:%s,DisplayTile:"minecraft:chest",DisplayData:0,DisplayOffset:6' % stacks.items(20)) + add('chest_minecart', 'LootTable:"minecraft:chests/abandoned_mineshaft",LootTableSeed:7L') + add('furnace_minecart', 'PushX:1.0d,PushZ:0.0d,Fuel:3000s') + add('hopper_minecart', 'Items:%s,Enabled:0b,TransferCooldown:4' % stacks.items(5)) + add('tnt_minecart', 'TNTFuse:100', late=True) + add('commandblock_minecart', 'Command:"say hello",LastOutput:%s,TrackOutput:1b,CustomName:"Commander"' % js({'text': '[@] hello'})) + add('spawner_minecart', 'SpawnData:{id:"minecraft:pig"},SpawnPotentials:[{Entity:{id:"minecraft:cow"},Weight:3}],SpawnCount:2s,Delay:100s,RequiredPlayerRange:1s') + for wood in WOODS: + add('boat', 'Type:%s' % q(wood)) + add('boat', 'Passengers:[{id:"minecraft:villager",Profession:2},{id:"minecraft:pig"}]') + # riding stacks + add('chicken', 'Passengers:[{id:"minecraft:zombie",IsBaby:1b,%s}]' % equipment(2)) + add('spider', 'Passengers:[{id:"minecraft:skeleton",HandItems:[%s,{}]}]' % item('bow')) + add('horse', 'Passengers:[{id:"minecraft:skeleton",Passengers:[{id:"minecraft:parrot",Variant:3}]}],Tame:1b') + add('pig', 'Leashed:1b,Leash:{UUIDMost:%dL,UUIDLeast:%dL}' % (UUID_HI, 99)) + add('cow', 'Leashed:1b,Leash:{X:%d,Y:%d,Z:%d}' % (BX + 10, LAYERS[0], BZ + 10)) + add('enderman', 'carried:"minecraft:grass",carriedData:0s,' + equipment(1)) + add('enderman', 'carried:2s,carriedData:0s') + add('enderman', 'carried:"minecraft:log",carriedData:3s') + add('enderman', 'carried:35s,carriedData:5s') + add('enderman', 'carried:"minecraft:wool",carriedData:11s') + add('enderman', 'carried:"minecraft:stained_hardened_clay",carriedData:2s') + # the last tick: things that move, expire, or need a wall + for i, m in enumerate(['Kebab', 'Aztec', 'Alban', 'Aztec2', 'Bomb', 'Plant', 'Wasteland', 'Pool', 'Courbet', 'Sea', 'Sunset', 'Creebet', + 'Wanderer', 'Graham', 'Match', 'Bust', 'Stage', 'Void', 'SkullAndRoses', 'Wither', 'Fighters', 'Pointer', + 'Pigscene', 'BurningSkull', 'Skeleton', 'DonkeyKong']): + add('painting', 'Motive:%s,Facing:%db' % (q(m), i % 4), late=True, stay=False) + for i in range(10): + add('item_frame', 'Facing:%db,ItemRotation:%db,ItemDropChance:%d.0f,Item:%s' % (i % 4, i % 8, 1, item( + ['wool', 'stained_hardened_clay', 'dye', 'filled_map', 'log', 'skull', 'banner', 'potion', 'fish', 'spawn_egg'][i], damage=i + 3)), late=True, stay=False) + add('item_frame', 'Facing:0b', late=True, stay=False) + for i, (blk, data, te) in enumerate([('sand', 0, None), ('gravel', 0, None), ('anvil', 5, None), ('chest', 2, 'Items:[%s]' % item('wool', 1, 4, slot=0)), + ('log', 6, None), ('concrete_powder', 11, None), ('stained_hardened_clay', 14, None), + ('standing_sign', 3, 'Text1:%s' % js({'text': 'falling'}))]): + add('falling_block', 'Block:"minecraft:%s",Data:%db,Time:1,DropItem:1b,HurtEntities:%db,FallHurtMax:40,FallHurtAmount:2.0f%s' + % (blk, data, i % 2, (',TileEntityData:{%s}' % te) if te else ''), late=True) + add('falling_block', 'TileID:12,Data:1b,Time:1,DropItem:1b', late=True) + add('falling_block', 'TileID:35,Data:14b,Time:1', late=True) + add('tnt', 'Fuse:80b', late=True) + for i, (kind, extra) in enumerate([ + ('arrow', 'inTile:"minecraft:stone",inData:0b,inGround:1b,xTile:1,yTile:2,zTile:3,life:10s,shake:2b,pickup:1b,player:1b,damage:2.0d,crit:1b'), + ('arrow', 'inTile:"minecraft:planks",inData:3b,inGround:1b,pickup:2b'), + ('arrow', 'inTile:5s,inData:2b,inGround:1b,xTile:4,yTile:5,zTile:6'), + ('arrow', 'inTile:35,inData:7b,inGround:1b'), + ('spectral_arrow', 'inTile:"minecraft:log",inData:2b,inGround:1b,Duration:100'), + ('arrow', 'Potion:"minecraft:strong_poison",CustomPotionEffects:[{Id:1b,Amplifier:0b,Duration:100}],Color:255'), + ('potion', 'Potion:%s' % item('splash_potion', tag='{Potion:"minecraft:poison"}')), + ('potion', 'Potion:%s,inTile:0' % item('lingering_potion', tag='{Potion:"minecraft:long_regeneration"}')), + ('potion', 'Potion:%s' % item('splash_potion', damage=16453)), + ('egg', 'inTile:"minecraft:stone",inGround:1b'), ('snowball', 'inTile:"minecraft:dirt",inData:1b'), + ('ender_pearl', 'inTile:"minecraft:stone"'), ('xp_bottle', ''), ('eye_of_ender_signal', ''), + ('fireball', 'direction:[0.0d,-0.1d,0.0d],power:[0.0d,-0.1d,0.0d],ExplosionPower:2,inTile:"minecraft:netherrack"'), + ('small_fireball', 'direction:[0.0d,0.0d,0.0d],power:[0.0d,0.0d,0.0d]'), ('wither_skull', 'Invulnerable:1b,direction:[0.0d,0.0d,0.0d]'), + ('shulker_bullet', 'Steps:5,TXD:0.1d,TYD:0.0d,TZD:0.1d,Target:{L:5L,M:7L}'), ('llama_spit', ''), ('evocation_fangs', 'Warmup:5'), + ('ender_crystal', 'ShowBottom:1b,BeamTarget:{X:%d,Y:%d,Z:%d}' % (BX, LAYERS[0], BZ)), ('ender_crystal', 'ShowBottom:0b'), + ('fireworks_rocket', 'Life:0,LifeTime:5000,FireworksItem:%s' % item('fireworks', 1, 0, '{Fireworks:{Flight:1b,Explosions:[{Type:2b,Colors:[I;255]}]}}')), + ('area_effect_cloud', 'Particle:"mobSpell",Radius:3.0f,Duration:600000,Age:3,WaitTime:20,ReapplicationDelay:20,DurationOnUse:0.0f,RadiusOnUse:0.0f,' + 'RadiusPerTick:0.0f,Color:16711680,Potion:"minecraft:strong_healing",Effects:[{Id:1b,Amplifier:1b,Duration:100}]'), + ('area_effect_cloud', 'Particle:"blockcrack",ParticleParam1:1,ParticleParam2:0,Radius:2.0f,Duration:600000,Potion:"minecraft:water"'), + ('area_effect_cloud', 'Particle:"iconcrack",ParticleParam1:35,ParticleParam2:3,Radius:1.0f,Duration:600000'), + ('area_effect_cloud', 'Particle:"reddust",Radius:1.0f,Duration:600000,Owner:"Dinnerbone"')]): + add(kind, extra, late=True) + return E + + +def summon_all(scene, stacks, late): + pk = Packer(scene.layers, stride=3, zstep=4) + for i, (kind, nbt, is_late, stay) in enumerate(entity_list(stacks)): + if is_late != late: + continue + x, y, z = pk.cell() + fields = uuid_tag(i + 1) + ',' + STAY + if nbt: + fields += ',' + nbt + if kind in ('painting', 'item_frame', 'leash_knot'): + fields += ',TileX:%d,TileY:%d,TileZ:%d' % (x, y + 1, z) + scene.summon(kind, x, y + 1, z, fields, late) + else: + scene.summon(kind, x + 0.5, y, z + 0.5, fields, late) + + +def entities(scene, stacks): + summon_all(scene, stacks, False) + + +def late_content(scene, stacks): + """Everything that is placed in the last tick, on platforms of its own (so that it can be wiped and redone).""" + scene.layers.fresh() + start = scene.layers.next + transient_blocks(scene, stacks) + summon_all(scene, stacks, True) + scene.late_layers = LAYERS[start:scene.layers.next] + scene.layers.fresh() + + +def wipe_late(scene): + """Commands that remove the last tick's content again, if it has to be redone.""" + cmds = [] + for y in scene.late_layers: + cmds.append(f'kill @e[type=!player,x={BX},y={y - 2},z={BZ},dx={SIZE},dy=14,dz={SIZE}]') + for x in range(BX, BX + SIZE, 32): + for z in range(BZ, BZ + SIZE, 32): + cmds.append(f'fill {x} {y - 2} {z} {x + 31} {y + 11} {z + 31} minecraft:air 0') + cmds.append(f'fill {BX} {y - 2} {BZ} {BX + SIZE - 1} {y - 1} {BZ + SIZE - 1} minecraft:stone 0') + return cmds + + +# ------------------------------------------------------------------ player, scoreboard, advancements +PLAYER = 'Upgrader' +LAB = (BX + 56, 150, BZ + 107) # a stone platform in the air where the bot works; (x, floor y, z) + + +def inventory_commands(stacks): + cmds = [] + pool = [s for s in stacks.stacks if not s.numeric and s.name != 'air'] + # a hand-picked start of the hotbar, then the sweep + hot = [item('map'), item('map'), item('map'), item('iron_hoe', 1, 249), item('stone', 64), item('flint_and_steel', 1, 63), + item('wool', 64, 14), item('cobblestone', 32), item('torch', 20)] + for i, st in enumerate(hot): + cmds.append(f'replaceitem entity {PLAYER} slot.hotbar.{i} {st.command_args()}') + pool = [item('log', 16, 2), item('diamond_pickaxe', 1, 1560, '{%s}' % ench((32, 5), (34, 3)))] + pool + for i in range(26): + st = pool[(i * 41 + 7) % len(pool)] if i > 1 else pool[i] + cmds.append(f'replaceitem entity {PLAYER} slot.inventory.{i} {st.command_args()}') + armor = [('feet', item('leather_boots', 1, 12, '{%s}' % display('Boots', color=255))), + ('legs', item('iron_leggings', 1, 20, '{%s}' % ench((0, 4), (34, 3)))), + ('chest', item('elytra', 1, 100)), + ('head', item('skull', 1, 3, '{SkullOwner:{Id:"61699b2e-d327-4a01-9f1e-0ea8c3f06bc6",Name:"Dinnerbone",' + 'Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6e319"}]}}}'))] + for slot, st in armor: + cmds.append(f'replaceitem entity {PLAYER} slot.armor.{slot} {st.command_args()}') + cmds.append(f'replaceitem entity {PLAYER} slot.weapon.offhand {item("shield", 1, 7, "{BlockEntityTag:{Base:11,Patterns:[{Pattern:%s,Color:3}]}}" % q("bs")).command_args()}') + for i in range(27): + st = pool[(i * 17 + 300) % len(pool)] + cmds.append(f'replaceitem entity {PLAYER} slot.enderchest.{i} {st.command_args()}') + return cmds + + +OBJECTIVES = [('dummy1', 'dummy', 'Dummy "quoted" objective'), ('kills', 'playerKillCount', 'Kills'), ('mined', 'stat.mineBlock.minecraft.stone', 'Mined stone'), + ('crafted', 'stat.craftItem.minecraft.stick', None), ('usedsword', 'stat.useItem.minecraft.diamond_sword', 'Swung'), + ('brokenpick', 'stat.breakItem.minecraft.iron_pickaxe', None), ('pickedup', 'stat.pickup.minecraft.dirt', None), + ('dropped', 'stat.drop.minecraft.cobblestone', None), ('killedzombie', 'stat.killEntity.Zombie', 'Zombies'), + ('killedbyskel', 'stat.entityKilledBy.Skeleton', None), ('walked', 'stat.walkOneCm', 'Walk'), ('jumps', 'stat.jump', None), + ('kbt_red', 'killedByTeam.red', None), ('tk_blue', 'teamkill.blue', None), ('hp', 'health', 'Health'), ('foodlvl', 'food', None), + ('airlvl', 'air', None), ('armorlvl', 'armor', None), ('xplvl', 'xp', None), ('levels', 'level', None), ('deaths', 'deathCount', 'Deaths'), + ('totalkills', 'totalKillCount', None), ('trig', 'trigger', 'A trigger'), ('chest_open', 'stat.chestOpened', None), + ('mine_log', 'stat.mineBlock.minecraft.log', None), ('killed_pig', 'stat.killEntity.Pig', None)] + + +def scoreboard_commands(): + cmds = [] + for name, crit, disp in OBJECTIVES: + cmds.append(f'scoreboard objectives add {name} {crit}' + (f' {disp}' if disp else '')) + cmds += ['scoreboard objectives setdisplay sidebar kills', 'scoreboard objectives setdisplay list hp', + 'scoreboard objectives setdisplay belowName deaths', 'scoreboard objectives setdisplay sidebar.team.red mined', + 'scoreboard objectives setdisplay sidebar.team.dark_blue walked'] + colors = ['black', 'dark_blue', 'dark_green', 'dark_aqua', 'dark_red', 'dark_purple', 'gold', 'gray', 'dark_gray', 'blue', 'green', + 'aqua', 'red', 'light_purple', 'yellow', 'white'] + for i, c in enumerate(colors): + cmds.append(f'scoreboard teams add t_{c} Team {c.replace("_", " ").title()}') + cmds.append(f'scoreboard teams option t_{c} color {c}') + cmds.append(f'scoreboard teams option t_{c} friendlyfire {"true" if i % 2 else "false"}') + cmds.append(f'scoreboard teams option t_{c} seeFriendlyInvisibles {"true" if i % 3 else "false"}') + cmds.append(f'scoreboard teams option t_{c} nametagVisibility {["always", "never", "hideForOtherTeams", "hideForOwnTeam"][i % 4]}') + cmds.append(f'scoreboard teams option t_{c} deathMessageVisibility {["always", "never", "hideForOtherTeams", "hideForOwnTeam"][(i + 1) % 4]}') + cmds.append(f'scoreboard teams option t_{c} collisionRule {["always", "never", "pushOtherTeams", "pushOwnTeam"][i % 4]}') + cmds += ['scoreboard teams join t_red ' + PLAYER, 'scoreboard teams join t_blue Fakeplayer1 Fakeplayer2', + 'scoreboard teams join t_gold Zombie'] + for i, (name, crit, disp) in enumerate(OBJECTIVES): + if crit in ('health', 'food', 'air', 'armor', 'xp', 'level'): + continue # read-only criteria + cmds.append(f'scoreboard players set {PLAYER} {name} {i * 7 - 3}') + cmds.append(f'scoreboard players set Fakeplayer{1 + i % 2} {name} {i}') + cmds += ['scoreboard players enable ' + PLAYER + ' trig', 'scoreboard players tag ' + PLAYER + ' add scene', + 'scoreboard players tag ' + PLAYER + ' add second', 'scoreboard players add ' + PLAYER + ' kills 5', + 'scoreboard players operation ' + PLAYER + ' dummy1 = Fakeplayer1 dummy1'] + return cmds + + +def advancement_commands(): + biomes = ['forest', 'plains', 'ocean', 'river', 'taiga', 'roofed_forest', 'extreme_hills', 'swampland', 'beaches', 'savanna'] + mobs = ['zombie', 'skeleton', 'spider', 'creeper', 'enderman', 'blaze', 'witch'] + cmds = ['advancement grant ' + PLAYER + ' only minecraft:adventure/root', + 'advancement grant ' + PLAYER + ' only minecraft:story/root', + 'advancement grant ' + PLAYER + ' only minecraft:story/mine_stone', + 'advancement grant ' + PLAYER + ' only minecraft:husbandry/root', + 'advancement grant ' + PLAYER + ' until minecraft:story/upgrade_tools', + 'advancement grant ' + PLAYER + ' only minecraft:nether/root', + 'advancement grant ' + PLAYER + ' only minecraft:end/root'] + cmds += ['advancement grant %s only minecraft:adventure/adventuring_time %s' % (PLAYER, b) for b in biomes] + cmds += ['advancement grant %s only minecraft:adventure/kill_all_mobs %s' % (PLAYER, m) for m in mobs] + cmds += ['advancement grant %s only minecraft:husbandry/bred_all_animals %s' % (PLAYER, m) for m in ('pig', 'cow', 'sheep')] + cmds += ['advancement grant %s only minecraft:husbandry/balanced_diet %s' % (PLAYER, m) for m in ('apple', 'bread', 'cooked_beef')] + cmds += ['recipe give %s *' % PLAYER] + return cmds + + +def lab_commands(): + x, y, z = LAB + cmds = [f'fill {x - 6} {y - 1} {z - 6} {x + 6} {y - 1} {z + 6} minecraft:stone 0', + f'fill {x - 6} {y} {z - 6} {x + 6} {y + 4} {z + 6} minecraft:air 0'] + return cmds + + +# ------------------------------------------------------------------ the bot works in the lab: real statistics and maps +def lab_actions(server, bot, problems): + """Everything here is done by the bot with real packets, so the server records genuine statistics.""" + x, y, z = LAB + pause = time.sleep + cx, cz = x + 0.5, z + 0.5 + say = lambda cmds: batch(server, cmds, problems) + say(lab_commands() + [f'tp {PLAYER} {cx} {y} {cz}']) + pause(1.5) + # containers around the bot + ring = [(-3, -3, 'chest', 2), (-2, -3, 'trapped_chest', 2), (-1, -3, 'ender_chest', 2), (0, -3, 'furnace', 2), (1, -3, 'crafting_table', 0), + (2, -3, 'enchanting_table', 0), (3, -3, 'anvil', 0), (-3, 3, 'hopper', 0), (-2, 3, 'dispenser', 3), (-1, 3, 'dropper', 3), + (0, 3, 'brewing_stand', 0), (1, 3, 'beacon', 0), (2, 3, 'white_shulker_box', 1), (3, 3, 'jukebox', 0), (-3, -1, 'noteblock', 0), + (-3, 0, 'cake', 0), (-3, 1, 'cauldron', 1)] + say([f'setblock {x + dx} {y} {z + dz} minecraft:{n} {d} replace' for dx, dz, n, d in ring]) + say([f'fill {x - 3} {y - 1} {z - 5} {x + 3} {y - 1} {z - 5} minecraft:grass 0', + f'setblock {x - 3} {y} {z - 5} minecraft:red_flower 0 replace', f'setblock {x - 2} {y} {z - 5} minecraft:yellow_flower 0 replace', + f'setblock {x - 1} {y} {z - 5} minecraft:tallgrass 1 replace', f'setblock {x} {y} {z - 5} minecraft:sapling 2 replace', + f'setblock {x + 1} {y} {z - 5} minecraft:red_flower 3 replace', f'setblock {x + 2} {y} {z - 5} minecraft:double_plant 0 replace', + f'setblock {x + 3} {y} {z - 5} minecraft:deadbush 0 replace']) + pause(1) + # open them all: right click with an empty hand + bot.held(8) + for dx, dz, n, d in ring: + bot.place(x + dx, y, z + dz, 1) + pause(0.25) + bot.send(0x08, varint0(0)) + pause(0.5) + # note block: hit it, the cake is eaten by the right click above + bot.send(0x14, bytes([0]) + pos_long(x - 3, y, z - 1) + bytes([1])) + pause(0.3) + # walk to the plants and pick them: mined blocks, picked up items, walked distance + for i in range(7): + bot.move(x - 3 + i + 0.5, y, z - 4 + 0.5) + pause(0.2) + bot.dig(x - 3 + i, y, z - 5) + pause(0.4) + # walk, sneak, sprint and jump a little + px, pz = x + 0.5, z - 3.5 + for i in range(24): + px += 0.2 + bot.move(px, y, pz) + pause(0.06) + bot.send(0x15, varint0(3) + varint0(0) + varint0(0)) + for i in range(24): + px -= 0.25 + bot.move(px, y, pz) + pause(0.06) + bot.send(0x15, varint0(4) + varint0(0) + varint0(0)) + bot.send(0x15, varint0(0) + varint0(0) + varint0(0)) + for i in range(10): + px += 0.1 + bot.move(px, y, pz) + pause(0.06) + bot.send(0x15, varint0(1) + varint0(0) + varint0(0)) + for i in range(3): + bot.send(0x0D, struct.pack('>dddB', px, y + 0.42, pz, 0)) + pause(0.15) + bot.send(0x0D, struct.pack('>dddB', px, y, pz, 1)) + pause(0.4) + bot.move(cx, y, cz) + pause(0.3) + # place blocks with the items in the hotbar + for slot, target in ((4, (0, 1)), (6, (2, 1)), (7, (4, 1)), (8, (-2, 2))): + bot.held(slot) + pause(0.2) + for k in range(3): + bot.place(x + target[0] + k, y - 1, z + target[1] + 1, 1) + pause(0.2) + # a hoe used up, flint and steel used up + bot.held(3) + pause(0.2) + bot.place(x - 3, y - 1, z - 5, 1) + pause(0.4) + bot.held(5) + pause(0.2) + bot.place(x + 4, y - 1, z, 1) + pause(0.4) + # drop an item + bot.held(7) + pause(0.2) + bot.send(0x14, varint0(4) + pos_long(0, 0, 0) + bytes([0])) + pause(0.3) + # kill a few mobs + for kind, tid in (('pig', 90), ('zombie', 54), ('skeleton', 51), ('cow', 92), ('sheep', 91)): + say([f'summon {kind} {x + 1.5} {y} {z + 1.5} {{NoAI:1b,Health:1.0f,Tags:["labvictim"],PersistenceRequired:1b}}']) + pause(0.6) + eid = max([e for e, t in bot.entities.items() if t == tid], default=None) # the newest one is ours + if eid is not None: + for _ in range(3): + bot.attack(eid) + pause(0.4) + pause(0.3) + say(['kill @e[tag=labvictim]']) + # talk to a villager + say([f'summon villager {x + 1.5} {y} {z - 1.5} {{NoAI:1b,Profession:1,Career:1,Tags:["labvictim"]}}']) + pause(0.6) + eid = max([e for e, t in bot.entities.items() if t == 120], default=None) + if eid is not None: + bot.send(0x0A, varint0(eid) + varint0(0) + varint0(0)) + pause(0.4) + bot.send(0x08, varint0(1)) + say(['kill @e[tag=labvictim]']) + # the maps: slot 0, 1 and 2 hold an empty map each + for slot, (mx, mz) in enumerate(((x, z), (x - 80, z - 60), (x - 40, z - 20))): + if slot: + say([f'fill {mx - 2} {y - 1} {mz - 2} {mx + 2} {y - 1} {mz + 2} minecraft:stone 0', f'tp {PLAYER} {mx + 0.5} {y} {mz + 0.5}']) + pause(1.0) + bot.held(slot) + pause(0.2) + bot.use_item() + pause(5 if slot == 0 else 3) + bot.held(0) + say([f'tp {PLAYER} {cx} {y} {cz}']) + pause(1.5) + # die once, killed by a creeper (keepInventory keeps the player's things), and come back + say(['gamerule keepInventory true', + f'summon creeper {cx} {y} {cz} {{ignited:1b,Fuse:1s,ExplosionRadius:6b,PersistenceRequired:1b,Tags:["labvictim"]}}']) + pause(2.5) + bot.respawn() + pause(2.5) + say(['gamerule keepInventory false', 'kill @e[tag=labvictim]', + f'effect {PLAYER} minecraft:speed 99999 1 true', f'effect {PLAYER} minecraft:night_vision 99999 0 true', + f'effect {PLAYER} minecraft:regeneration 99999 0 false', f'tp {PLAYER} {BX}.5 {LAYERS[0]} {BZ}.5']) + pause(1.5) + + +def varint0(v): + out = b'' + while True: + b = v & 0x7F + v >>= 7 + out += bytes([b | (0x80 if v else 0)]) + if not v: + return out + + +# Slow commands at the start of the last batch: while the server executes them the rest of the batch arrives, so that +# it all runs in one tick (the server runs queued console commands until its list is empty). +def barrier(): + return [f'fill {BX + dx} 108 {BZ + dz} {BX + dx + 31} 113 {BZ + dz + 31} minecraft:{b} 0' + for b in ('stone', 'air', 'stone', 'air') for dx in (0, 32, 64) for dz in (0, 32, 64)] + + +def set_origin(bx, bz): + """Move the whole scene (the flat world has its spawn chunks elsewhere).""" + global BX, BZ, LAB + BX, BZ = bx, bz + LAB = (bx + 56, 150, bz + 107) + + +LAST = {} + + +def populate(server, Bot, port, protocol, name, problems): + """Build the whole 1.12.2 scene, save it for good and return the (still joined) bot.""" + harness = sys.modules[Bot.__module__] + Player = make_player(Bot, harness.varint, harness.parse_varint, harness.mcstring) + stacks = Stacks() + scene = Scene() + build_blocks(scene, stacks) + entities(scene, stacks) + late_content(scene, stacks) + LAST['scene'] = scene + say = lambda cmds, **kw: batch(server, cmds, problems, **kw) + say(['gamerule randomTickSpeed 0', 'gamerule doDaylightCycle false', 'gamerule doWeatherCycle false', 'gamerule doMobSpawning false', + 'gamerule doFireTick false', 'gamerule mobGriefing false', 'gamerule announceAdvancements false', 'gamerule spawnRadius 7', + 'gamerule sceneRule fixture', 'gamerule logAdminCommands true', 'time set 6000', 'weather clear 999999', 'difficulty 2', + 'worldborder set 59999968', 'worldborder damage amount 0.25', 'worldborder warning distance 7']) + say(scene.cmds) + bot = Player(port, protocol, name) + time.sleep(3) + say(inventory_commands(stacks)) + say([f'xp 117L {name}', f'xp 29 {name}', f'effect {name} minecraft:speed 99999 1 true', f'effect {name} minecraft:night_vision 99999 0 true', + f'spawnpoint {name} {BX} {LAYERS[0]} {BZ}', f'gamemode survival {name}']) + say(scoreboard_commands()) + say(advancement_commands()) + try: + lab_actions(server, bot, problems) + except OSError as error: # the server dropped the bot + problems.append(('lab_actions', ['the bot lost its connection: %s' % error])) + time.sleep(2) + say(['save-all flush']) + bot.leave() # the player's data, statistics and advancements are written when the bot leaves + time.sleep(2) + # The last tick: transient states and entities, then the save. A normal stop would save the chunks again, + # after those states have changed (it ignores `save-off`), so the server is killed once the save is done. + # `time query gametime` before and after tells whether a tick ran in between (the server executes a queue of + # console commands in one tick unless the queue runs dry); if so the content is wiped and placed again. + slow = barrier() + batch_commands = ['time query gametime'] + slow + scene.late + ['save-all flush', 'time query gametime'] + for attempt in range(5): + kept = len(problems) + if attempt: + say(wipe_late(scene)) + out = say(batch_commands, chunk=len(batch_commands) + 5) + times = [m.group(1) for o in (out[0], out[-1]) for l in o for m in [re.search(r'Time is (\d+)', l)] if m] + if len(times) == 2 and times[0] == times[1]: + break + del problems[kept:] + print(f' the last tick was split ({times}), again') + else: + problems.append(('last tick', ['the transient states were not saved in one tick'])) + time.sleep(1) + server.process.kill() + server.process.wait() + try: + server.process.stdin.close() + except OSError: + pass + return bot + + +# ------------------------------------------------------------------ after the server stopped +HAND_STATS = { + # HAND-WRITTEN FIXTURE: statistics that the passive bot cannot cause (they are added only where the real + # server's file lacks the key), in the exact key format of a 1.12.2 stats file. + 'stat.craftItem.minecraft.planks': 12, 'stat.craftItem.minecraft.stick': 8, 'stat.craftItem.minecraft.crafting_table': 1, + 'stat.craftItem.minecraft.wooden_pickaxe': 1, 'stat.craftItem.minecraft.spawn_egg': 2, 'stat.craftItem.minecraft.dye': 3, + 'stat.craftItem.minecraft.stained_hardened_clay': 4, 'stat.useItem.minecraft.stone': 40, 'stat.useItem.minecraft.log': 6, + 'stat.useItem.minecraft.wooden_pickaxe': 17, 'stat.useItem.minecraft.spawn_egg': 3, 'stat.useItem.minecraft.bed': 1, + 'stat.mineBlock.minecraft.stone': 55, 'stat.mineBlock.minecraft.log': 14, 'stat.mineBlock.minecraft.log2': 3, + 'stat.mineBlock.minecraft.dirt': 31, 'stat.mineBlock.minecraft.grass': 9, 'stat.mineBlock.minecraft.leaves': 22, + 'stat.mineBlock.minecraft.coal_ore': 4, 'stat.mineBlock.minecraft.iron_ore': 2, 'stat.mineBlock.minecraft.wool': 3, + 'stat.mineBlock.minecraft.stained_hardened_clay': 1, 'stat.mineBlock.minecraft.double_plant': 2, + 'stat.breakItem.minecraft.wooden_pickaxe': 1, 'stat.breakItem.minecraft.diamond_pickaxe': 1, 'stat.breakItem.minecraft.shears': 1, + 'stat.breakItem.minecraft.spawn_egg': 1, 'stat.pickup.minecraft.dirt': 31, 'stat.pickup.minecraft.log': 14, 'stat.pickup.minecraft.cobblestone': 50, + 'stat.pickup.minecraft.spawn_egg': 1, 'stat.pickup.minecraft.dye': 2, 'stat.drop.minecraft.cobblestone': 5, 'stat.drop.minecraft.dirt': 2, + 'stat.drop.minecraft.spawn_egg': 1, 'stat.killEntity.Zombie': 7, 'stat.killEntity.Skeleton': 3, 'stat.killEntity.Creeper': 1, + 'stat.killEntity.PigZombie': 1, 'stat.killEntity.LavaSlime': 2, 'stat.killEntity.MushroomCow': 1, 'stat.killEntity.Ozelot': 1, + 'stat.killEntity.ZombieVillager': 1, 'stat.killEntity.EvocationIllager': 1, 'stat.entityKilledBy.Skeleton': 1, 'stat.entityKilledBy.Zombie': 2, + 'stat.entityKilledBy.Creeper': 1, 'stat.entityKilledBy.Spider': 1, 'stat.entityKilledBy.VindicationIllager': 1, + 'stat.walkOneCm': 8240, 'stat.crouchOneCm': 310, 'stat.sprintOneCm': 4500, 'stat.swimOneCm': 120, 'stat.fallOneCm': 1500, + 'stat.climbOneCm': 220, 'stat.flyOneCm': 90, 'stat.diveOneCm': 60, 'stat.minecartOneCm': 700, 'stat.boatOneCm': 400, 'stat.pigOneCm': 30, + 'stat.horseOneCm': 1200, 'stat.aviateOneCm': 800, 'stat.jump': 66, 'stat.damageDealt': 410, 'stat.damageTaken': 188, 'stat.deaths': 3, + 'stat.mobKills': 17, 'stat.animalsBred': 4, 'stat.playerKills': 0, 'stat.fishCaught': 2, 'stat.talkedToVillager': 5, + 'stat.tradedWithVillager': 2, 'stat.cakeSlicesEaten': 2, 'stat.cauldronFilled': 1, 'stat.cauldronUsed': 3, 'stat.armorCleaned': 1, + 'stat.bannerCleaned': 2, 'stat.brewingstandInteraction': 4, 'stat.beaconInteraction': 1, 'stat.dropperInspected': 1, + 'stat.hopperInspected': 2, 'stat.dispenserInspected': 3, 'stat.noteblockPlayed': 6, 'stat.noteblockTuned': 4, 'stat.flowerPotted': 2, + 'stat.trappedChestTriggered': 1, 'stat.enderchestOpened': 3, 'stat.itemEnchanted': 2, 'stat.recordPlayed': 1, + 'stat.furnaceInteraction': 9, 'stat.craftingTableInteraction': 12, 'stat.chestOpened': 15, 'stat.sleepInBed': 2, 'stat.shulkerBoxOpened': 1, + 'stat.sneakTime': 400, +} + + +def fixtures(world): + """Add what a real server could not be made to produce (see HAND_STATS), clearly apart from the real data.""" + world = Path(world) + for f in sorted((world / 'stats').glob('*.json')): + data = json.loads(f.read_text()) + for key, value in HAND_STATS.items(): + data.setdefault(key, value) + f.write_text(json.dumps(data, separators=(',', ':'))) + print(f' stats fixture: {len(data)} counters in {f.name}') + + +# ------------------------------------------------------------------ the flat world +FLAT_OPTIONS = '3;7,2x3,2;1;village,decoration' # 1.12 style: version;layers;biome;features + + +def build_flat(h, force=False): + """`1.12.2-flat`: the same scene on a flat world (generator flat, the settings above), built with the harness + module `h` (tools/datafix_worlds.py).""" + version = '1.12.2' + jar, data_version, protocol = h.server_jar(version) + target = h.SHARED / 'worlds' / (version + '-flat') + if target.exists() and not force: + print(f'{version}-flat: kept {target}') + return [] + work = h.LOCAL / 'gen' / (version + '-flat') + shutil.rmtree(work, ignore_errors=True) + port = 30000 + (h.os.getpid() + data_version + 1) % 20000 + + class FlatServer(h.Server): + def __init__(self, directory): # as Server.__init__, with a flat world + directory.mkdir(parents=True, exist_ok=True) + (directory / 'eula.txt').write_text('eula=true\n') + props = {'server-port': port, 'online-mode': 'false', 'level-name': 'world', 'level-seed': '4242', + 'view-distance': '4', 'spawn-protection': '0', 'enable-rcon': 'false', 'enable-query': 'false', + 'max-tick-time': '-1', 'level-type': 'FLAT', 'generator-settings': FLAT_OPTIONS} + (directory / 'server.properties').write_text(''.join(f'{k}={v}\n' for k, v in props.items())) + self.process = h.subprocess.Popen([h.java(version), '-Xmx2G', '-jar', str(jar), 'nogui'], cwd=directory, + stdin=h.subprocess.PIPE, stdout=h.subprocess.PIPE, stderr=h.subprocess.STDOUT, text=True) + self.lines = [] + self.queue = queue.Queue() + self.counter = 0 + threading.Thread(target=self._pump, daemon=True).start() + self.wait('Done (', 600) + + server = FlatServer(work) + problems = [] + old = (BX, BZ) + set_origin(16, 16) + try: + # A flat world's spawn is found far away; make it (64, 64), and let a bot visit the scene's area so that its chunks + # are loaded (they stay loaded, being within the spawn radius). + batch(server, ['setworldspawn 64 4 64'], problems) + Player = make_player(h.Bot, h.varint, h.parse_varint, h.mcstring) + visitor = Player(port, protocol, h.BOT) + time.sleep(2) + for x, z in ((24, 24), (24, 72), (24, 104), (72, 24), (72, 72), (72, 104), (104, 24), (104, 72), (104, 104), (72, 123), (-8, 63), (32, 103)): + batch(server, [f'tp {h.BOT} {x}.5 4 {z}.5'], problems) + time.sleep(1.5) + batch(server, [f'tp {h.BOT} 64.5 4 64.5'], problems) + time.sleep(1) + visitor.leave() + time.sleep(1) + bot = populate(server, h.Bot, port, protocol, h.BOT, problems) + bot.leave() + finally: + set_origin(*old) + server.stop() + fixtures(work / 'world') + partial = target.with_name(target.name + '.partial') + shutil.rmtree(partial, ignore_errors=True) + target.parent.mkdir(parents=True, exist_ok=True) + shutil.copytree(work / 'world', partial) + (partial / 'datafix-source.json').write_text(json.dumps( + {'version': version, 'data_version': data_version, 'problems': problems, 'flat': FLAT_OPTIONS}, indent=1)) + shutil.rmtree(target, ignore_errors=True) + partial.rename(target) + for command, out in problems: + print(f'{version}-flat: command failed: {command}\n {out}') + print(f'{version}-flat: DataVersion {data_version}, world in {target}') + return problems diff --git a/tools/datafix_worlds.py b/tools/datafix_worlds.py index 6cae508c0..1b944a0c0 100644 --- a/tools/datafix_worlds.py +++ b/tools/datafix_worlds.py @@ -31,6 +31,7 @@ from pathlib import Path sys.path.insert(0, str(Path(__file__).resolve().parent)) import datafix_scene as scene # noqa: E402 +import datafix_scene_12 as scene12 # noqa: E402 ROOT = Path(__file__).resolve().parent.parent LOCAL = ROOT / '.local' / 'datafix' @@ -368,27 +369,32 @@ def build(version, force=False): problems.append((command[:160], bad[:2])) return out - run('forceload add -48 -48 79 79') - run('fill 0 99 0 47 99 47 minecraft:stone') - run('fill 0 100 0 47 112 47 minecraft:air') - for i, (block, nbt) in enumerate(scene.block_entities(era, data_version)): - x, z = 1 + 3 * (i % 15), 1 + 3 * (i // 15) - run(f'setblock {x} 100 {z} minecraft:{block}{nbt}') - for i, (kind, extra) in enumerate(scene.entities(era, data_version)): - x, z = 1.5 + 3 * (i % 15), 25.5 + 3 * (i // 15) - fields = f'UUID:{uuid_nbt(i)},NoAI:1b,Silent:1b,NoGravity:1b,Invulnerable:1b,PersistenceRequired:1b' - run(f'summon minecraft:{kind} {x} 100 {z} {{{fields}' + (',' + extra if extra else '') + '}') - run('setworldspawn 20 101 20') - bot = Bot(port, protocol, BOT) - time.sleep(3) - for command in scene.player_commands(era, BOT, data_version): - run(command) - time.sleep(3) - run('save-all flush') - time.sleep(2) + if data_version < 1631: # 1.12 and older: tools/datafix_scene_12.py builds the scene and saves the world itself + bot = scene12.populate(server, Bot, port, protocol, BOT, problems) + else: + run('forceload add -48 -48 79 79') + run('fill 0 99 0 47 99 47 minecraft:stone') + run('fill 0 100 0 47 112 47 minecraft:air') + for i, (block, nbt) in enumerate(scene.block_entities(era, data_version)): + x, z = 1 + 3 * (i % 15), 1 + 3 * (i // 15) + run(f'setblock {x} 100 {z} minecraft:{block}{nbt}') + for i, (kind, extra) in enumerate(scene.entities(era, data_version)): + x, z = 1.5 + 3 * (i % 15), 25.5 + 3 * (i // 15) + fields = f'UUID:{uuid_nbt(i)},NoAI:1b,Silent:1b,NoGravity:1b,Invulnerable:1b,PersistenceRequired:1b' + run(f'summon minecraft:{kind} {x} 100 {z} {{{fields}' + (',' + extra if extra else '') + '}') + run('setworldspawn 20 101 20') + bot = Bot(port, protocol, BOT) + time.sleep(3) + for command in scene.player_commands(era, BOT, data_version): + run(command) + time.sleep(3) + run('save-all flush') + time.sleep(2) bot.leave() time.sleep(2) server.stop() + if data_version < 1631: + scene12.fixtures(work / 'world') # the few statistics a passive bot cannot cause, written by hand # Copy aside, then rename: an interrupted copy must not look like a finished world. partial = target.with_name(target.name + '.partial') shutil.rmtree(partial, ignore_errors=True) @@ -411,6 +417,8 @@ def main(): args = p.parse_args() for version in args.versions or VERSIONS: build(version, args.force) + if version == '1.12.2': + scene12.build_flat(sys.modules[__name__], args.force) # and the flat world 1.12.2-flat if __name__ == '__main__': From ba20b8eb29722fd28b5b53376276922b2fcdadce Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 02:05:39 +0200 Subject: [PATCH 16/25] Port the fixes of 1.11.2 to 1.12 (keys 1022 and 1125): shoulder entities, bed block entities, bed item colour Co-Authored-By: Claude Sonnet 5.5 --- .../horizon-world/src/datafix/fixes_legacy.rs | 72 +++++++++++++++++++ crates/horizon-world/src/datafix/mod.rs | 2 + 2 files changed, 74 insertions(+) create mode 100644 crates/horizon-world/src/datafix/fixes_legacy.rs diff --git a/crates/horizon-world/src/datafix/fixes_legacy.rs b/crates/horizon-world/src/datafix/fixes_legacy.rs new file mode 100644 index 000000000..538e79f20 --- /dev/null +++ b/crates/horizon-world/src/datafix/fixes_legacy.rs @@ -0,0 +1,72 @@ +//! Fixes of 1.8 to 1.12 (keys 100 to 1125, DataVersion up to 1343): what worlds +//! saved by those versions need before the flattening ([`super::fixes_flat`]). +//! The options fixes of this range (505, 816, 1344) are client settings. +use super::dynamic::{as_int, as_int_stream, set, string}; +use super::mark_read; +use super::schema::{Key, Ty, key}; +use super::{Cx, FixFn, reread_as}; +use crate::nbt::Tag; + +pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { + out.push((key(1022, 0), |cx| { + let k = cx.k; + cx.each(Ty::Player, |p| reread_as(Ty::Player, k, p)) + })); + out.push((key(1125, 0), bed_block_entities)); + out.push((key(1125, 0), |cx| { + cx.item( + |id| id == "minecraft:bed", + |s| { + if as_int(s.get("Damage"), 0) == 0 { + set(s, "Damage", Tag::Short(14)); + } + }, + ) + })); +} + +// ------------------------------------------------------------------ 1125 + +/// `ChunkBedBlockEntityInjecterFix`: a bed block gets the block entity 1.12 gave it. +fn bed_block_entities(cx: &mut Cx) { + cx.each(Ty::Chunk, |chunk| { + let Some(level) = chunk.get_mut("Level") else { + return; + }; + let chunk_x = as_int(level.get("xPos"), 0); + let chunk_z = as_int(level.get("zPos"), 0); + let mut beds = Vec::new(); + if let Some(Tag::List(sections)) = level.get("Sections") { + for section in sections { + let y = as_int(section.get("Y"), 0); + for (p, block) in as_int_stream(section.get("Blocks")) + .unwrap_or_default() + .into_iter() + .enumerate() + { + if (block & 0xFF) << 4 == 416 { + let (x, yy, z) = (p as i32 & 15, p as i32 >> 8 & 15, p as i32 >> 4 & 15); + let mut bed = Tag::compound([ + ("id", string("minecraft:bed")), + ("x", Tag::Int(x + (chunk_x << 4))), + ("y", Tag::Int(yy + (y << 4))), + ("z", Tag::Int(z + (chunk_z << 4))), + ("color", Tag::Short(14)), + ]); + mark_read(&mut bed); + beds.push(bed); + } + } + } + } + if beds.is_empty() { + return; + } + if !matches!(level.get("TileEntities"), Some(Tag::List(_))) { + set(level, "TileEntities", Tag::List(Vec::new())); + } + if let Some(Tag::List(entities)) = level.get_mut("TileEntities") { + entities.extend(beds); + } + }); +} diff --git a/crates/horizon-world/src/datafix/mod.rs b/crates/horizon-world/src/datafix/mod.rs index eca0de51b..7b31a168f 100644 --- a/crates/horizon-world/src/datafix/mod.rs +++ b/crates/horizon-world/src/datafix/mod.rs @@ -19,6 +19,7 @@ mod fixes_b; mod fixes_c; mod fixes_cliffs; mod fixes_flat; +mod fixes_legacy; mod fixes_mid; mod fixes_old; mod flat_tables; @@ -183,6 +184,7 @@ type FixFn = fn(&mut Cx); /// Every ported fix (from the 1.19 schemas on), in DataFixers order. fn fixes() -> Vec<(Key, FixFn)> { let mut out = Vec::new(); + fixes_legacy::register(&mut out); fixes_flat::register(&mut out); fixes_mid::register(&mut out); fixes_cliffs::register(&mut out); From 43155d782286608d582be82fbe5cb4ff313f775a Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 02:32:43 +0200 Subject: [PATCH 17/25] Sample world for 1.11.2, and 1.8.9 to 1.10.2 in the version list datafix_scene_12.py builds one scene for 1.8 to 1.12 from per-era tables (blocks, entity ids and merged types, riding, equipment, potions, items probed on the server, achievements by command instead of advancements). Co-Authored-By: Claude Sonnet 5.5 --- tools/datafix_scene_12.py | 251 ++++++++++++++++++++++++++++++++------ tools/datafix_worlds.py | 4 +- 2 files changed, 217 insertions(+), 38 deletions(-) diff --git a/tools/datafix_scene_12.py b/tools/datafix_scene_12.py index 7b76efc93..851d93adb 100644 --- a/tools/datafix_scene_12.py +++ b/tools/datafix_scene_12.py @@ -27,6 +27,32 @@ BX, BZ, SIZE = 144, 144, 96 # south-west corner and size of the platfor LAYERS = list(range(100, 245, 16)) # platform y levels: one chunk section each, the last one reaches y = 255 UUID_HI = 0x6000 + +# ------------------------------------------------------------------ versions +# One builder for 1.8.9 to 1.12.2; `ERA` is the minor version (8 to 12), set by `set_protocol` from the bot's protocol. +# 1.8: numeric item ids in saves, CamelCase entity and tile entity ids, `Equipment`, `Riding` +# 1.9: `ArmorItems`/`HandItems`, `Passengers`, shulkers, lingering potions, tipped arrows, elytra, chorus, purpur ... +# 1.10: husks and strays (zombie / skeleton types), polar bears, magma, bone blocks, nether wart blocks +# 1.11: namespaced entity ids, evokers, vindicators, vexes, llamas, separate donkeys and so on, shulker boxes, observers +# 1.12: parrots, illusioners, concrete, glazed terracotta, advancements instead of achievements +ERA = 12 +PROTOCOL_ERA = {47: 8, 107: 9, 108: 9, 109: 9, 110: 9, 210: 10, 315: 11, 316: 11, 335: 12, 338: 12, 340: 12} +VALID_ITEMS = None # item names the server accepts (probed at the start), None: everything + + +def set_protocol(protocol): + global ERA + ERA = PROTOCOL_ERA[protocol] + + +def block_ok(name): + """Whether this version has the block (by its numeric id).""" + i = BLOCK_IDS.get(name) + if i is None: + return False + limit = {8: 197, 9: 212, 10: 217, 11: 234, 12: 255}[ERA] + return i <= limit or (i == 255 and ERA >= 9) + # ------------------------------------------------------------------ tables # `id:name=data,ranges` of every 1.12 block state (from vanilla's BlockStateData), id = numeric block id. BLOCKS = """ @@ -174,6 +200,8 @@ def q(s): def js(obj): """A JSON text as an NBT string (1.12 stores text components as JSON strings).""" + if isinstance(obj, str) and ERA < 12: + obj = {'text': obj} # before 1.12 a JSON string primitive makes the command fail return q(json.dumps(obj, separators=(',', ':'))) @@ -195,6 +223,8 @@ class Stack(str): def item(name, count=1, damage=0, tag=None, slot=None, numeric=None): """An item stack compound. `numeric`: write the 1.7 style numeric `id:Ns` instead of the name.""" + if VALID_ITEMS is not None and numeric is None and name not in VALID_ITEMS: + name, tag = 'stick', None # an item this version lacks parts = [] if slot is not None: parts.append(f'Slot:{slot}b') @@ -367,6 +397,8 @@ class Scene: (self.late if late else self.cmds).append(c) def block(self, x, y, z, name, data=0, tag=None, late=False, expect=True): + if not block_ok(name): + return if name in TWO_STEP and data: self.cmd(f'setblock {x} {y} {z} {full(name)} 0 replace', late) c = f'setblock {x} {y} {z} {full(name)} {data} replace' + (f' {tag}' if tag else '') @@ -401,6 +433,63 @@ OLD_NAMES = {'cave_spider': 'CaveSpider', 'elder_guardian': 'ElderGuardian', 'ev 'wither_skeleton': 'WitherSkeleton', 'zombie_horse': 'ZombieHorse', 'zombie_pigman': 'PigZombie', 'zombie_villager': 'ZombieVillager', 'villager_golem': 'VillagerGolem', 'snowman': 'SnowMan', 'illusion_illager': 'IllusionIllager'} +# Entity ids by era. 1.11 on: `minecraft:` snake_case names (as in `MOBS`); before: CamelCase ids and merged types. +CAMEL = { + 'zombie': 'Zombie', 'skeleton': 'Skeleton', 'creeper': 'Creeper', 'spider': 'Spider', 'cave_spider': 'CaveSpider', + 'silverfish': 'Silverfish', 'endermite': 'Endermite', 'blaze': 'Blaze', 'ghast': 'Ghast', 'witch': 'Witch', 'giant': 'Giant', + 'guardian': 'Guardian', 'shulker': 'Shulker', 'zombie_pigman': 'PigZombie', 'slime': 'Slime', 'magma_cube': 'LavaSlime', + 'enderman': 'Enderman', 'bat': 'Bat', 'squid': 'Squid', 'pig': 'Pig', 'cow': 'Cow', 'chicken': 'Chicken', + 'mooshroom': 'MushroomCow', 'sheep': 'Sheep', 'wolf': 'Wolf', 'ocelot': 'Ozelot', 'horse': 'EntityHorse', + 'rabbit': 'Rabbit', 'polar_bear': 'PolarBear', 'villager': 'Villager', 'villager_golem': 'VillagerGolem', + 'snowman': 'SnowMan', 'armor_stand': 'ArmorStand', 'painting': 'Painting', 'item_frame': 'ItemFrame', + 'leash_knot': 'LeashKnot', 'item': 'Item', 'xp_orb': 'XPOrb', 'minecart': 'MinecartRideable', + 'chest_minecart': 'MinecartChest', 'furnace_minecart': 'MinecartFurnace', 'hopper_minecart': 'MinecartHopper', + 'tnt_minecart': 'MinecartTNT', 'spawner_minecart': 'MinecartSpawner', 'commandblock_minecart': 'MinecartCommandBlock', + 'boat': 'Boat', 'tnt': 'PrimedTnt', 'falling_block': 'FallingSand', 'arrow': 'Arrow', 'spectral_arrow': 'SpectralArrow', + 'potion': 'ThrownPotion', 'egg': 'ThrownEgg', 'snowball': 'Snowball', 'ender_pearl': 'ThrownEnderpearl', + 'xp_bottle': 'ThrownExpBottle', 'eye_of_ender_signal': 'EyeOfEnderSignal', 'fireball': 'Fireball', + 'small_fireball': 'SmallFireball', 'dragon_fireball': 'DragonFireball', 'wither_skull': 'WitherSkull', + 'shulker_bullet': 'ShulkerBullet', 'ender_crystal': 'EnderCrystal', 'fireworks_rocket': 'FireworksRocketEntity', + 'area_effect_cloud': 'AreaEffectCloud', +} +# types that were one entity with a type field before 1.11: kind -> (CamelCase id, extra NBT) +MERGED = { + 'wither_skeleton': ('Skeleton', 'SkeletonType:1b'), 'stray': ('Skeleton', 'SkeletonType:2b'), 'husk': ('Zombie', 'ZombieType:6'), + 'zombie_villager': ('Zombie', 'ZombieType:2'), 'donkey': ('EntityHorse', 'Type:1'), 'mule': ('EntityHorse', 'Type:2'), + 'zombie_horse': ('EntityHorse', 'Type:3'), 'skeleton_horse': ('EntityHorse', 'Type:4'), 'elder_guardian': ('Guardian', 'Elder:1b'), +} +ABSENT = { # kinds a version lacks + 8: {'shulker', 'shulker_bullet', 'area_effect_cloud', 'spectral_arrow', 'dragon_fireball', 'polar_bear', 'husk', 'stray', + 'vex', 'evocation_illager', 'vindication_illager', 'illusion_illager', 'llama', 'llama_spit', 'evocation_fangs', 'parrot'}, + 9: {'polar_bear', 'husk', 'stray', 'vex', 'evocation_illager', 'vindication_illager', 'illusion_illager', 'llama', + 'llama_spit', 'evocation_fangs', 'parrot'}, + 10: {'vex', 'evocation_illager', 'vindication_illager', 'illusion_illager', 'llama', 'llama_spit', 'evocation_fangs', 'parrot'}, + 11: {'parrot', 'illusion_illager'}, + 12: set(), +} + + +def entity_form(kind, profession=None): + """(summon id, extra NBT) of an entity kind in this era, None if the version lacks it.""" + if kind in ABSENT[ERA]: + return None + if ERA >= 11: + return kind, '' + if kind in MERGED: + sid, extra = MERGED[kind] + if kind == 'zombie_villager': + extra = 'IsVillager:1b' if ERA == 8 else 'ZombieType:%d' % (1 + (profession or 0) % 5) + return sid, extra + return CAMEL[kind], '' + + +def eid(kind): + """The quoted `id` for a kind inside NBT.""" + form = entity_form(kind) + sid = form[0] if form else kind + return q(sid if ERA <= 10 else 'minecraft:' + sid) + + BANNER_PATTERNS = ['b', 'bs', 'ls', 'rs', 'ts', 'ms', 'drs', 'dls', 'ss', 'cr', 'sc', 'bt', 'tt', 'bts', 'tts', 'ld', 'rd', 'lud', 'rud', 'mc', 'mr', 'vh', 'hh', 'vhr', 'hhb', 'bo', 'cbo', 'br', 'tl', 'bl', 'tr', 'gra', 'gru', 'bri', 'sku', 'cre', 'flo', 'moj', 'cs'] @@ -437,7 +526,12 @@ def sweep_stacks(): (160, 7), (159, 14), (251, 3), (425, 0), (397, 5), (298, 0), (276, 12)]: out.append(item('air', damage=d, numeric=nid)) # potions in all four shapes - for kind in ('potion', 'splash_potion', 'lingering_potion', 'tipped_arrow'): + if ERA == 8: # before 1.9 a potion is its damage value: effect, level and extended / splash bits + for d in list(range(0, 64)) + [8193, 8194, 8195, 8196, 8197, 8198, 8200, 8201, 8202, 8204, 8205, 8206, 8225, 8226, 8228, 8229, 8233, + 8234, 8236, 8257, 8258, 8259, 8260, 8261, 8262, 8264, 8265, 8266, 8270, 16385, 16386, 16387, 16388, + 16389, 16392, 16393, 16394, 16396, 16418, 16420, 16421, 16449, 16450, 16451, 16452, 16453, 16457, 16458]: + out.append(item('potion', damage=d)) + for kind in ('potion', 'splash_potion', 'lingering_potion', 'tipped_arrow') if ERA >= 9 else (): for p in POTIONS: out.append(item(kind, count=1 if kind != 'tipped_arrow' else 7, tag='{Potion:%s}' % q('minecraft:' + p))) out.append(item(kind, tag='{CustomPotionEffects:[{Id:1b,Amplifier:1b,Duration:600,Ambient:0b,ShowParticles:1b},' @@ -453,7 +547,9 @@ def sweep_stacks(): out.append(item('diamond_sword', tag='{ench:[{id:16s,lvl:32767s},{id:-1s,lvl:0s}],Unbreakable:1b,HideFlags:63}')) # spawn eggs, old style: the entity id in EntityTag for i, m in enumerate(MOBS): - out.append(item('spawn_egg', tag='{EntityTag:{id:%s}}' % q('minecraft:' + m))) + if entity_form(m) is None: + continue + out.append(item('spawn_egg', tag='{EntityTag:{id:%s}}' % eid(m))) if m in OLD_NAMES or i % 3 == 0: out.append(item('spawn_egg', tag='{EntityTag:{id:%s,CustomName:"Egg %d"}}' % (q(OLD_NAMES.get(m, m.title())), i))) out.append(item('spawn_egg', damage=50, tag='{EntityTag:{id:"minecraft:creeper",powered:1b}}')) @@ -543,6 +639,8 @@ class Stacks: def __init__(self): self.stacks = sweep_stacks() + if VALID_ITEMS is not None: # the items this version lacks became sticks: keep one + self.stacks = list(dict.fromkeys(self.stacks)) self.i = 0 def take(self, n): @@ -555,13 +653,17 @@ class Stacks: # ------------------------------------------------------------------ block entities -SIGN_TEXTS = [ +def sign_texts(): + """(a function: `js` depends on the era)""" + return [ [js({'text': 'Hello'}), js({'text': 'World', 'color': 'red', 'bold': True}), js({'text': ''}), js({'text': 'x', 'extra': [{'text': 'a', 'italic': True}]})], [js('plain string'), js({'text': 'click', 'clickEvent': {'action': 'run_command', 'value': '/say hi'}}), js({'text': 'hover', 'hoverEvent': {'action': 'show_text', 'value': {'text': 'tip'}}}), js({'text': 'selector', 'extra': [{'selector': '@p'}]})], [js({'translate': 'chat.type.text', 'with': ['a', 'b']}), js({'score': {'name': 'Upgrader', 'objective': 'kills'}}), js([{'text': 'l1'}, {'text': 'l2'}]), js('')], [q(''), q(''), q(''), q('')], ] + + SKULL_PROFILE = ('Owner:{Id:"61699b2e-d327-4a01-9f1e-0ea8c3f06bc6",Name:"Dinnerbone",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6e319"}]}}') COMMANDS = ['say hi', 'tp @p ~ ~1 ~', 'execute @e[type=Zombie] ~ ~ ~ detect ~ ~-1 ~ stone 0 say hi', 'scoreboard players set @a kills 1', 'give @p minecraft:wool 1 5', 'setblock ~ ~1 ~ minecraft:stone', 'testfor @a', 'playsound minecraft:entity.pig.ambient master @a'] @@ -609,11 +711,12 @@ def tag_for(name, data, k, stacks): k, k % 3 - 1, 1 + k % 2, -k % 3, 2 + k % 5, 3, 4, q(['NONE', 'CLOCKWISE_90', 'CLOCKWISE_180', 'COUNTERCLOCKWISE_90'][k % 4]), q(['NONE', 'LEFT_RIGHT', 'FRONT_BACK'][k % 3]), q(['SAVE', 'LOAD', 'CORNER', 'DATA'][data & 3]), k % 2, k * 77, k % 2, k % 2) if name in ('standing_sign', 'wall_sign'): - text = SIGN_TEXTS[k % len(SIGN_TEXTS)] + texts = sign_texts() + text = texts[k % len(texts)] return ','.join('Text%d:%s' % (i + 1, text[i]) for i in range(4)) if name == 'mob_spawner': - mob = MOBS[k % len(MOBS)] - spawn = 'SpawnData:{id:%s}' % q(OLD_NAMES.get(mob, mob.title()) if k % 2 else 'minecraft:' + mob) + mob = [m for m in MOBS if entity_form(m)][k % len([m for m in MOBS if entity_form(m)])] + spawn = 'SpawnData:{id:%s}' % (q(OLD_NAMES.get(mob, mob.title())) if k % 2 else eid(mob)) if k % 3 == 0: spawn = ('SpawnData:{id:"minecraft:zombie",HandItems:[%s,{}],ArmorItems:[{},{},{},%s],CustomName:"Spawned",Health:5.0f},' 'SpawnPotentials:[{Entity:{id:"minecraft:skeleton",HandItems:[%s,{}]},Weight:2},{Entity:{id:"Pig"},Weight:1}]' @@ -670,7 +773,7 @@ def sweep_blocks(scene, stacks): pockets = Packer(scene.layers, stride=3, zstep=4) k = 0 for name in sorted(BLOCK_STATES, key=lambda n: BLOCK_IDS[n]): - if name in SPECIAL: + if name in SPECIAL or not block_ok(name): continue datas = BLOCK_STATES[name] pk = name in POCKETS @@ -720,6 +823,14 @@ def make_player(Bot, varint, parse_varint, mcstring): pass def handle(self, pid, data): + if self.protocol < 340: # 1.8.9 (47) to 1.11.2 (316): only stay joined + if self.protocol == 47 and pid == 0x00: # keep alive: a VarInt + self.send(0x00, data) + elif self.protocol > 47 and pid == 0x1F: # keep alive: a long + self.send(0x0B, data[:8]) + elif self.protocol > 47 and pid == 0x2E: # player position and look: confirm the teleport + self.send(0x00, varint(parse_varint(data, 33)[1])) + return if pid == 0x1F: # keep alive self.send(0x0B, data[:8]) elif pid == 0x2F: # player position and look @@ -850,7 +961,7 @@ def skulls(scene): pk = Packer(scene.layers, stride=2, zstep=3) k = 0 for data in BLOCK_STATES['skull']: - for kind in range(6): + for kind in range(6 if ERA >= 9 else 5): for rot in (range(16) if data == 1 else [0] if data in (0, 8) else [k % 16]): x, y, z = pk.cell() tag = 'SkullType:%db,Rot:%db' % (kind, rot) @@ -929,6 +1040,7 @@ def edges(scene): 'spruce_fence_gate', 'birch_fence_gate', 'jungle_fence_gate', 'dark_oak_fence_gate', 'acacia_fence_gate', 'tripwire', 'cobblestone_wall', 'chorus_plant', 'melon_stem', 'pumpkin_stem', 'snow_layer', 'cauldron', 'standing_sign', 'mob_spawner'] + virtual = [n for n in virtual if block_ok(n)] y = scene.layers.take() k = 0 cells = [] @@ -1008,7 +1120,7 @@ def transient_blocks(scene, stacks): scene.block(x + 1, y, z, 'redstone_block', 0, late=late, expect=False) scene.block(x, y, z, 'hopper', data, '{Items:%s,TransferCooldown:%d}' % (stacks.items(5), data % 4), late=late) # observers, powered ones included - for data in range(6): # (the powered states only come from a pulse that takes ticks) + for data in range(6) if block_ok('observer') else (): # (the powered states only come from a pulse that takes ticks) x, y, z = pk.cell() scene.block(x, y, z, 'observer', data, late=late) # liquids of every level, still and flowing @@ -1020,7 +1132,7 @@ def transient_blocks(scene, stacks): for age in range(16): x, y, z = pk.cell() scene.block(x, y, z, 'fire', age, late=late) - for age in range(4): + for age in range(4) if block_ok('frosted_ice') else (): x, y, z = pk.cell() scene.block(x, y, z, 'frosted_ice', age, late=late) # nether portals in both axes: obsidian frames, then the portal blocks with one fill @@ -1052,7 +1164,7 @@ def top(scene, stacks): scene.block(x + 7, 253, z, 'bed', 9, '{color:14}') scene.block(x + 10, 255, z, 'standing_banner', 3, banner_tag(5, 3)) scene.block(x + 12, 250, z, 'shulker_box' if False else 'purple_shulker_box', 5, '{Items:%s}' % stacks.items(5)) - scene.block(x + 14, 255, z, 'mob_spawner', 0, '{SpawnData:{id:"minecraft:ghast"},MaxNearbyEntities:6s,RequiredPlayerRange:1s}') + scene.block(x + 14, 255, z, 'mob_spawner', 0, '{SpawnData:{id:%s},MaxNearbyEntities:6s,RequiredPlayerRange:1s}' % eid('ghast')) for i in range(8): # and the very bottom of the world, next to the bedrock scene.block(BX + 2 + 2 * i, 5 + i, BZ + 3, 'sponge', i % 2) scene.block(BX + 2 + 2 * i, 1, BZ + 5, 'wool', i) @@ -1089,6 +1201,8 @@ def equipment(i, stacks=None): item(['iron', 'golden', 'diamond', 'chainmail'][i % 4] + '_leggings', damage=i % 30), item(['iron', 'golden', 'diamond', 'chainmail'][(i + 1) % 4] + '_chestplate', damage=i % 30, tag='{%s}' % ench((0, 2), (7, 3))), (item('skull', damage=i % 6) if i % 4 == 0 else item('pumpkin') if i % 4 == 1 else item('wool', damage=i % 16) if i % 4 == 2 else item('diamond_helmet', damage=7, tag='{%s}' % ench((5, 2))))] + if ERA == 8: # before 1.9: one list, the held item first and then boots, leggings, chestplate and helmet + return 'Equipment:[%s,%s],DropChances:[0.085f,0.0f,1.0f,%.2ff,%.3ff]' % (hand, ','.join(armor), 0.1 * (i % 5), 0.05 * (i % 7)) return ('HandItems:[%s,%s],ArmorItems:[%s],HandDropChances:[0.085f,%.3ff],ArmorDropChances:[0.085f,0.0f,1.0f,%.2ff]' % (hand, off, ','.join(armor), 0.05 * (i % 7), 0.1 * (i % 5))) @@ -1121,6 +1235,19 @@ def entity_list(stacks): def add(kind, nbt='', late=False, stay=True): E.append((kind, nbt, late, stay)) + def ride(mount, mount_nbt, riders): + """From 1.9 a mount lists its `Passengers`; before, the rider has a `Riding` mount (one rider only).""" + if ERA >= 9: + text = ','.join('{id:%s%s}' % (eid(k), (',' + n) if n else '') for k, n in riders) + add(mount, 'Passengers:[%s]' % text + (',' + mount_nbt if mount_nbt else '')) + else: + form = entity_form(mount) + mid = form[0] if form else mount + rider, rnbt = riders[0] + rform = entity_form(rider) + add(rider, (rnbt + ',' if rnbt else '') + 'Riding:{id:%s%s%s}' % (q(mid), (',' + form[1]) if form and form[1] else '', + (',' + mount_nbt) if mount_nbt else '')) + # monsters for i, k in enumerate(['zombie', 'husk', 'skeleton', 'stray', 'wither_skeleton', 'creeper', 'spider', 'cave_spider', 'silverfish', 'endermite', 'blaze', 'ghast', 'witch', 'giant', 'guardian', 'elder_guardian', 'shulker', 'vex', @@ -1197,7 +1324,7 @@ def entity_list(stacks): 'Pose:{Head:[%d.0f,10.0f,0.0f],Body:[0.0f,%d.0f,5.0f],LeftArm:[-10.0f,0.0f,-10.0f],RightLeg:[1.0f,2.0f,3.0f]}' % (i % 2, (i // 2) % 2, i % 3 == 0, i % 4 == 0, i % 5 == 0, i * 64, i, equipment(i), i * 5, i * 3)) # dropped items and orbs - for i, s in enumerate(stacks.stacks[::37][:16]): + for i, s in enumerate([s for s in stacks.stacks if VALID_ITEMS is None or s.numeric is None][::37][:16]): add('item', 'Item:%s,Age:100,PickupDelay:32767,Health:5,Owner:"Upgrader",Thrower:"Upgrader"' % s) add('xp_orb', 'Value:50s,Age:100s,Health:5') # minecarts and boats @@ -1211,11 +1338,11 @@ def entity_list(stacks): add('spawner_minecart', 'SpawnData:{id:"minecraft:pig"},SpawnPotentials:[{Entity:{id:"minecraft:cow"},Weight:3}],SpawnCount:2s,Delay:100s,RequiredPlayerRange:1s') for wood in WOODS: add('boat', 'Type:%s' % q(wood)) - add('boat', 'Passengers:[{id:"minecraft:villager",Profession:2},{id:"minecraft:pig"}]') + ride('boat', '', [('villager', 'Profession:2'), ('pig', '')]) # riding stacks - add('chicken', 'Passengers:[{id:"minecraft:zombie",IsBaby:1b,%s}]' % equipment(2)) - add('spider', 'Passengers:[{id:"minecraft:skeleton",HandItems:[%s,{}]}]' % item('bow')) - add('horse', 'Passengers:[{id:"minecraft:skeleton",Passengers:[{id:"minecraft:parrot",Variant:3}]}],Tame:1b') + ride('chicken', '', [('zombie', 'IsBaby:1b,' + equipment(2))]) + ride('spider', '', [('skeleton', (('HandItems:[%s,{}]' if ERA >= 9 else 'Equipment:[%s,{},{},{},{}]') % item('bow')))]) + ride('horse', 'Tame:1b', [('skeleton', 'Passengers:[{id:%s,Variant:3}]' % eid('parrot') if ERA >= 12 else '')]) add('pig', 'Leashed:1b,Leash:{UUIDMost:%dL,UUIDLeast:%dL}' % (UUID_HI, 99)) add('cow', 'Leashed:1b,Leash:{X:%d,Y:%d,Z:%d}' % (BX + 10, LAYERS[0], BZ + 10)) add('enderman', 'carried:"minecraft:grass",carriedData:0s,' + equipment(1)) @@ -1234,7 +1361,7 @@ def entity_list(stacks): ['wool', 'stained_hardened_clay', 'dye', 'filled_map', 'log', 'skull', 'banner', 'potion', 'fish', 'spawn_egg'][i], damage=i + 3)), late=True, stay=False) add('item_frame', 'Facing:0b', late=True, stay=False) for i, (blk, data, te) in enumerate([('sand', 0, None), ('gravel', 0, None), ('anvil', 5, None), ('chest', 2, 'Items:[%s]' % item('wool', 1, 4, slot=0)), - ('log', 6, None), ('concrete_powder', 11, None), ('stained_hardened_clay', 14, None), + ('log', 6, None), ('concrete_powder' if ERA == 12 else 'sand', 11, None), ('stained_hardened_clay', 14, None), ('standing_sign', 3, 'Text1:%s' % js({'text': 'falling'}))]): add('falling_block', 'Block:"minecraft:%s",Data:%db,Time:1,DropItem:1b,HurtEntities:%db,FallHurtMax:40,FallHurtAmount:2.0f%s' % (blk, data, i % 2, (',TileEntityData:{%s}' % te) if te else ''), late=True) @@ -1248,9 +1375,10 @@ def entity_list(stacks): ('arrow', 'inTile:35,inData:7b,inGround:1b'), ('spectral_arrow', 'inTile:"minecraft:log",inData:2b,inGround:1b,Duration:100'), ('arrow', 'Potion:"minecraft:strong_poison",CustomPotionEffects:[{Id:1b,Amplifier:0b,Duration:100}],Color:255'), - ('potion', 'Potion:%s' % item('splash_potion', tag='{Potion:"minecraft:poison"}')), - ('potion', 'Potion:%s,inTile:0' % item('lingering_potion', tag='{Potion:"minecraft:long_regeneration"}')), - ('potion', 'Potion:%s' % item('splash_potion', damage=16453)), + ('potion', 'Potion:%s' % (item('splash_potion', tag='{Potion:"minecraft:poison"}') if ERA >= 9 else item('potion', damage=16388))), + ('potion', 'Potion:%s,inTile:0' % (item('lingering_potion', tag='{Potion:"minecraft:long_regeneration"}') if ERA >= 9 + else item('potion', damage=16385))), + ('potion', 'Potion:%s' % (item('splash_potion', damage=16453) if ERA >= 9 else item('potion', damage=16453))), ('egg', 'inTile:"minecraft:stone",inGround:1b'), ('snowball', 'inTile:"minecraft:dirt",inData:1b'), ('ender_pearl', 'inTile:"minecraft:stone"'), ('xp_bottle', ''), ('eye_of_ender_signal', ''), ('fireball', 'direction:[0.0d,-0.1d,0.0d],power:[0.0d,-0.1d,0.0d],ExplosionPower:2,inTile:"minecraft:netherrack"'), @@ -1272,15 +1400,20 @@ def summon_all(scene, stacks, late): for i, (kind, nbt, is_late, stay) in enumerate(entity_list(stacks)): if is_late != late: continue + form = entity_form(kind, i) + if form is None: + continue x, y, z = pk.cell() fields = uuid_tag(i + 1) + ',' + STAY + if form[1]: + fields += ',' + form[1] if nbt: fields += ',' + nbt if kind in ('painting', 'item_frame', 'leash_knot'): fields += ',TileX:%d,TileY:%d,TileZ:%d' % (x, y + 1, z) - scene.summon(kind, x, y + 1, z, fields, late) + scene.summon(form[0], x, y + 1, z, fields, late) else: - scene.summon(kind, x + 0.5, y, z + 0.5, fields, late) + scene.summon(form[0], x + 0.5, y, z + 0.5, fields, late) def entities(scene, stacks): @@ -1320,6 +1453,8 @@ def inventory_commands(stacks): # a hand-picked start of the hotbar, then the sweep hot = [item('map'), item('map'), item('map'), item('iron_hoe', 1, 249), item('stone', 64), item('flint_and_steel', 1, 63), item('wool', 64, 14), item('cobblestone', 32), item('torch', 20)] + if ERA < 12: # nobody uses the maps here: the server makes the map files of filled maps in a player's inventory + hot[:3] = [item('filled_map', 1, i) for i in range(3)] for i, st in enumerate(hot): cmds.append(f'replaceitem entity {PLAYER} slot.hotbar.{i} {st.command_args()}') pool = [item('log', 16, 2), item('diamond_pickaxe', 1, 1560, '{%s}' % ench((32, 5), (34, 3)))] + pool @@ -1328,12 +1463,13 @@ def inventory_commands(stacks): cmds.append(f'replaceitem entity {PLAYER} slot.inventory.{i} {st.command_args()}') armor = [('feet', item('leather_boots', 1, 12, '{%s}' % display('Boots', color=255))), ('legs', item('iron_leggings', 1, 20, '{%s}' % ench((0, 4), (34, 3)))), - ('chest', item('elytra', 1, 100)), + ('chest', item('elytra', 1, 100) if ERA >= 9 else item('diamond_chestplate', 1, 100)), ('head', item('skull', 1, 3, '{SkullOwner:{Id:"61699b2e-d327-4a01-9f1e-0ea8c3f06bc6",Name:"Dinnerbone",' 'Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6e319"}]}}}'))] for slot, st in armor: cmds.append(f'replaceitem entity {PLAYER} slot.armor.{slot} {st.command_args()}') - cmds.append(f'replaceitem entity {PLAYER} slot.weapon.offhand {item("shield", 1, 7, "{BlockEntityTag:{Base:11,Patterns:[{Pattern:%s,Color:3}]}}" % q("bs")).command_args()}') + if ERA >= 9: + cmds.append(f'replaceitem entity {PLAYER} slot.weapon.offhand {item("shield", 1, 7, "{BlockEntityTag:{Base:11,Patterns:[{Pattern:%s,Color:3}]}}" % q("bs")).command_args()}') for i in range(27): st = pool[(i * 17 + 300) % len(pool)] cmds.append(f'replaceitem entity {PLAYER} slot.enderchest.{i} {st.command_args()}') @@ -1367,7 +1503,8 @@ def scoreboard_commands(): cmds.append(f'scoreboard teams option t_{c} seeFriendlyInvisibles {"true" if i % 3 else "false"}') cmds.append(f'scoreboard teams option t_{c} nametagVisibility {["always", "never", "hideForOtherTeams", "hideForOwnTeam"][i % 4]}') cmds.append(f'scoreboard teams option t_{c} deathMessageVisibility {["always", "never", "hideForOtherTeams", "hideForOwnTeam"][(i + 1) % 4]}') - cmds.append(f'scoreboard teams option t_{c} collisionRule {["always", "never", "pushOtherTeams", "pushOwnTeam"][i % 4]}') + if ERA >= 9: + cmds.append(f'scoreboard teams option t_{c} collisionRule {["always", "never", "pushOtherTeams", "pushOwnTeam"][i % 4]}') cmds += ['scoreboard teams join t_red ' + PLAYER, 'scoreboard teams join t_blue Fakeplayer1 Fakeplayer2', 'scoreboard teams join t_gold Zombie'] for i, (name, crit, disp) in enumerate(OBJECTIVES): @@ -1375,8 +1512,8 @@ def scoreboard_commands(): continue # read-only criteria cmds.append(f'scoreboard players set {PLAYER} {name} {i * 7 - 3}') cmds.append(f'scoreboard players set Fakeplayer{1 + i % 2} {name} {i}') - cmds += ['scoreboard players enable ' + PLAYER + ' trig', 'scoreboard players tag ' + PLAYER + ' add scene', - 'scoreboard players tag ' + PLAYER + ' add second', 'scoreboard players add ' + PLAYER + ' kills 5', + tags = ['scoreboard players tag ' + PLAYER + ' add scene', 'scoreboard players tag ' + PLAYER + ' add second'] if ERA >= 9 else [] + cmds += ['scoreboard players enable ' + PLAYER + ' trig', *tags, 'scoreboard players add ' + PLAYER + ' kills 5', 'scoreboard players operation ' + PLAYER + ' dummy1 = Fakeplayer1 dummy1'] return cmds @@ -1399,6 +1536,11 @@ def advancement_commands(): return cmds +def achievement_commands(): + """Before 1.12: the achievements and the statistics are given by command.""" + return [f'achievement give * {PLAYER}'] + [f'achievement take achievement.{a} {PLAYER}' for a in ('theEnd2', 'overpowered', 'snipeSkeleton')] + + def lab_commands(): x, y, z = LAB cmds = [f'fill {x - 6} {y - 1} {z - 6} {x + 6} {y - 1} {z + 6} minecraft:stone 0', @@ -1545,6 +1687,28 @@ def varint0(v): # Slow commands at the start of the last batch: while the server executes them the rest of the batch arrives, so that # it all runs in one tick (the server runs queued console commands until its list is empty). +def spawn_origin(server, say): + """Where to build: around the world spawn, whose chunks stay loaded (96 x 96 blocks, on chunk borders).""" + say(['save-all']) + time.sleep(2) + import anvil_dump + level = anvil_dump.read_dat(str(server.directory / 'world' / 'level.dat'))['Data'] + return (level['SpawnX'] - 48) // 16 * 16, (level['SpawnZ'] - 48) // 16 * 16 + + +def probe_items(server, say, names): + """The item names this version knows (an unknown id is dropped when a chest loads its items).""" + x, y, z = BX + 1, 150, BZ + 1 + cmds = [f'fill {x - 1} {y - 1} {z - 1} {x + 1} {y - 1} {z + 1} minecraft:stone 0'] + for n in names: + cmds += [f'setblock {x} {y} {z} minecraft:chest 2 replace {{Items:[{{Slot:0b,id:"minecraft:{n}",Count:1b,Damage:0s}}]}}', + f'testforblock {x} {y} {z} minecraft:chest -1 {{Items:[{{id:"minecraft:{n}"}}]}}'] + out = batch(server, cmds, [], quiet=True) + good = {n for n, o in zip(names, out[2::2]) if any('Successfully' in l for l in o)} + batch(server, [f'fill {x - 1} {y - 1} {z - 1} {x + 1} {y} {z + 1} minecraft:air 0'], [], quiet=True) + return good + + def barrier(): return [f'fill {BX + dx} 108 {BZ + dz} {BX + dx + 31} 113 {BZ + dz + 31} minecraft:{b} 0' for b in ('stone', 'air', 'stone', 'air') for dx in (0, 32, 64) for dz in (0, 32, 64)] @@ -1564,29 +1728,42 @@ def populate(server, Bot, port, protocol, name, problems): """Build the whole 1.12.2 scene, save it for good and return the (still joined) bot.""" harness = sys.modules[Bot.__module__] Player = make_player(Bot, harness.varint, harness.parse_varint, harness.mcstring) + set_protocol(protocol) + say = lambda cmds, **kw: batch(server, cmds, problems, **kw) + if ERA < 12: + global VALID_ITEMS + VALID_ITEMS = None + origin = spawn_origin(server, say) + set_origin(*origin) + VALID_ITEMS = probe_items(server, say, ITEMS) stacks = Stacks() scene = Scene() build_blocks(scene, stacks) entities(scene, stacks) late_content(scene, stacks) LAST['scene'] = scene - say = lambda cmds, **kw: batch(server, cmds, problems, **kw) say(['gamerule randomTickSpeed 0', 'gamerule doDaylightCycle false', 'gamerule doWeatherCycle false', 'gamerule doMobSpawning false', - 'gamerule doFireTick false', 'gamerule mobGriefing false', 'gamerule announceAdvancements false', 'gamerule spawnRadius 7', - 'gamerule sceneRule fixture', 'gamerule logAdminCommands true', 'time set 6000', 'weather clear 999999', 'difficulty 2', + 'gamerule doFireTick false', 'gamerule mobGriefing false', 'gamerule sceneRule fixture', 'gamerule logAdminCommands true', + *(['gamerule announceAdvancements false', 'gamerule spawnRadius 7'] if ERA == 12 else []), 'time set 6000', 'weather clear 999999', 'difficulty 2', 'worldborder set 59999968', 'worldborder damage amount 0.25', 'worldborder warning distance 7']) say(scene.cmds) bot = Player(port, protocol, name) time.sleep(3) say(inventory_commands(stacks)) - say([f'xp 117L {name}', f'xp 29 {name}', f'effect {name} minecraft:speed 99999 1 true', f'effect {name} minecraft:night_vision 99999 0 true', + say([f'xp 117L {name}', f'xp 29 {name}', + *([f'effect {name} minecraft:speed 99999 1 true', f'effect {name} minecraft:night_vision 99999 0 true'] if ERA == 12 else + [f'effect {name} 1 99999 1 true', f'effect {name} 16 99999 0 true']), f'spawnpoint {name} {BX} {LAYERS[0]} {BZ}', f'gamemode survival {name}']) say(scoreboard_commands()) - say(advancement_commands()) - try: - lab_actions(server, bot, problems) - except OSError as error: # the server dropped the bot - problems.append(('lab_actions', ['the bot lost its connection: %s' % error])) + if ERA == 12: + say(advancement_commands()) + try: + lab_actions(server, bot, problems) + except OSError as error: # the server dropped the bot + problems.append(('lab_actions', ['the bot lost its connection: %s' % error])) + else: + say(achievement_commands()) + time.sleep(3) # the inventory ticks once: the server creates the maps time.sleep(2) say(['save-all flush']) bot.leave() # the player's data, statistics and advancements are written when the bot leaves @@ -1602,7 +1779,7 @@ def populate(server, Bot, port, protocol, name, problems): if attempt: say(wipe_late(scene)) out = say(batch_commands, chunk=len(batch_commands) + 5) - times = [m.group(1) for o in (out[0], out[-1]) for l in o for m in [re.search(r'Time is (\d+)', l)] if m] + times = [m.group(1) for o in (out[0], out[-1]) for l in o for m in [re.search(r'[Tt]ime is (\d+)', l)] if m] if len(times) == 2 and times[0] == times[1]: break del problems[kept:] diff --git a/tools/datafix_worlds.py b/tools/datafix_worlds.py index 3c1f0b027..81c039cb7 100644 --- a/tools/datafix_worlds.py +++ b/tools/datafix_worlds.py @@ -38,7 +38,7 @@ LOCAL = ROOT / '.local' / 'datafix' # Old server jars and their worlds are inputs, not outputs: keep them beside the # vanilla data, which parallel worktrees share (.local/minecraft links there). SHARED = (ROOT / '.local' / 'minecraft').resolve().parent / 'datafix' -VERSIONS = ['1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.1', '1.16.5', '1.17.1', '1.18.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4', '1.20.5', '1.20.6', '1.21.1', +VERSIONS = ['1.8.9', '1.9.4', '1.10.2', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.1', '1.16.5', '1.17.1', '1.18.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4', '1.20.5', '1.20.6', '1.21.1', '1.21.3', '1.21.4', '1.21.5', '1.21.6', '1.21.8', '1.21.9', '1.21.10', '1.21.11', '26.1', '26.1.2', '26.2'] # Extra worlds of one version with another world type, for the level.dat generator settings: # name -> (version, server.properties). They get no scene, only a joined player. @@ -154,6 +154,7 @@ def install_runtime(pin, home): class Server: def __init__(self, directory, jar, port, packs=(), java='java', props_override=None): directory.mkdir(parents=True, exist_ok=True) + self.directory = directory (directory / 'eula.txt').write_text('eula=true\n') props = {'server-port': port, 'online-mode': 'false', 'level-name': 'world', 'level-seed': '4242', 'view-distance': '4', 'simulation-distance': '4', 'spawn-protection': '0', 'sync-chunk-writes': 'true', @@ -405,6 +406,7 @@ def build_scene(server, run, Bot, port, protocol, props, era, data_version): def build(name, force=False): version, props = VARIANTS.get(name, (name, None)) jar, data_version, protocol = server_jar(version) + data_version = data_version or 0 # 1.8 saves have no DataVersion target = SHARED / 'worlds' / name if target.exists() and not force: print(f'{version}: kept {target}') From c46ac98b1a24b3185441464053b081cace08e49a Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 02:33:59 +0200 Subject: [PATCH 18/25] Port the fixes of 1.9 to 1.12 (keys 100 to 820) and read names and arrays like DataFixerUpper Entity, block entity and item schemas below 1.11 (CamelCase ids, Equipment, Riding, numeric item ids), their read hooks, and the fixes: equipment, item ids, potions, spawn eggs, spawners, minecarts, UUIDs, health, saddles, paintings, riding, signs and books, the 1.10 splits, id namespacing, banners, shulkers, totems. 1.11.2 passes the bands 1343 and 1631. Co-Authored-By: Claude Sonnet 5.5 --- .../horizon-world/src/datafix/fixes_legacy.rs | 725 +++++++++++++++++- .../horizon-world/src/datafix/flat_tables.rs | 425 ++++++++++ crates/horizon-world/src/datafix/items.rs | 39 + crates/horizon-world/src/datafix/mod.rs | 15 +- crates/horizon-world/src/datafix/schema.rs | 16 + .../horizon-world/src/datafix/schema_flat.rs | 152 +++- tools/gen_flat_tables.py | 32 +- 7 files changed, 1381 insertions(+), 23 deletions(-) diff --git a/crates/horizon-world/src/datafix/fixes_legacy.rs b/crates/horizon-world/src/datafix/fixes_legacy.rs index 538e79f20..2bb5f08a9 100644 --- a/crates/horizon-world/src/datafix/fixes_legacy.rs +++ b/crates/horizon-world/src/datafix/fixes_legacy.rs @@ -1,13 +1,64 @@ //! Fixes of 1.8 to 1.12 (keys 100 to 1125, DataVersion up to 1343): what worlds //! saved by those versions need before the flattening ([`super::fixes_flat`]). //! The options fixes of this range (505, 816, 1344) are client settings. -use super::dynamic::{as_int, as_int_stream, set, string}; -use super::mark_read; -use super::schema::{Key, Ty, key}; -use super::{Cx, FixFn, reread_as}; -use crate::nbt::Tag; +use super::dynamic::{ + as_bool, as_float, as_int, as_int_stream, as_number, as_str, boolean, empty_map, is_list, + namespaced, remove, set, stream, string, +}; +use super::flat_tables as t; +use super::schema::flat::entity_tree_known; +use super::schema::{Key, Ty, block_entity_known, key}; +use super::{Cx, FixFn, drop_typed, items, mark_read, reread, reread_as}; +use crate::nbt::{JavaString, Tag}; pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { + out.push((key(100, 0), equipment_to_armor_and_hands)); + out.push((key(101, 0), |cx| { + cx.entity("Villager", |e| set(e, "CanPickUpLoot", boolean(true))) + })); + out.push((key(102, 0), item_ids)); + out.push((key(102, 0), item_potions)); + out.push((key(105, 0), spawn_egg_entities)); + out.push((key(106, 0), spawner_entity_identifiers)); + out.push((key(107, 0), minecart_identifiers)); + out.push((key(108, 0), entity_string_uuid)); + out.push((key(109, 0), entity_health)); + out.push((key(110, 0), horse_saddle)); + out.push((key(111, 0), painting_item_frame_direction)); + out.push((key(113, 0), redundant_chance_tags)); + out.push((key(135, 0), riding_to_passengers)); + out.push((key(143, 0), |cx| { + cx.entity("TippedArrow", |e| set(e, "id", string("Arrow"))) + })); + out.push((key(147, 0), armor_stand_silent)); + out.push((key(165, 0), sign_text_strict_json)); + out.push((key(165, 0), written_book_pages_strict_json)); + out.push((key(502, 0), |cx| { + cx.rename(Ty::ItemName, |name| { + (namespaced(name) == "minecraft:cooked_fished").then_some("minecraft:cooked_fish") + }) + })); + out.push((key(502, 0), zombie_villager_type)); + out.push((key(700, 0), elder_guardian_split)); + out.push((key(701, 0), skeleton_split)); + out.push((key(702, 0), zombie_split)); + out.push((key(703, 0), horse_split)); + out.push((key(704, 0), block_entity_ids)); + out.push((key(705, 0), entity_ids)); + out.push((key(804, 0), item_banner_color)); + out.push((key(806, 0), item_water_potion)); + out.push((key(808, 1), shulker_color)); + out.push((key(813, 0), item_shulker_box_color)); + out.push((key(813, 0), |cx| { + cx.block_entity("minecraft:shulker_box", |be| { + remove(be, "Color"); + }) + })); + out.push((key(820, 0), |cx| { + cx.rename(Ty::ItemName, |name| { + (namespaced(name) == "minecraft:totem").then_some("minecraft:totem_of_undying") + }) + })); out.push((key(1022, 0), |cx| { let k = cx.k; cx.each(Ty::Player, |p| reread_as(Ty::Player, k, p)) @@ -25,6 +76,670 @@ pub(super) fn register(out: &mut Vec<(Key, FixFn)>) { })); } +/// `Number.shortValue` of a numeric field, or the default (`Dynamic.asShort`). +fn as_short(tag: Option<&Tag>, default: i16) -> i16 { + tag.and_then(as_number) + .map_or(default, |n| n.int_value() as i16) +} + +fn lookup_int(table: &'static [(i32, &'static str)], k: i32) -> Option<&'static str> { + table.iter().find(|(i, _)| *i == k).map(|(_, v)| *v) +} + +fn lookup_str(table: &'static [(&'static str, &'static str)], k: &str) -> Option<&'static str> { + table.iter().find(|(i, _)| *i == k).map(|(_, v)| *v) +} + +fn float_list(values: &[f32]) -> Tag { + Tag::List(values.iter().map(|v| Tag::Float(v.to_bits())).collect()) +} + +// ------------------------------------------------------------------ 100 + +/// `EntityEquipmentToArmorAndHandFix`: the `Equipment` list becomes hand and armor items. +fn equipment_to_armor_and_hands(cx: &mut Cx) { + cx.each(Ty::Entity, |e| { + // The drop chances come first. + let chances: Option> = + e.get("DropChances").filter(|c| is_list(Some(c))).map(|c| { + stream(Some(c)) + .iter() + .map(|v| as_float(Some(v), 0.0)) + .collect() + }); + remove(e, "DropChances"); + if let Some(mut chances) = chances { + chances.extend([0.0; 5]); + if e.get("HandDropChances").is_none() { + set(e, "HandDropChances", float_list(&[chances[0], 0.0])); + } + if e.get("ArmorDropChances").is_none() { + set(e, "ArmorDropChances", float_list(&chances[1..5])); + } + } + // The equipment list reads only if every element is a compound. + let items: Vec = match e.get("Equipment") { + Some(Tag::List(items)) if items.iter().all(|i| matches!(i, Tag::Compound(_))) => { + items.clone() + } + _ => Vec::new(), + }; + if !items.is_empty() { + set( + e, + "HandItems", + Tag::List(vec![items[0].clone(), empty_map()]), + ); + } + if items.len() > 1 { + let mut armor = vec![empty_map(); 4]; + let end = items.len().min(5); + armor[..end - 1].clone_from_slice(&items[1..end]); + set(e, "ArmorItems", Tag::List(armor)); + } + // `Equipment` is no field of the new type: the map it was read from gives it back. + drop_typed(e, "Equipment"); + }); +} + +// ------------------------------------------------------------------ 102 + +/// `ItemIdFix`: numeric item ids become names. +fn item_ids(cx: &mut Cx) { + cx.each(Ty::ItemStack, |s| { + let new = match s.get("id") { + Some(Tag::String(id)) => namespaced(&id.to_string_lossy()), + Some(other) => match as_number(other) { + Some(n) => lookup_int(t::ITEM_IDS, n.int_value()) + .unwrap_or("minecraft:air") + .to_owned(), + None => return, + }, + None => return, + }; + set(s, "id", string(&new)); + }); +} + +/// `ItemPotionFix`: potion damage values become potion names. +fn item_potions(cx: &mut Cx) { + cx.item( + |id| id == "minecraft:potion", + |s| { + if !matches!(s.get("tag"), Some(Tag::Compound(_))) { + return; + } + let damage = i32::from(as_short(s.get("Damage"), 0)); + if let Some(tag) = s.get_mut("tag") + && !matches!(tag.get("Potion"), Some(Tag::String(_))) + { + let potion = lookup_int(t::ITEM_POTIONS, damage & 127).unwrap_or("minecraft:water"); + set(tag, "Potion", string(potion)); + if damage & 16384 == 16384 { + set(s, "id", string("minecraft:splash_potion")); + } + } + if damage != 0 { + set(s, "Damage", Tag::Short(0)); + } + }, + ); +} + +// ------------------------------------------------------------------ 105 + +/// `ItemSpawnEggFix`: the damage of a spawn egg becomes the entity it spawns. +fn spawn_egg_entities(cx: &mut Cx) { + let (k, input) = (cx.k, cx.k - 1); + cx.item( + |id| id == "minecraft:spawn_egg", + |s| { + let damage = i32::from(as_short(s.get("Damage"), 0)); + if let Some(entity) = lookup_int(t::SPAWN_EGG_ENTITIES, damage & 0xFF) { + // The entity tree is typed only if its id is one of the schema's. + let typed = s + .get("tag") + .and_then(|tag| tag.get("EntityTag")) + .filter(|e| entity_tree_known(e, input)) + .cloned(); + let old_id = typed.as_ref().and_then(|e| as_str(e.get("id"))); + if old_id.as_deref() != Some(entity) { + if !matches!(s.get("tag"), Some(Tag::Compound(_))) { + set(s, "tag", empty_map()); + } + let mut entity_tag = typed.unwrap_or_else(empty_map); + set(&mut entity_tag, "id", string(entity)); + reread_as(Ty::EntityTree, k, &mut entity_tag); + if let Some(tag) = s.get_mut("tag") { + set(tag, "EntityTag", entity_tag); + } + } + } + if damage != 0 { + set(s, "Damage", Tag::Short(0)); + } + }, + ); +} + +// ------------------------------------------------------------------ 106 + +/// `MobSpawnerEntityIdentifiersFix`: the spawned entity is a tree of its own. +fn spawner_entity_identifiers(cx: &mut Cx) { + let k = cx.k; + cx.each(Ty::UntaggedSpawner, |sp| { + if !matches!(sp, Tag::Compound(_)) { + return; + } + if let Some(Tag::String(entity)) = sp.get("EntityId") { + let id = if entity.0.is_empty() { + string("Pig") + } else { + Tag::String(entity.clone()) + }; + let mut data = sp.get("SpawnData").cloned().unwrap_or_else(empty_map); + if matches!(data, Tag::Compound(_)) { + set(&mut data, "id", id); + } + set(sp, "SpawnData", data); + remove(sp, "EntityId"); + } + if let Some(Tag::List(potentials)) = sp.get_mut("SpawnPotentials") { + for potential in potentials { + if let Some(Tag::String(entity)) = potential.get("Type") { + let entity = entity.clone(); + let mut data = potential + .get("Properties") + .cloned() + .unwrap_or_else(empty_map); + if matches!(data, Tag::Compound(_)) { + set(&mut data, "id", Tag::String(entity)); + } + set(potential, "Entity", data); + remove(potential, "Type"); + remove(potential, "Properties"); + } + } + } + reread_as(Ty::UntaggedSpawner, k, sp); + }); +} + +// ------------------------------------------------------------------ 107 + +/// `EntityMinecartIdentifiersFix`: a minecart's type becomes its entity id. +fn minecart_identifiers(cx: &mut Cx) { + let k = cx.k; + cx.entity("Minecart", |e| { + let name = match as_int(e.get("Type"), 0) { + 1 => "MinecartChest", + 2 => "MinecartFurnace", + _ => "MinecartRideable", + }; + set(e, "id", string(name)); + remove(e, "Type"); + reread(k, e); + }); +} + +// ------------------------------------------------------------------ 108 + +/// `UUID.fromString`. +fn parse_uuid(s: &str) -> Option<(i64, i64)> { + let parts: Vec<&str> = s.split('-').collect(); + if parts.len() != 5 { + return None; + } + let part = |i: usize| i64::from_str_radix(parts[i], 16).ok(); + let mut most = part(0)? & 0xFFFF_FFFF; + most = (most << 16) | (part(1)? & 0xFFFF); + most = (most << 16) | (part(2)? & 0xFFFF); + let mut least = part(3)? & 0xFFFF; + least = (least << 48) | (part(4)? & 0xFFFF_FFFF_FFFF); + Some((most, least)) +} + +/// `EntityStringUuidFix`: the string UUID becomes a most/least pair. +fn entity_string_uuid(cx: &mut Cx) { + cx.each(Ty::Entity, |e| { + if let Some(uuid) = as_str(e.get("UUID")) + && let Some((most, least)) = parse_uuid(&uuid) + { + remove(e, "UUID"); + set(e, "UUIDMost", Tag::Long(most)); + set(e, "UUIDLeast", Tag::Long(least)); + } + }); +} + +// ------------------------------------------------------------------ 109 + +/// `EntityHealthFix`: the health is a float. +fn entity_health(cx: &mut Cx) { + cx.each(Ty::Entity, |e| { + let heal_f = e.get("HealF").and_then(as_number); + let health = e.get("Health").and_then(as_number); + let value = if let Some(n) = heal_f { + remove(e, "HealF"); + n.float_value() + } else if let Some(n) = health { + n.float_value() + } else { + return; + }; + set(e, "Health", Tag::Float(value.to_bits())); + }); +} + +// ------------------------------------------------------------------ 110 + +/// `EntityHorseSaddleFix`: a saddled horse has a saddle item. +fn horse_saddle(cx: &mut Cx) { + cx.entity("EntityHorse", |e| { + if !matches!(e.get("SaddleItem"), Some(Tag::Compound(_))) && as_bool(e.get("Saddle"), false) + { + // `Saddle` stays: `Dynamic.remove` was not kept by the fix. + set( + e, + "SaddleItem", + Tag::compound([ + ("id", string("minecraft:saddle")), + ("Count", Tag::Byte(1)), + ("Damage", Tag::Short(0)), + ]), + ); + } + }); +} + +// ------------------------------------------------------------------ 111 + +/// `EntityPaintingItemFrameDirectionFix`. +fn painting_item_frame_direction(cx: &mut Cx) { + const DIRECTIONS: [[i32; 3]; 4] = [[0, 0, 1], [-1, 0, 0], [0, 0, -1], [1, 0, 0]]; + for (id, item_frame) in [("Painting", false), ("ItemFrame", true)] { + cx.entity(id, |e| { + if e.get("Facing").and_then(as_number).is_some() { + return; + } + let byte = |tag: Option<&Tag>| tag.and_then(as_number).map_or(0, |n| n.byte_value()); + let direction; + if e.get("Direction").and_then(as_number).is_some() { + direction = i32::from(byte(e.get("Direction"))) % 4; + let Some(steps) = usize::try_from(direction).ok().map(|d| DIRECTIONS[d]) else { + return; + }; + for (field, step) in ["TileX", "TileY", "TileZ"].into_iter().zip(steps) { + let value = as_int(e.get(field), 0).wrapping_add(step); + set(e, field, Tag::Int(value)); + } + remove(e, "Direction"); + if item_frame && e.get("ItemRotation").and_then(as_number).is_some() { + let rotation = i32::from(byte(e.get("ItemRotation"))) * 2; + set(e, "ItemRotation", Tag::Byte(rotation as i8)); + } + } else { + direction = i32::from(byte(e.get("Dir"))) % 4; + remove(e, "Dir"); + } + set(e, "Facing", Tag::Byte(direction as i8)); + }); + } +} + +// ------------------------------------------------------------------ 113 + +/// `EntityRedundantChanceTagsFix`: drop chances that are all zero are not saved. +fn redundant_chance_tags(cx: &mut Cx) { + let is_zero_list = |tag: Option<&Tag>, size: usize| { + let Some(tag) = tag.filter(|t| is_list(Some(t))) else { + return false; + }; + let values = stream(Some(tag)); + values.len() == size + && values + .iter() + .all(|v| as_number(v).is_some_and(|n| n.float_value() == 0.0)) + }; + cx.each(Ty::Entity, |e| { + if is_zero_list(e.get("HandDropChances"), 2) { + remove(e, "HandDropChances"); + } + if is_zero_list(e.get("ArmorDropChances"), 4) { + remove(e, "ArmorDropChances"); + } + }); +} + +// ------------------------------------------------------------------ 135 + +/// `EntityRidingToPassengersFix`: the vehicle is the root and carries its riders. +fn riding_to_passengers(cx: &mut Cx) { + let (k, input) = (cx.k, cx.k - 1); + cx.each(Ty::EntityTree, |tree| { + if !entity_tree_known(tree, input) { + return; + } + // The vehicle was fixed first: it has its passengers already. + let Some(vehicle) = tree.get("Riding").filter(|v| entity_tree_known(v, input)) else { + return; + }; + let vehicle = vehicle.clone(); + let mut rider = tree.clone(); + remove(&mut rider, "Riding"); + // `Riding` is no field of the new type: the map the rider was read from gives it back. + drop_typed(&mut rider, "Riding"); + *tree = add_passenger_to_top(vehicle, rider); + }); + cx.each(Ty::Player, |p| reread_as(Ty::Player, k, p)); +} + +/// `EntityRidingToPassengersFix.addPassengerToTop`: the rider goes to the end of the chain. +fn add_passenger_to_top(mut root: Tag, passenger: Tag) -> Tag { + let first = match root.get("Passengers") { + Some(Tag::List(passengers)) => passengers.first().cloned(), + _ => None, + }; + let passenger = match first { + Some(first) => add_passenger_to_top(first, passenger), + None => passenger, + }; + set(&mut root, "Passengers", Tag::List(vec![passenger])); + root +} + +// ------------------------------------------------------------------ 147 + +/// `EntityArmorStandSilentFix`. +fn armor_stand_silent(cx: &mut Cx) { + cx.entity("ArmorStand", |e| { + if as_bool(e.get("Silent"), false) && !as_bool(e.get("Marker"), false) { + remove(e, "Silent"); + } + }); +} + +// ------------------------------------------------------------------ 165 + +/// `LegacyComponentDataFixUtils.rewriteFromLenient`. +fn rewrite_from_lenient(text: &[u16]) -> Vec { + use super::json::{self, Json}; + let empty = || json::text_component_json(&[]); + if text.is_empty() || text == "null".encode_utf16().collect::>().as_slice() { + return empty(); + } + let (first, last) = (text[0], text[text.len() - 1]); + let (quote, open_brace, close_brace, open_bracket, close_bracket) = ( + u16::from(b'"'), + u16::from(b'{'), + u16::from(b'}'), + u16::from(b'['), + u16::from(b']'), + ); + let wrapped = (first == quote && last == quote) + || (first == open_brace && last == close_brace) + || (first == open_bracket && last == close_bracket); + if wrapped && let Some(parsed) = json::parse_lenient(text) { + return match parsed { + Json::Str(s) => json::text_component_json(&s), + Json::Num(n) => json::text_component_json(&n.encode_utf16().collect::>()), + Json::Bool(b) => json::text_component_json( + &(if b { "true" } else { "false" }) + .encode_utf16() + .collect::>(), + ), + other => json::to_stable_string(&other), + }; + } + json::text_component_json(text) +} + +/// `SignTextStrictJsonFix`: the lines of a sign are strict JSON. +fn sign_text_strict_json(cx: &mut Cx) { + cx.block_entity("Sign", |be| { + for line in ["Text1", "Text2", "Text3", "Text4"] { + if let Some(Tag::String(text)) = be.get(line) { + let fixed = rewrite_from_lenient(&text.0); + set(be, line, Tag::String(JavaString(fixed))); + } + } + }); +} + +/// `WrittenBookPagesStrictJsonFix`: the pages of a written book are strict JSON. +fn written_book_pages_strict_json(cx: &mut Cx) { + cx.item( + |id| id == "minecraft:written_book", + |s| { + let Some(Tag::List(pages)) = s.get_mut("tag").and_then(|t| t.get_mut("pages")) else { + return; + }; + if pages.iter().all(|p| matches!(p, Tag::String(_))) { + for page in pages { + if let Tag::String(text) = page { + *text = JavaString(rewrite_from_lenient(&text.0)); + } + } + } + }, + ); +} + +// ------------------------------------------------------------------ 502 + +/// `EntityZombieVillagerTypeFix`: `IsVillager` becomes a zombie type. +fn zombie_villager_type(cx: &mut Cx) { + cx.entity("Zombie", |e| { + if !as_bool(e.get("IsVillager"), false) { + return; + } + if e.get("ZombieType").is_none() { + let profession = as_int(e.get("VillagerProfession"), -1); + // Vanilla picks a random profession for an invalid one: nothing to match there. + let profession = if (0..6).contains(&profession) { + profession + } else { + 0 + }; + set(e, "ZombieType", Tag::Int(profession)); + } + remove(e, "IsVillager"); + }); +} + +// ------------------------------------------------------------------ 700 to 703 + +/// `EntityElderGuardianSplitFix`. +fn elder_guardian_split(cx: &mut Cx) { + cx.entity("Guardian", |e| { + if as_bool(e.get("Elder"), false) { + set(e, "id", string("ElderGuardian")); + } + }); +} + +/// `EntitySkeletonSplitFix`. +fn skeleton_split(cx: &mut Cx) { + cx.entity("Skeleton", |e| match as_int(e.get("SkeletonType"), 0) { + 1 => set(e, "id", string("WitherSkeleton")), + 2 => set(e, "id", string("Stray")), + _ => {} + }); +} + +/// `EntityZombieSplitFix`. +fn zombie_split(cx: &mut Cx) { + let k = cx.k; + cx.entity("Zombie", |e| { + let zombie_type = as_int(e.get("ZombieType"), 0); + match zombie_type { + 1..=5 => { + set(e, "id", string("ZombieVillager")); + set(e, "Profession", Tag::Int(zombie_type - 1)); + reread(k, e); + } + 6 => set(e, "id", string("Husk")), + _ => {} + } + remove(e, "ZombieType"); + }); +} + +/// `EntityHorseSplitFix`. +fn horse_split(cx: &mut Cx) { + let k = cx.k; + cx.entity("EntityHorse", |e| { + let name = match as_int(e.get("Type"), 0) { + 1 => "Donkey", + 2 => "Mule", + 3 => "ZombieHorse", + 4 => "SkeletonHorse", + _ => "Horse", + }; + set(e, "id", string(name)); + remove(e, "Type"); + reread(k, e); + }); +} + +// ------------------------------------------------------------------ 704, 705 + +/// `BlockEntityIdFix`: block entity ids are namespaced. The item stacks are read +/// again first, with the hook of the new schema. +fn block_entity_ids(cx: &mut Cx) { + let k = cx.k; + cx.each(Ty::ItemStack, |s| items::add_names_at(s, k)); + cx.each(Ty::BlockEntity, |be| { + if let Some(id) = as_str(be.get("id")) + && let Some(new) = lookup_str(t::BLOCK_ENTITY_IDS, &id) + { + set(be, "id", string(new)); + } + }); +} + +/// `EntityIdFix`: entity ids are namespaced (the item stacks are read again first). +fn entity_ids(cx: &mut Cx) { + let k = cx.k; + cx.each(Ty::ItemStack, |s| items::add_names_at(s, k)); + cx.each(Ty::Entity, |e| { + if let Some(id) = as_str(e.get("id")) + && let Some(new) = lookup_str(t::ENTITY_IDS, &id) + { + set(e, "id", string(new)); + } + }); +} + +// ------------------------------------------------------------------ 804 to 813 + +/// `ItemBannerColorFix`: a banner item's damage is its base colour. +fn item_banner_color(cx: &mut Cx) { + let input = cx.k - 1; + cx.item( + |id| id == "minecraft:banner", + |s| { + let Some(base) = s + .get("tag") + .and_then(|tag| tag.get("BlockEntityTag")) + .filter(|be| block_entity_known(be, input)) + .and_then(|be| be.get("Base")) + .and_then(as_number) + else { + return; + }; + set(s, "Damage", Tag::Short((base.int_value() & 15) as i16)); + let pick_marker = Tag::compound([("Lore", Tag::List(vec![string("(+NBT")]))]); + if s.get("tag") + .and_then(|tag| tag.get("display")) + .is_some_and(|display| *display == pick_marker) + { + return; + } + if let Some(be) = s + .get_mut("tag") + .and_then(|tag| tag.get_mut("BlockEntityTag")) + { + remove(be, "Base"); + } + }, + ); +} + +/// `ItemWaterPotionFix`: potions without a type are water. +fn item_water_potion(cx: &mut Cx) { + cx.item( + |id| { + matches!( + id, + "minecraft:potion" + | "minecraft:splash_potion" + | "minecraft:lingering_potion" + | "minecraft:tipped_arrow" + ) + }, + |s| { + if !matches!(s.get("tag"), Some(Tag::Compound(_))) { + set(s, "tag", empty_map()); + } + if let Some(tag) = s.get_mut("tag") + && !matches!(tag.get("Potion"), Some(Tag::String(_))) + { + set(tag, "Potion", string("minecraft:water")); + } + }, + ); +} + +/// `EntityShulkerColorFix`: shulkers of before 1.11 are purple. +fn shulker_color(cx: &mut Cx) { + cx.entity("minecraft:shulker", |e| { + if e.get("Color").is_none() { + set(e, "Color", Tag::Byte(10)); + } + }); +} + +const SHULKER_BOX_COLORS: [&str; 16] = [ + "minecraft:white_shulker_box", + "minecraft:orange_shulker_box", + "minecraft:magenta_shulker_box", + "minecraft:light_blue_shulker_box", + "minecraft:yellow_shulker_box", + "minecraft:lime_shulker_box", + "minecraft:pink_shulker_box", + "minecraft:gray_shulker_box", + "minecraft:silver_shulker_box", + "minecraft:cyan_shulker_box", + "minecraft:purple_shulker_box", + "minecraft:blue_shulker_box", + "minecraft:brown_shulker_box", + "minecraft:green_shulker_box", + "minecraft:red_shulker_box", + "minecraft:black_shulker_box", +]; + +/// `ItemShulkerBoxColorFix`: the colour of a shulker box item is in its name. +fn item_shulker_box_color(cx: &mut Cx) { + let input = cx.k - 1; + cx.item( + |id| id == "minecraft:shulker_box", + |s| { + let Some(be) = s + .get("tag") + .and_then(|tag| tag.get("BlockEntityTag")) + .filter(|be| block_entity_known(be, input)) + else { + return; + }; + // `Color` stays in the block entity: the fix does not keep `Dynamic.remove`. + let color = as_int(be.get("Color"), 0); + let name = SHULKER_BOX_COLORS[color.rem_euclid(16) as usize]; + set(s, "id", string(name)); + }, + ); +} + // ------------------------------------------------------------------ 1125 /// `ChunkBedBlockEntityInjecterFix`: a bed block gets the block entity 1.12 gave it. diff --git a/crates/horizon-world/src/datafix/flat_tables.rs b/crates/horizon-world/src/datafix/flat_tables.rs index c01253e24..cea46f64c 100644 --- a/crates/horizon-world/src/datafix/flat_tables.rs +++ b/crates/horizon-world/src/datafix/flat_tables.rs @@ -2071,6 +2071,431 @@ pub static ENTITIES_V1460: &[&str] = &[ "minecraft:zombie_villager", ]; +/// The entity ids V99 registers. +pub static ENTITIES_V99: &[&str] = &[ + "AreaEffectCloud", + "ArmorStand", + "Arrow", + "Bat", + "Blaze", + "Boat", + "CaveSpider", + "Chicken", + "Cow", + "Creeper", + "DragonFireball", + "EnderCrystal", + "EnderDragon", + "Enderman", + "Endermite", + "EntityHorse", + "EyeOfEnderSignal", + "FallingSand", + "Fireball", + "FireworksRocketEntity", + "Ghast", + "Giant", + "Guardian", + "Item", + "ItemFrame", + "LavaSlime", + "LeashKnot", + "Minecart", + "MinecartChest", + "MinecartCommandBlock", + "MinecartFurnace", + "MinecartHopper", + "MinecartRideable", + "MinecartSpawner", + "MinecartTNT", + "MushroomCow", + "Ozelot", + "Painting", + "Pig", + "PigZombie", + "PrimedTnt", + "Rabbit", + "Sheep", + "Shulker", + "ShulkerBullet", + "Silverfish", + "Skeleton", + "Slime", + "SmallFireball", + "SnowMan", + "Snowball", + "SpectralArrow", + "Spider", + "Squid", + "ThrownEgg", + "ThrownEnderpearl", + "ThrownExpBottle", + "ThrownPotion", + "TippedArrow", + "Villager", + "VillagerGolem", + "Witch", + "WitherBoss", + "WitherSkull", + "Wolf", + "XPOrb", + "Zombie", +]; + +/// The block entity ids V99 registers. +pub static BLOCK_ENTITIES_V99: &[&str] = &[ + "Airportal", + "Banner", + "Beacon", + "Cauldron", + "Chest", + "Comparator", + "Control", + "DLDetector", + "Dropper", + "EnchantTable", + "EndGateway", + "EnderChest", + "FlowerPot", + "Furnace", + "Hopper", + "MobSpawner", + "Music", + "Piston", + "RecordPlayer", + "Sign", + "Skull", + "Structure", + "Trap", +]; + +/// `ItemSpawnEggFix.ID_TO_ENTITY`: spawn egg damage to entity id. +pub static SPAWN_EGG_ENTITIES: &[(i32, &str)] = &[ + (1, "Item"), + (2, "XPOrb"), + (7, "ThrownEgg"), + (8, "LeashKnot"), + (9, "Painting"), + (10, "Arrow"), + (11, "Snowball"), + (12, "Fireball"), + (13, "SmallFireball"), + (14, "ThrownEnderpearl"), + (15, "EyeOfEnderSignal"), + (16, "ThrownPotion"), + (17, "ThrownExpBottle"), + (18, "ItemFrame"), + (19, "WitherSkull"), + (20, "PrimedTnt"), + (21, "FallingSand"), + (22, "FireworksRocketEntity"), + (23, "TippedArrow"), + (24, "SpectralArrow"), + (25, "ShulkerBullet"), + (26, "DragonFireball"), + (30, "ArmorStand"), + (41, "Boat"), + (42, "MinecartRideable"), + (43, "MinecartChest"), + (44, "MinecartFurnace"), + (45, "MinecartTNT"), + (46, "MinecartHopper"), + (47, "MinecartSpawner"), + (40, "MinecartCommandBlock"), + (50, "Creeper"), + (51, "Skeleton"), + (52, "Spider"), + (53, "Giant"), + (54, "Zombie"), + (55, "Slime"), + (56, "Ghast"), + (57, "PigZombie"), + (58, "Enderman"), + (59, "CaveSpider"), + (60, "Silverfish"), + (61, "Blaze"), + (62, "LavaSlime"), + (63, "EnderDragon"), + (64, "WitherBoss"), + (65, "Bat"), + (66, "Witch"), + (67, "Endermite"), + (68, "Guardian"), + (69, "Shulker"), + (90, "Pig"), + (91, "Sheep"), + (92, "Cow"), + (93, "Chicken"), + (94, "Squid"), + (95, "Wolf"), + (96, "MushroomCow"), + (97, "SnowMan"), + (98, "Ozelot"), + (99, "VillagerGolem"), + (100, "EntityHorse"), + (101, "Rabbit"), + (120, "Villager"), + (200, "EnderCrystal"), +]; + +/// `EntityIdFix.ID_MAP`. +pub static ENTITY_IDS: &[(&str, &str)] = &[ + ("AreaEffectCloud", "minecraft:area_effect_cloud"), + ("ArmorStand", "minecraft:armor_stand"), + ("Arrow", "minecraft:arrow"), + ("Bat", "minecraft:bat"), + ("Blaze", "minecraft:blaze"), + ("Boat", "minecraft:boat"), + ("CaveSpider", "minecraft:cave_spider"), + ("Chicken", "minecraft:chicken"), + ("Cow", "minecraft:cow"), + ("Creeper", "minecraft:creeper"), + ("Donkey", "minecraft:donkey"), + ("DragonFireball", "minecraft:dragon_fireball"), + ("ElderGuardian", "minecraft:elder_guardian"), + ("EnderCrystal", "minecraft:ender_crystal"), + ("EnderDragon", "minecraft:ender_dragon"), + ("Enderman", "minecraft:enderman"), + ("Endermite", "minecraft:endermite"), + ("EyeOfEnderSignal", "minecraft:eye_of_ender_signal"), + ("FallingSand", "minecraft:falling_block"), + ("Fireball", "minecraft:fireball"), + ("FireworksRocketEntity", "minecraft:fireworks_rocket"), + ("Ghast", "minecraft:ghast"), + ("Giant", "minecraft:giant"), + ("Guardian", "minecraft:guardian"), + ("Horse", "minecraft:horse"), + ("Husk", "minecraft:husk"), + ("Item", "minecraft:item"), + ("ItemFrame", "minecraft:item_frame"), + ("LavaSlime", "minecraft:magma_cube"), + ("LeashKnot", "minecraft:leash_knot"), + ("MinecartChest", "minecraft:chest_minecart"), + ("MinecartCommandBlock", "minecraft:commandblock_minecart"), + ("MinecartFurnace", "minecraft:furnace_minecart"), + ("MinecartHopper", "minecraft:hopper_minecart"), + ("MinecartRideable", "minecraft:minecart"), + ("MinecartSpawner", "minecraft:spawner_minecart"), + ("MinecartTNT", "minecraft:tnt_minecart"), + ("Mule", "minecraft:mule"), + ("MushroomCow", "minecraft:mooshroom"), + ("Ozelot", "minecraft:ocelot"), + ("Painting", "minecraft:painting"), + ("Pig", "minecraft:pig"), + ("PigZombie", "minecraft:zombie_pigman"), + ("PolarBear", "minecraft:polar_bear"), + ("PrimedTnt", "minecraft:tnt"), + ("Rabbit", "minecraft:rabbit"), + ("Sheep", "minecraft:sheep"), + ("Shulker", "minecraft:shulker"), + ("ShulkerBullet", "minecraft:shulker_bullet"), + ("Silverfish", "minecraft:silverfish"), + ("Skeleton", "minecraft:skeleton"), + ("SkeletonHorse", "minecraft:skeleton_horse"), + ("Slime", "minecraft:slime"), + ("SmallFireball", "minecraft:small_fireball"), + ("SnowMan", "minecraft:snowman"), + ("Snowball", "minecraft:snowball"), + ("SpectralArrow", "minecraft:spectral_arrow"), + ("Spider", "minecraft:spider"), + ("Squid", "minecraft:squid"), + ("Stray", "minecraft:stray"), + ("ThrownEgg", "minecraft:egg"), + ("ThrownEnderpearl", "minecraft:ender_pearl"), + ("ThrownExpBottle", "minecraft:xp_bottle"), + ("ThrownPotion", "minecraft:potion"), + ("Villager", "minecraft:villager"), + ("VillagerGolem", "minecraft:villager_golem"), + ("Witch", "minecraft:witch"), + ("WitherBoss", "minecraft:wither"), + ("WitherSkeleton", "minecraft:wither_skeleton"), + ("WitherSkull", "minecraft:wither_skull"), + ("Wolf", "minecraft:wolf"), + ("XPOrb", "minecraft:xp_orb"), + ("Zombie", "minecraft:zombie"), + ("ZombieHorse", "minecraft:zombie_horse"), + ("ZombieVillager", "minecraft:zombie_villager"), +]; + +/// `BlockEntityIdFix.ID_MAP`. +pub static BLOCK_ENTITY_IDS: &[(&str, &str)] = &[ + ("Airportal", "minecraft:end_portal"), + ("Banner", "minecraft:banner"), + ("Beacon", "minecraft:beacon"), + ("Cauldron", "minecraft:brewing_stand"), + ("Chest", "minecraft:chest"), + ("Comparator", "minecraft:comparator"), + ("Control", "minecraft:command_block"), + ("DLDetector", "minecraft:daylight_detector"), + ("Dropper", "minecraft:dropper"), + ("EnchantTable", "minecraft:enchanting_table"), + ("EndGateway", "minecraft:end_gateway"), + ("EnderChest", "minecraft:ender_chest"), + ("FlowerPot", "minecraft:flower_pot"), + ("Furnace", "minecraft:furnace"), + ("Hopper", "minecraft:hopper"), + ("MobSpawner", "minecraft:mob_spawner"), + ("Music", "minecraft:noteblock"), + ("Piston", "minecraft:piston"), + ("RecordPlayer", "minecraft:jukebox"), + ("Sign", "minecraft:sign"), + ("Skull", "minecraft:skull"), + ("Structure", "minecraft:structure_block"), + ("Trap", "minecraft:dispenser"), +]; + +/// `V99.ITEM_TO_BLOCKENTITY`. +pub static ITEM_TO_BLOCK_ENTITY_V99: &[(&str, &str)] = &[ + ("minecraft:furnace", "Furnace"), + ("minecraft:lit_furnace", "Furnace"), + ("minecraft:chest", "Chest"), + ("minecraft:trapped_chest", "Chest"), + ("minecraft:ender_chest", "EnderChest"), + ("minecraft:jukebox", "RecordPlayer"), + ("minecraft:dispenser", "Trap"), + ("minecraft:dropper", "Dropper"), + ("minecraft:sign", "Sign"), + ("minecraft:mob_spawner", "MobSpawner"), + ("minecraft:noteblock", "Music"), + ("minecraft:brewing_stand", "Cauldron"), + ("minecraft:enhanting_table", "EnchantTable"), + ("minecraft:command_block", "CommandBlock"), + ("minecraft:beacon", "Beacon"), + ("minecraft:skull", "Skull"), + ("minecraft:daylight_detector", "DLDetector"), + ("minecraft:hopper", "Hopper"), + ("minecraft:banner", "Banner"), + ("minecraft:flower_pot", "FlowerPot"), + ("minecraft:repeating_command_block", "CommandBlock"), + ("minecraft:chain_command_block", "CommandBlock"), + ("minecraft:standing_sign", "Sign"), + ("minecraft:wall_sign", "Sign"), + ("minecraft:piston_head", "Piston"), + ("minecraft:daylight_detector_inverted", "DLDetector"), + ("minecraft:unpowered_comparator", "Comparator"), + ("minecraft:powered_comparator", "Comparator"), + ("minecraft:wall_banner", "Banner"), + ("minecraft:standing_banner", "Banner"), + ("minecraft:structure_block", "Structure"), + ("minecraft:end_portal", "Airportal"), + ("minecraft:end_gateway", "EndGateway"), + ("minecraft:shield", "Banner"), +]; + +/// `ItemPotionFix.POTIONS`: damage & 127 to potion (absent: null). +pub static ITEM_POTIONS: &[(i32, &str)] = &[ + (0, "minecraft:water"), + (1, "minecraft:regeneration"), + (2, "minecraft:swiftness"), + (3, "minecraft:fire_resistance"), + (4, "minecraft:poison"), + (5, "minecraft:healing"), + (6, "minecraft:night_vision"), + (8, "minecraft:weakness"), + (9, "minecraft:strength"), + (10, "minecraft:slowness"), + (11, "minecraft:leaping"), + (12, "minecraft:harming"), + (13, "minecraft:water_breathing"), + (14, "minecraft:invisibility"), + (16, "minecraft:awkward"), + (17, "minecraft:regeneration"), + (18, "minecraft:swiftness"), + (19, "minecraft:fire_resistance"), + (20, "minecraft:poison"), + (21, "minecraft:healing"), + (22, "minecraft:night_vision"), + (24, "minecraft:weakness"), + (25, "minecraft:strength"), + (26, "minecraft:slowness"), + (27, "minecraft:leaping"), + (28, "minecraft:harming"), + (29, "minecraft:water_breathing"), + (30, "minecraft:invisibility"), + (32, "minecraft:thick"), + (33, "minecraft:strong_regeneration"), + (34, "minecraft:strong_swiftness"), + (35, "minecraft:fire_resistance"), + (36, "minecraft:strong_poison"), + (37, "minecraft:strong_healing"), + (38, "minecraft:night_vision"), + (40, "minecraft:weakness"), + (41, "minecraft:strong_strength"), + (42, "minecraft:slowness"), + (43, "minecraft:strong_leaping"), + (44, "minecraft:strong_harming"), + (45, "minecraft:water_breathing"), + (46, "minecraft:invisibility"), + (49, "minecraft:strong_regeneration"), + (50, "minecraft:strong_swiftness"), + (51, "minecraft:fire_resistance"), + (52, "minecraft:strong_poison"), + (53, "minecraft:strong_healing"), + (54, "minecraft:night_vision"), + (56, "minecraft:weakness"), + (57, "minecraft:strong_strength"), + (58, "minecraft:slowness"), + (59, "minecraft:strong_leaping"), + (60, "minecraft:strong_harming"), + (61, "minecraft:water_breathing"), + (62, "minecraft:invisibility"), + (64, "minecraft:mundane"), + (65, "minecraft:long_regeneration"), + (66, "minecraft:long_swiftness"), + (67, "minecraft:long_fire_resistance"), + (68, "minecraft:long_poison"), + (69, "minecraft:healing"), + (70, "minecraft:long_night_vision"), + (72, "minecraft:long_weakness"), + (73, "minecraft:long_strength"), + (74, "minecraft:long_slowness"), + (75, "minecraft:long_leaping"), + (76, "minecraft:harming"), + (77, "minecraft:long_water_breathing"), + (78, "minecraft:long_invisibility"), + (80, "minecraft:awkward"), + (81, "minecraft:long_regeneration"), + (82, "minecraft:long_swiftness"), + (83, "minecraft:long_fire_resistance"), + (84, "minecraft:long_poison"), + (85, "minecraft:healing"), + (86, "minecraft:long_night_vision"), + (88, "minecraft:long_weakness"), + (89, "minecraft:long_strength"), + (90, "minecraft:long_slowness"), + (91, "minecraft:long_leaping"), + (92, "minecraft:harming"), + (93, "minecraft:long_water_breathing"), + (94, "minecraft:long_invisibility"), + (96, "minecraft:thick"), + (97, "minecraft:regeneration"), + (98, "minecraft:swiftness"), + (99, "minecraft:long_fire_resistance"), + (100, "minecraft:poison"), + (101, "minecraft:strong_healing"), + (102, "minecraft:long_night_vision"), + (104, "minecraft:long_weakness"), + (105, "minecraft:strength"), + (106, "minecraft:long_slowness"), + (107, "minecraft:leaping"), + (108, "minecraft:strong_harming"), + (109, "minecraft:long_water_breathing"), + (110, "minecraft:long_invisibility"), + (113, "minecraft:regeneration"), + (114, "minecraft:swiftness"), + (115, "minecraft:long_fire_resistance"), + (116, "minecraft:poison"), + (117, "minecraft:strong_healing"), + (118, "minecraft:long_night_vision"), + (120, "minecraft:long_weakness"), + (121, "minecraft:strength"), + (122, "minecraft:long_slowness"), + (123, "minecraft:leaping"), + (124, "minecraft:strong_harming"), + (125, "minecraft:long_water_breathing"), + (126, "minecraft:long_invisibility"), +]; + /// `ChunkStructuresTemplateRenameFix.RENAMES`: structure id, child id, template renames. pub static STRUCTURE_TEMPLATE_RENAMES: &[(&str, &str, &[(&str, &str)])] = &[ ( diff --git a/crates/horizon-world/src/datafix/items.rs b/crates/horizon-world/src/datafix/items.rs index 9ec13ec3f..a5ce49972 100644 --- a/crates/horizon-world/src/datafix/items.rs +++ b/crates/horizon-world/src/datafix/items.rs @@ -248,6 +248,45 @@ const SPAWN_EGG_MOBS: &[&str] = &[ "zombified_piglin", ]; +/// The read hook of item stacks in the schema at `k` (before 1.20.5): V99's tables below V704, +/// V704's block entities with V99's entities up to V705, V705's from then on. +pub(super) fn add_names_at(stack: &mut Tag, k: super::schema::Key) { + use super::schema::key; + if k >= key(705, 0) { + return add_names(stack); + } + let item = namespaced(&as_str(stack.get("id")).unwrap_or_else(|| "minecraft:air".into())); + let Some(tag) = stack.get_mut("tag") else { + return; + }; + if let Some(be) = tag.get_mut("BlockEntityTag") + && item != "minecraft:air" + { + let found = if k >= key(704, 0) { + ITEM_TO_BLOCK_ENTITY.iter().find(|(i, _)| *i == item) + } else { + super::flat_tables::ITEM_TO_BLOCK_ENTITY_V99 + .iter() + .find(|(i, _)| *i == item) + }; + if let Some((_, id)) = found { + set(be, "id", string(id)); + } + } + if let Some(e) = tag.get_mut("EntityTag") + && e.get("id").is_none() + { + let id = match item.as_str() { + "minecraft:armor_stand" => Some("ArmorStand"), + "minecraft:painting" => Some("Painting"), + _ => None, + }; + if let Some(id) = id { + set(e, "id", string(id)); + } + } +} + /// `V99.addNames` with V704/V705's tables: the read hook of item stacks before 1.20.5. pub(super) fn add_names(stack: &mut Tag) { let item = namespaced(&as_str(stack.get("id")).unwrap_or_else(|| "minecraft:air".into())); diff --git a/crates/horizon-world/src/datafix/mod.rs b/crates/horizon-world/src/datafix/mod.rs index 7b31a168f..a7eebf41b 100644 --- a/crates/horizon-world/src/datafix/mod.rs +++ b/crates/horizon-world/src/datafix/mod.rs @@ -223,7 +223,7 @@ pub fn update(root: Ty, data: &mut Tag, from: i32, to: i32) { fn read_hooks(root: Ty, data: &mut Tag, k: Key) { walk(root, data, k, Ty::ItemStack, &mut |stack| { if k < key(3818, 5) { - items::add_names(stack); + items::add_names_at(stack, k); } else if let Tag::String(_) = stack { // V3818_5 UNPACK_PLAIN_ID: a bare item id is a stack of one. *stack = Tag::compound([("id", stack.clone()), ("count", Tag::Int(1))]); @@ -232,8 +232,19 @@ fn read_hooks(root: Ty, data: &mut Tag, k: Key) { if k >= key(1451, 6) { walk(root, data, k, Ty::Objective, &mut fixes_a::unpack_objective); } + // Block names are numbers or namespaced strings until V1451_4: a number is read as an + // int and written as one. + walk(root, data, k, Ty::BlockName, &mut |name| { + if let Some(n) = as_str(Some(name)) { + *name = string(&dynamic::namespaced(&n)); + } else if k < key(1451, 4) + && let Some(n) = dynamic::as_number(name) + { + *name = Tag::Int(n.int_value()); + } + }); // Namespaced name types read their strings with `ensureNamespaced`. - for ty in [Ty::Biome, Ty::EntityName] { + for ty in [Ty::Biome, Ty::EntityName, Ty::ItemName] { walk(root, data, k, ty, &mut |name| { if let Some(n) = as_str(Some(name)) { *name = string(&dynamic::namespaced(&n)); diff --git a/crates/horizon-world/src/datafix/schema.rs b/crates/horizon-world/src/datafix/schema.rs index b8a7f67fb..1153acf1b 100644 --- a/crates/horizon-world/src/datafix/schema.rs +++ b/crates/horizon-world/src/datafix/schema.rs @@ -96,6 +96,21 @@ impl Walker<'_> { } } fn list(&mut self, ty: Ty, v: &mut Tag, name: &str) { + // A list of block names reads the numbers of an array tag and writes them as a list. + if ty == Ty::BlockName + && self.k < key(1451, 4) + && let Some(array) = v.get_mut(name) + { + let numbers: Option> = match array { + Tag::IntArray(a) => Some(a.iter().map(|x| Tag::Int(*x)).collect()), + Tag::ByteArray(a) => Some(a.iter().map(|x| Tag::Byte(*x as i8)).collect()), + Tag::LongArray(a) => Some(a.iter().map(|x| Tag::Long(*x)).collect()), + _ => None, + }; + if let Some(numbers) = numbers { + *array = Tag::List(numbers); + } + } if let Some(Tag::List(items)) = v.get_mut(name) { for item in items { self.walk(ty, item); @@ -552,6 +567,7 @@ impl Walker<'_> { } "minecraft:crafter" if k >= key(3682, 0) => named_inventory(self, v), "minecraft:jukebox" => self.field(Ty::ItemStack, v, "RecordItem"), + "minecraft:flower_pot" if k < key(1451, 5) => self.field(Ty::ItemName, v, "Item"), "minecraft:sign" | "minecraft:hanging_sign" => { for side in ["front_text", "back_text"] { if let Some(s) = v.get_mut(side) { diff --git a/crates/horizon-world/src/datafix/schema_flat.rs b/crates/horizon-world/src/datafix/schema_flat.rs index d2f34b2ea..19f8a831f 100644 --- a/crates/horizon-world/src/datafix/schema_flat.rs +++ b/crates/horizon-world/src/datafix/schema_flat.rs @@ -15,20 +15,25 @@ impl Walker<'_> { let k = self.k; match ty { Ty::Entity => { - self.legacy_entity(v); + if k < key(705, 0) { + self.legacy_entity_old(v); + } else { + self.legacy_entity(v); + } true } // An entity of an unknown id does not read as a typed value: nothing in it is fixed. Ty::EntityTree => { - let id = namespaced(&as_str(v.get("id")).unwrap_or_default()); - if legacy_entity_known(&id, k) { - if let Some(Tag::List(trees)) = v.get_mut("Passengers") - && trees.iter().all(|t| { - legacy_entity_known( - &namespaced(&as_str(t.get("id")).unwrap_or_default()), - k, - ) - }) + if entity_tree_known(v, k) { + if k < key(135, 0) { + // The vehicle this entity rides is a tree of its own. + if let Some(vehicle) = v.get_mut("Riding") + && entity_tree_known(vehicle, k) + { + self.walk(Ty::EntityTree, vehicle); + } + } else if let Some(Tag::List(trees)) = v.get_mut("Passengers") + && trees.iter().all(|t| entity_tree_known(t, k)) { for tree in trees { self.walk(Ty::EntityTree, tree); @@ -38,6 +43,10 @@ impl Walker<'_> { } true } + Ty::BlockEntity if k < key(704, 0) => { + self.legacy_block_entity_old(v); + true + } Ty::Chunk => { if let Some(level) = v.get_mut("Level") { self.legacy_level_chunk(level); @@ -89,6 +98,98 @@ impl Walker<'_> { } } + /// `ENTITY` of the schemas V99 to V703 (CamelCase ids). + fn legacy_entity_old(&mut self, v: &mut Tag) { + let k = self.k; + if k < key(100, 0) { + self.list(Ty::ItemStack, v, "Equipment"); + } else { + self.list(Ty::ItemStack, v, "ArmorItems"); + self.list(Ty::ItemStack, v, "HandItems"); + } + let id = as_str(v.get("id")).unwrap_or_default(); + match id.as_str() { + "Item" | "ItemFrame" => self.field(Ty::ItemStack, v, "Item"), + "ThrownEgg" | "Snowball" | "Fireball" | "SmallFireball" | "ThrownEnderpearl" + | "ThrownExpBottle" | "WitherSkull" | "Arrow" | "TippedArrow" | "SpectralArrow" => { + self.field(Ty::BlockName, v, "inTile") + } + "ThrownPotion" => { + self.field(Ty::BlockName, v, "inTile"); + self.field(Ty::ItemStack, v, "Potion"); + } + "FallingSand" => { + self.field(Ty::BlockName, v, "Block"); + self.field(Ty::BlockEntity, v, "TileEntityData"); + } + "FireworksRocketEntity" => self.field(Ty::ItemStack, v, "FireworksItem"), + "Minecart" | "MinecartChest" | "MinecartHopper" => { + self.field(Ty::BlockName, v, "DisplayTile"); + self.list(Ty::ItemStack, v, "Items"); + } + "MinecartRideable" | "MinecartFurnace" | "MinecartTNT" => { + self.field(Ty::BlockName, v, "DisplayTile") + } + "MinecartSpawner" => { + self.field(Ty::BlockName, v, "DisplayTile"); + self.spawner(v); + } + "MinecartCommandBlock" => { + self.field(Ty::BlockName, v, "DisplayTile"); + self.field(Ty::TextComponent, v, "LastOutput"); + } + "Enderman" => self.field(Ty::BlockName, v, "carried"), + "EntityHorse" => { + self.list(Ty::ItemStack, v, "Items"); + self.field(Ty::ItemStack, v, "ArmorItem"); + self.field(Ty::ItemStack, v, "SaddleItem"); + } + "Horse" => { + self.field(Ty::ItemStack, v, "ArmorItem"); + self.field(Ty::ItemStack, v, "SaddleItem"); + } + "Donkey" | "Mule" => { + self.list(Ty::ItemStack, v, "Items"); + self.field(Ty::ItemStack, v, "SaddleItem"); + } + "ZombieHorse" | "SkeletonHorse" => self.field(Ty::ItemStack, v, "SaddleItem"), + "Villager" => { + self.list(Ty::ItemStack, v, "Inventory"); + if let Some(o) = v.get_mut("Offers") { + self.list(Ty::VillagerTrade, o, "Recipes"); + } + } + "ZombieVillager" => { + if let Some(o) = v.get_mut("Offers") { + self.list(Ty::VillagerTrade, o, "Recipes"); + } + } + "AreaEffectCloud" => self.field(Ty::Particle, v, "Particle"), + _ => {} + } + } + + /// `BLOCK_ENTITY` of the schemas V99 to V703 (CamelCase ids). + fn legacy_block_entity_old(&mut self, v: &mut Tag) { + let id = as_str(v.get("id")).unwrap_or_default(); + match id.as_str() { + "Furnace" | "Chest" | "Trap" | "Dropper" | "Cauldron" | "Hopper" => { + self.list(Ty::ItemStack, v, "Items") + } + "RecordPlayer" => self.field(Ty::ItemStack, v, "RecordItem"), + "Sign" => { + for line in ["Text1", "Text2", "Text3", "Text4"] { + self.field(Ty::TextComponent, v, line); + } + } + "MobSpawner" => self.spawner(v), + "FlowerPot" => self.field(Ty::ItemName, v, "Item"), + "Control" => self.field(Ty::TextComponent, v, "LastOutput"), + "Banner" => self.field(Ty::TextComponent, v, "CustomName"), + _ => {} + } + } + /// `ENTITY` of the schemas V705 to V1510 (the ids are `minecraft:...` since V704). fn legacy_entity(&mut self, v: &mut Tag) { let k = self.k; @@ -199,6 +300,9 @@ impl Walker<'_> { /// Whether the block entity id is registered in the schema at `k` (before 1.14). pub(super) fn legacy_block_entity_known(id: &str, k: Key) -> bool { + if k < key(704, 0) { + return crate::datafix::flat_tables::BLOCK_ENTITIES_V99.contains(&id); + } match id { "minecraft:furnace" | "minecraft:chest" @@ -220,8 +324,9 @@ pub(super) fn legacy_block_entity_known(id: &str, k: Key) -> bool { | "minecraft:banner" | "minecraft:structure_block" | "minecraft:end_gateway" - | "minecraft:command_block" - | "minecraft:shulker_box" => true, + | "minecraft:command_block" => true, + // V808 adds the shulker box. + "minecraft:shulker_box" => k >= key(808, 0), // Registered by V1125 and dropped by V1451_5. "minecraft:bed" => k >= key(1125, 0), "minecraft:noteblock" | "minecraft:flower_pot" => k < key(1451, 5), @@ -234,6 +339,9 @@ pub(super) fn legacy_block_entity_known(id: &str, k: Key) -> bool { /// Whether `id` is an entity registered by the schema at `k` (V705 to V1510). pub(in crate::datafix) fn legacy_entity_known(id: &str, k: Key) -> bool { + if k < key(705, 0) { + return old_entity_known(id, k); + } static ERAS: OnceLock<[HashSet; 5]> = OnceLock::new(); let eras = ERAS.get_or_init(|| { let mut set: HashSet = crate::datafix::flat_tables::ENTITIES_V1460 @@ -301,3 +409,23 @@ pub(in crate::datafix) fn legacy_entity_known(id: &str, k: Key) -> bool { }; eras[era].contains(id) } + +/// Whether the entity tree's own entity reads as a typed value at `k`. +pub(in crate::datafix) fn entity_tree_known(tree: &Tag, k: Key) -> bool { + legacy_entity_known(&namespaced(&as_str(tree.get("id")).unwrap_or_default()), k) +} + +/// Whether `id` is an entity registered by the schemas V99 to V703 (CamelCase ids). +fn old_entity_known(id: &str, k: Key) -> bool { + match id { + "Minecart" => k < key(107, 0), + "TippedArrow" => k < key(143, 0), + "PolarBear" => k >= key(501, 0), + "ElderGuardian" => k >= key(700, 0), + "WitherSkeleton" | "Stray" => k >= key(701, 0), + "ZombieVillager" | "Husk" => k >= key(702, 0), + "Horse" | "Donkey" | "Mule" | "ZombieHorse" | "SkeletonHorse" => k >= key(703, 0), + "EntityHorse" => k < key(703, 0), + _ => crate::datafix::flat_tables::ENTITIES_V99.contains(&id), + } +} diff --git a/tools/gen_flat_tables.py b/tools/gen_flat_tables.py index d6ec61378..396209199 100644 --- a/tools/gen_flat_tables.py +++ b/tools/gen_flat_tables.py @@ -50,6 +50,19 @@ def pairs(path, var, value_int=False, key_int=False): return out +def pairs_array(path, var, nullable=False): + """`map[N] = "x";` entries of an array declaration.""" + text = (FIXES / path).read_text() + start = text.index(var) + body = text[start:text.index('});', start)] + out = re.findall(r'map\[(\d+)\]\s*=\s*' + STR + r';', body) + if nullable: + out = [(i, v) for i, v in out] + if not out: + sys.exit(f'{path} {var}: no entries') + return out + + def strings(path, var, call): body = declaration((FIXES / path).read_text(), var) out = re.findall(call + r'\(\s*' + STR + r'\s*\)', body) if call else re.findall(STR, body) @@ -83,12 +96,12 @@ def emit_strs(name, entries, doc=''): return '\n'.join(lines) -def schema_entities(schema_file): - """The entity ids a schema's `registerEntities` registers.""" +def schema_entities(schema_file, method='registerEntities'): + """The entity (or block entity) ids a schema's `registerEntities` registers.""" text = (FIXES.parent / 'schemas' / schema_file).read_text() - start = text.index('registerEntities') + start = text.index(method) body = text[start:text.index('return map;', start)] - names = re.findall(r'(?:registerMob|registerSimple|registerThrowableProjectile)\(schema, map, "([^"]+)"', body) + names = re.findall(r'(?:registerMob|registerSimple|registerThrowableProjectile|registerMinecart|registerInventory)\(schema, map, "([^"]+)"', body) names += re.findall(r'schema\.registerSimple\(map, "([^"]+)"', body) names += re.findall(r'schema\.register\(\s*map,\s*"([^"]+)"', body) return sorted(set(names)) @@ -148,6 +161,17 @@ def main(): emit_pairs('COD_SALMON_EGGS', pairs('EntityCodSalmonFix.java', 'RENAMED_EGG_IDS')), emit_strs('ENTITIES_V1460', schema_entities('V1460.java'), doc='The entity ids V1460 registers (V705 has the same ones).'), + emit_strs('ENTITIES_V99', schema_entities('V99.java'), doc='The entity ids V99 registers.'), + emit_strs('BLOCK_ENTITIES_V99', schema_entities('V99.java', 'registerBlockEntities'), + doc='The block entity ids V99 registers.'), + emit_pairs('SPAWN_EGG_ENTITIES', pairs_array('ItemSpawnEggFix.java', 'ID_TO_ENTITY'), int_key=True, + doc='`ItemSpawnEggFix.ID_TO_ENTITY`: spawn egg damage to entity id.'), + emit_pairs('ENTITY_IDS', pairs('EntityIdFix.java', 'ID_MAP'), doc='`EntityIdFix.ID_MAP`.'), + emit_pairs('BLOCK_ENTITY_IDS', pairs('BlockEntityIdFix.java', 'ID_MAP'), doc='`BlockEntityIdFix.ID_MAP`.'), + emit_pairs('ITEM_TO_BLOCK_ENTITY_V99', pairs('../schemas/V99.java', 'ITEM_TO_BLOCKENTITY'), + doc='`V99.ITEM_TO_BLOCKENTITY`.'), + emit_pairs('ITEM_POTIONS', pairs_array('ItemPotionFix.java', 'POTIONS', nullable=True), int_key=True, + doc='`ItemPotionFix.POTIONS`: damage & 127 to potion (absent: null).'), structure_renames(), ] Path(args.out).write_text('\n\n'.join(parts) + '\n') From b7aa3b0d074d8b0695bf40b6a1598ba4338841ba Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 02:44:39 +0200 Subject: [PATCH 19/25] 1.10.2 world: no thrown potions or 1.8 zombie villagers (vanilla fixes cannot handle them) Co-Authored-By: Claude Sonnet 5.5 --- tools/datafix_scene_12.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/datafix_scene_12.py b/tools/datafix_scene_12.py index 851d93adb..00d87c0e8 100644 --- a/tools/datafix_scene_12.py +++ b/tools/datafix_scene_12.py @@ -459,11 +459,12 @@ MERGED = { 'zombie_horse': ('EntityHorse', 'Type:3'), 'skeleton_horse': ('EntityHorse', 'Type:4'), 'elder_guardian': ('Guardian', 'Elder:1b'), } ABSENT = { # kinds a version lacks - 8: {'shulker', 'shulker_bullet', 'area_effect_cloud', 'spectral_arrow', 'dragon_fireball', 'polar_bear', 'husk', 'stray', + # (thrown potions: vanilla's fix of key 705 crashes on them, so none before 1.11; 1.8 zombie villagers get a random profession) + 8: {'potion', 'zombie_villager', 'shulker', 'shulker_bullet', 'area_effect_cloud', 'spectral_arrow', 'dragon_fireball', 'polar_bear', 'husk', 'stray', 'vex', 'evocation_illager', 'vindication_illager', 'illusion_illager', 'llama', 'llama_spit', 'evocation_fangs', 'parrot'}, - 9: {'polar_bear', 'husk', 'stray', 'vex', 'evocation_illager', 'vindication_illager', 'illusion_illager', 'llama', + 9: {'potion', 'polar_bear', 'husk', 'stray', 'vex', 'evocation_illager', 'vindication_illager', 'illusion_illager', 'llama', 'llama_spit', 'evocation_fangs', 'parrot'}, - 10: {'vex', 'evocation_illager', 'vindication_illager', 'illusion_illager', 'llama', 'llama_spit', 'evocation_fangs', 'parrot'}, + 10: {'potion', 'vex', 'evocation_illager', 'vindication_illager', 'illusion_illager', 'llama', 'llama_spit', 'evocation_fangs', 'parrot'}, 11: {'parrot', 'illusion_illager'}, 12: set(), } @@ -1276,7 +1277,8 @@ def entity_list(stacks): add('zombie_villager', 'Profession:1,ConversionTime:-1,IsVillager:1b') for prof in range(6): add('zombie_villager', 'Profession:%d,ConversionTime:%d,IsBaby:%db,CustomName:"Zombie %d"' % (prof, [-1, 999999, -1][prof % 3], prof % 2, prof)) - add('zombie', 'IsVillager:1b,VillagerProfession:2') + if ERA > 8: + add('zombie', 'IsVillager:1b,VillagerProfession:2') # animals for color in range(16): add('sheep', 'Color:%db,Sheared:%db,Age:%d,InLove:0,%s' % (color, color % 2, -24000 if color % 3 == 0 else 0, ATTRS if color == 3 else 'Health:8.0f')) From 170565391217b475e0fc69c72ed57af5a1fb1560 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 02:53:54 +0200 Subject: [PATCH 20/25] Datafix harness: worlds saved before 1.17 stay in the branch's own .local until integrated --- tools/datafix_worlds.py | 11 ++++++++++- tools/test_datafix_parity.py | 12 ++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/tools/datafix_worlds.py b/tools/datafix_worlds.py index 81c039cb7..ea7d9109c 100644 --- a/tools/datafix_worlds.py +++ b/tools/datafix_worlds.py @@ -38,6 +38,15 @@ LOCAL = ROOT / '.local' / 'datafix' # Old server jars and their worlds are inputs, not outputs: keep them beside the # vanilla data, which parallel worktrees share (.local/minecraft links there). SHARED = (ROOT / '.local' / 'minecraft').resolve().parent / 'datafix' +# Worlds saved before 1.17 are only read by branches that carry the fixes for them: until those are +# integrated they stay in the worktree's own .local, not in the folder every worktree's harness reads. +LEGACY = {'1.8.9', '1.9.4', '1.10.2', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.1', '1.16.5'} + + +def worlds_dir(name): + return (LOCAL if name.split('-')[0] in LEGACY else SHARED) / 'worlds' + + VERSIONS = ['1.8.9', '1.9.4', '1.10.2', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.1', '1.16.5', '1.17.1', '1.18.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4', '1.20.5', '1.20.6', '1.21.1', '1.21.3', '1.21.4', '1.21.5', '1.21.6', '1.21.8', '1.21.9', '1.21.10', '1.21.11', '26.1', '26.1.2', '26.2'] # Extra worlds of one version with another world type, for the level.dat generator settings: @@ -407,7 +416,7 @@ def build(name, force=False): version, props = VARIANTS.get(name, (name, None)) jar, data_version, protocol = server_jar(version) data_version = data_version or 0 # 1.8 saves have no DataVersion - target = SHARED / 'worlds' / name + target = worlds_dir(name) / name if target.exists() and not force: print(f'{version}: kept {target}') return [] diff --git a/tools/test_datafix_parity.py b/tools/test_datafix_parity.py index a07bf5557..412af1f3c 100644 --- a/tools/test_datafix_parity.py +++ b/tools/test_datafix_parity.py @@ -53,6 +53,10 @@ IGNORED = { } +def world_path(name): + return (LOCAL / 'worlds' if (LOCAL / 'worlds' / name).is_dir() else WORLDS) / name + + def java_classpath(): import oracle_harness as harness import test_rust_parity as base @@ -214,20 +218,20 @@ def main(): WORLDS.parent.mkdir(parents=True, exist_ok=True) with open(WORLDS.parent / 'generate.lock', 'w') as lock: fcntl.flock(lock, fcntl.LOCK_EX) # another worktree may be generating them - missing = [v for v in [*datafix_worlds.VERSIONS, *datafix_worlds.VARIANTS] if not (WORLDS / v / 'level.dat').exists()] + missing = [v for v in [*datafix_worlds.VERSIONS, *datafix_worlds.VARIANTS] if not (datafix_worlds.worlds_dir(v) / v / 'level.dat').exists()] if missing: print('generating sample worlds:', ' '.join(missing), flush=True) subprocess.run([sys.executable, str(ROOT / 'tools' / 'datafix_worlds.py'), *missing], cwd=ROOT, check=True) - worlds = sorted(p.name for p in WORLDS.iterdir() if p.is_dir()) + worlds = sorted(p.name for d in (WORLDS, LOCAL / 'worlds') if d.is_dir() for p in d.iterdir() if p.is_dir()) band = args.band if band and not args.versions: # worlds in the layout of before 1.16, saved before the target - worlds = [w for w in worlds if json.loads((WORLDS / w / 'datafix-source.json').read_text())['data_version'] < band] + worlds = [w for w in worlds if json.loads((world_path(w) / 'datafix-source.json').read_text())['data_version'] < band] versions = shard(args.versions or worlds) classpath = java_classpath() binary = None if args.vanilla_only else Path(args.binary) if args.binary else build_rust() total = 0 for version in versions: - world = WORLDS / version + world = world_path(version) source = json.loads((world / 'datafix-source.json').read_text()) print(f'{version} (DataVersion {source["data_version"]})') RUN.mkdir(parents=True, exist_ok=True) From b8ee0b27b3720212d008fa6aac6df83c7f6a354c Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 02:54:04 +0200 Subject: [PATCH 21/25] Datafix harness: pre-1.17 worlds in worlds-pre-1.17, which other worktrees' harnesses do not read --- tools/datafix_worlds.py | 2 +- tools/test_datafix_parity.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/datafix_worlds.py b/tools/datafix_worlds.py index ea7d9109c..13bb3f6dc 100644 --- a/tools/datafix_worlds.py +++ b/tools/datafix_worlds.py @@ -44,7 +44,7 @@ LEGACY = {'1.8.9', '1.9.4', '1.10.2', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1 def worlds_dir(name): - return (LOCAL if name.split('-')[0] in LEGACY else SHARED) / 'worlds' + return LOCAL / 'worlds-pre-1.17' if name.split('-')[0] in LEGACY else SHARED / 'worlds' VERSIONS = ['1.8.9', '1.9.4', '1.10.2', '1.11.2', '1.12.2', '1.13.2', '1.14.4', '1.15.2', '1.16.1', '1.16.5', '1.17.1', '1.18.1', '1.18.2', '1.19', '1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4', '1.20.5', '1.20.6', '1.21.1', diff --git a/tools/test_datafix_parity.py b/tools/test_datafix_parity.py index 412af1f3c..8638c5cf1 100644 --- a/tools/test_datafix_parity.py +++ b/tools/test_datafix_parity.py @@ -54,7 +54,7 @@ IGNORED = { def world_path(name): - return (LOCAL / 'worlds' if (LOCAL / 'worlds' / name).is_dir() else WORLDS) / name + return (LOCAL / 'worlds-pre-1.17' if (LOCAL / 'worlds-pre-1.17' / name).is_dir() else WORLDS) / name def java_classpath(): @@ -222,7 +222,7 @@ def main(): if missing: print('generating sample worlds:', ' '.join(missing), flush=True) subprocess.run([sys.executable, str(ROOT / 'tools' / 'datafix_worlds.py'), *missing], cwd=ROOT, check=True) - worlds = sorted(p.name for d in (WORLDS, LOCAL / 'worlds') if d.is_dir() for p in d.iterdir() if p.is_dir()) + worlds = sorted(p.name for d in (WORLDS, LOCAL / 'worlds-pre-1.17') if d.is_dir() for p in d.iterdir() if p.is_dir()) band = args.band if band and not args.versions: # worlds in the layout of before 1.16, saved before the target worlds = [w for w in worlds if json.loads((world_path(w) / 'datafix-source.json').read_text())['data_version'] < band] From 19802a4a6519e7c1deabd316d7316ac372051e6b Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 03:13:32 +0200 Subject: [PATCH 22/25] Keep what the schema of the data did not know untyped, read the legacy data again at 1.14 DataFixerUpper reads the data once with its own schema: an entity tree of an id that schema lacks stays untyped for good, and a list of trees is typed only if all of them are. Spawner potentials follow that, the spawner wrapping skips untyped data, and a stack without a string id is an empty equipment slot. The raw maps entities remember are taken again where the fixes of before 1.14 end. Co-Authored-By: Claude Sonnet 5.5 --- crates/horizon-world/src/datafix/fixes_b.rs | 9 +- .../horizon-world/src/datafix/fixes_cliffs.rs | 13 ++- .../horizon-world/src/datafix/fixes_flat.rs | 2 +- crates/horizon-world/src/datafix/mod.rs | 24 +++++ crates/horizon-world/src/datafix/schema.rs | 2 + .../horizon-world/src/datafix/schema_flat.rs | 97 +++++++++++++++++-- 6 files changed, 132 insertions(+), 15 deletions(-) diff --git a/crates/horizon-world/src/datafix/fixes_b.rs b/crates/horizon-world/src/datafix/fixes_b.rs index 2b88bc742..708d266c8 100644 --- a/crates/horizon-world/src/datafix/fixes_b.rs +++ b/crates/horizon-world/src/datafix/fixes_b.rs @@ -1135,8 +1135,13 @@ pub(super) fn equipment_to_slots(e: &mut Tag) { }; let body = remove(e, "body_armor_item"); let saddle = remove(e, "saddle"); - // A stack without an id is a placeholder for an empty slot. - let pick = |list: &Vec, i: usize| list.get(i).filter(|s| s.get("id").is_some()).cloned(); + // A stack without an id (an id that does not read as an item name is none) is a + // placeholder for an empty slot. + let pick = |list: &Vec, i: usize| { + list.get(i) + .filter(|s| matches!(s.get("id"), Some(Tag::String(_)))) + .cloned() + }; let slots = [ ("mainhand", pick(&hands, 0)), ("offhand", pick(&hands, 1)), diff --git a/crates/horizon-world/src/datafix/fixes_cliffs.rs b/crates/horizon-world/src/datafix/fixes_cliffs.rs index 9c2d55a88..c9861c407 100644 --- a/crates/horizon-world/src/datafix/fixes_cliffs.rs +++ b/crates/horizon-world/src/datafix/fixes_cliffs.rs @@ -736,11 +736,20 @@ pub(super) fn add_flag(cx: &mut Cx, flag: &str, value: bool) { /// `SpawnerDataFix`: spawn data and potentials wrapped as weighted entries. fn spawner_data(cx: &mut Cx) { + use super::schema::flat::UNTYPED; cx.each(Ty::UntaggedSpawner, |v| { - if let Some(data) = remove(v, "SpawnData") { + // Only what read as typed is wrapped. + if v.get("SpawnData").is_some_and(|d| d.get(UNTYPED).is_none()) + && let Some(data) = remove(v, "SpawnData") + { set(v, "SpawnData", Tag::compound([("entity", data)])); } - if let Some(potentials) = v.get("SpawnPotentials").cloned() { + let untyped = |entries: &Tag| { + stream(Some(entries)) + .iter() + .any(|e| e.get("Entity").is_some_and(|t| t.get(UNTYPED).is_some())) + }; + if let Some(potentials) = v.get("SpawnPotentials").filter(|p| !untyped(p)).cloned() { let entries = stream(Some(&potentials)) .into_iter() .map(|mut entry| { diff --git a/crates/horizon-world/src/datafix/fixes_flat.rs b/crates/horizon-world/src/datafix/fixes_flat.rs index 0b806df99..29f24b0ef 100644 --- a/crates/horizon-world/src/datafix/fixes_flat.rs +++ b/crates/horizon-world/src/datafix/fixes_flat.rs @@ -499,9 +499,9 @@ fn spawn_eggs(cx: &mut Cx) { let entity_id = s .get("tag") .and_then(|t| t.get("EntityTag")) + .filter(|e| super::schema::flat::entity_tree_known(e, input)) .and_then(|e| as_str(e.get("id"))) .map(|id| namespaced(&id)) - .filter(|id| super::schema::flat::legacy_entity_known(id, input)) .unwrap_or_else(|| "minecraft:wither".to_owned()); let egg = lookup(t::SPAWN_EGGS, &entity_id).unwrap_or("minecraft:pig_spawn_egg"); set(s, "id", string(egg)); diff --git a/crates/horizon-world/src/datafix/mod.rs b/crates/horizon-world/src/datafix/mod.rs index a7eebf41b..0d04bb63f 100644 --- a/crates/horizon-world/src/datafix/mod.rs +++ b/crates/horizon-world/src/datafix/mod.rs @@ -133,6 +133,9 @@ pub fn reread(k: Key, e: &mut Tag) { /// [`reread`] for a value of another type (a block entity). pub fn reread_as(ty: Ty, k: Key, v: &mut Tag) { + // What was untyped is read again with the new schema. + schema::flat::strip_untyped(v); + schema::flat::mark_untyped(ty, v, k); walk(ty, v, k, Ty::BlockEntity, &mut mark_read); walk(ty, v, k, Ty::Entity, &mut mark_read); } @@ -152,6 +155,7 @@ fn strip_last_read(v: &mut Tag) { match v { Tag::Compound(c) => { c.remove(&dynamic::key(LAST_READ)); + c.remove(&dynamic::key(schema::flat::UNTYPED)); for value in c.values_mut() { strip_last_read(value); } @@ -207,10 +211,30 @@ pub fn update(root: Ty, data: &mut Tag, from: i32, to: i32) { // The data is read once with the schema of its version (its read hooks)... walk(root, data, from_key, Ty::BlockEntity, &mut mark_read); walk(root, data, from_key, Ty::Entity, &mut mark_read); + schema::flat::mark_untyped(root, data, from_key); read_hooks(root, data, from_key); // ...then every fix above that key, up to the target version... + let mut refreshed = from_key >= schema::flat::END; for (k, fix) in fixes() { if k > from_key && k / 10 <= to_version { + if !refreshed && k >= schema::flat::END { + // The data of before 1.14 is read again once its own fixes are done. + refreshed = true; + walk( + root, + data, + schema::flat::END - 1, + Ty::BlockEntity, + &mut mark_read, + ); + walk( + root, + data, + schema::flat::END - 1, + Ty::Entity, + &mut mark_read, + ); + } fix(&mut Cx { root, data, k }); } } diff --git a/crates/horizon-world/src/datafix/schema.rs b/crates/horizon-world/src/datafix/schema.rs index 1153acf1b..9f5ab287a 100644 --- a/crates/horizon-world/src/datafix/schema.rs +++ b/crates/horizon-world/src/datafix/schema.rs @@ -224,6 +224,8 @@ impl Walker<'_> { } } Ty::EntityChunk => self.list(Ty::EntityTree, v, "Entities"), + // What the schema it was read with did not know stays untyped (see `flat::UNTYPED`). + Ty::EntityTree if v.get(flat::UNTYPED).is_some() => {} Ty::EntityTree => { self.list(Ty::EntityTree, v, "Passengers"); self.walk(Ty::Entity, v); diff --git a/crates/horizon-world/src/datafix/schema_flat.rs b/crates/horizon-world/src/datafix/schema_flat.rs index 19f8a831f..12730c255 100644 --- a/crates/horizon-world/src/datafix/schema_flat.rs +++ b/crates/horizon-world/src/datafix/schema_flat.rs @@ -3,11 +3,60 @@ //! shape differs from the general code of [`super`]; the other types fall through. use super::{Key, Ty, Walker, as_str, key, namespaced}; use crate::nbt::Tag; +use std::cell::Cell; use std::collections::HashSet; use std::sync::OnceLock; +/// DataFixerUpper reads the data once, with the schema of its version: an entity tree +/// of an id that schema does not register stays untyped for good, even when a later +/// schema registers the id. Such a tree carries this key until the data is written. +pub(in crate::datafix) const UNTYPED: &str = "\u{0}untyped"; + +thread_local! { + /// Set while the data is read with its own schema: the walkers mark what is untyped. + static MARKING: Cell = const { Cell::new(false) }; +} + +/// Mark the untyped entity trees of data read with the schema at `k`. +pub(in crate::datafix) fn mark_untyped(root: Ty, data: &mut Tag, k: Key) { + if k >= END { + return; + } + MARKING.with(|m| m.set(true)); + super::walk(root, data, k, Ty::BlockEntity, &mut |_| {}); + MARKING.with(|m| m.set(false)); +} + +/// Remove the untyped marks of `v` (it is read again). +pub(in crate::datafix) fn strip_untyped(v: &mut Tag) { + match v { + Tag::Compound(c) => { + c.remove(&crate::datafix::dynamic::key(UNTYPED)); + c.values_mut().for_each(strip_untyped); + } + Tag::List(items) => items.iter_mut().for_each(strip_untyped), + _ => {} + } +} + +fn mark(tree: &mut Tag) { + if let Tag::Compound(_) = tree { + crate::datafix::dynamic::set(tree, UNTYPED, Tag::Byte(1)); + } +} + +/// Whether every tree of a list reads as typed (a list reads only if all its elements do); +/// while the data is read, the trees of a list that does not are marked. +pub(in crate::datafix) fn all_trees_typed(trees: &mut [Tag], k: Key) -> bool { + let ok = trees.iter().all(|t| entity_tree_known(t, k)); + if !ok && MARKING.with(Cell::get) { + trees.iter_mut().for_each(mark); + } + ok +} + /// The schemas below this key are described here. -pub(super) const END: Key = key(1800, 0); +pub(in crate::datafix) const END: Key = key(1800, 0); impl Walker<'_> { /// `children` for a schema below [`END`]; false when the general code applies. @@ -27,22 +76,30 @@ impl Walker<'_> { if entity_tree_known(v, k) { if k < key(135, 0) { // The vehicle this entity rides is a tree of its own. - if let Some(vehicle) = v.get_mut("Riding") - && entity_tree_known(vehicle, k) - { - self.walk(Ty::EntityTree, vehicle); + if let Some(vehicle) = v.get_mut("Riding") { + if entity_tree_known(vehicle, k) { + self.walk(Ty::EntityTree, vehicle); + } else if MARKING.with(Cell::get) { + mark(vehicle); + } } } else if let Some(Tag::List(trees)) = v.get_mut("Passengers") - && trees.iter().all(|t| entity_tree_known(t, k)) + && all_trees_typed(trees, k) { for tree in trees { self.walk(Ty::EntityTree, tree); } } self.walk(Ty::Entity, v); + } else if MARKING.with(Cell::get) { + mark(v); } true } + Ty::UntaggedSpawner if k >= key(106, 0) => { + self.legacy_untagged_spawner(v); + true + } Ty::BlockEntity if k < key(704, 0) => { self.legacy_block_entity_old(v); true @@ -68,9 +125,7 @@ impl Walker<'_> { let k = self.k; // A list of entity trees reads only if every entity of it is known. if let Some(Tag::List(trees)) = v.get_mut("Entities") - && trees.iter().all(|t| { - legacy_entity_known(&namespaced(&as_str(t.get("id")).unwrap_or_default()), k) - }) + && all_trees_typed(trees, k) { for tree in trees { self.walk(Ty::EntityTree, tree); @@ -98,6 +153,27 @@ impl Walker<'_> { } } + /// `UNTAGGED_SPAWNER` of V106 to V2830: the potential entities are a list that + /// reads only if all of them do. + fn legacy_untagged_spawner(&mut self, v: &mut Tag) { + let k = self.k; + if let Some(Tag::List(potentials)) = v.get_mut("SpawnPotentials") { + let mut trees: Vec> = + potentials.iter_mut().map(|p| p.get_mut("Entity")).collect(); + let ok = trees + .iter() + .all(|t| t.as_deref().is_some_and(|t| entity_tree_known(t, k))); + if ok { + for tree in trees.iter_mut().flatten() { + self.walk(Ty::EntityTree, tree); + } + } else if MARKING.with(Cell::get) { + trees.iter_mut().flatten().for_each(|t| mark(t)); + } + } + self.field(Ty::EntityTree, v, "SpawnData"); + } + /// `ENTITY` of the schemas V99 to V703 (CamelCase ids). fn legacy_entity_old(&mut self, v: &mut Tag) { let k = self.k; @@ -412,7 +488,8 @@ pub(in crate::datafix) fn legacy_entity_known(id: &str, k: Key) -> bool { /// Whether the entity tree's own entity reads as a typed value at `k`. pub(in crate::datafix) fn entity_tree_known(tree: &Tag, k: Key) -> bool { - legacy_entity_known(&namespaced(&as_str(tree.get("id")).unwrap_or_default()), k) + tree.get(UNTYPED).is_none() + && legacy_entity_known(&namespaced(&as_str(tree.get("id")).unwrap_or_default()), k) } /// Whether `id` is an entity registered by the schemas V99 to V703 (CamelCase ids). From 8c818c6f84c59de4ca2b87f86d7b958b7b5bc8b1 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 03:17:12 +0200 Subject: [PATCH 23/25] 1.8.9 world: real maps by right click, objectives its scoreboard knows Co-Authored-By: Claude Sonnet 5.5 --- tools/datafix_scene_12.py | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/tools/datafix_scene_12.py b/tools/datafix_scene_12.py index 00d87c0e8..1444227d9 100644 --- a/tools/datafix_scene_12.py +++ b/tools/datafix_scene_12.py @@ -844,6 +844,13 @@ def make_player(Bot, varint, parse_varint, mcstring): p, eid = parse_varint(data, 0) self.entities[eid] = data[p + 16] # skip the uuid, the type byte + def use_map_18(self, slot): + """1.8 only: select a hotbar slot and right click in the air (an empty map there becomes a map).""" + self.send(0x09, struct.pack('>h', slot)) + time.sleep(0.3) + self.send(0x08, struct.pack('>qBhBBB', -1, 255, -1, 0, 0, 0)) + time.sleep(1.0) + def move(self, x, y, z): self.pos = (x, y, z) self.send(0x0D, struct.pack('>dddB', x, y, z, 1)) @@ -1455,7 +1462,7 @@ def inventory_commands(stacks): # a hand-picked start of the hotbar, then the sweep hot = [item('map'), item('map'), item('map'), item('iron_hoe', 1, 249), item('stone', 64), item('flint_and_steel', 1, 63), item('wool', 64, 14), item('cobblestone', 32), item('torch', 20)] - if ERA < 12: # nobody uses the maps here: the server makes the map files of filled maps in a player's inventory + if 8 < ERA < 12: # nobody uses the maps here: the server makes the map files of filled maps in a player's inventory hot[:3] = [item('filled_map', 1, i) for i in range(3)] for i, st in enumerate(hot): cmds.append(f'replaceitem entity {PLAYER} slot.hotbar.{i} {st.command_args()}') @@ -1489,9 +1496,16 @@ OBJECTIVES = [('dummy1', 'dummy', 'Dummy "quoted" objective'), ('kills', 'player ('mine_log', 'stat.mineBlock.minecraft.log', None), ('killed_pig', 'stat.killEntity.Pig', None)] +def objectives(): + """The objectives this version has (1.8 lacks the food, air, armor, xp and level criteria and the pickup and drop statistics).""" + if ERA >= 9: + return OBJECTIVES + return [o for o in OBJECTIVES if o[1] not in ('food', 'air', 'armor', 'xp', 'level') and not o[1].startswith(('stat.pickup', 'stat.drop'))] + + def scoreboard_commands(): cmds = [] - for name, crit, disp in OBJECTIVES: + for name, crit, disp in objectives(): cmds.append(f'scoreboard objectives add {name} {crit}' + (f' {disp}' if disp else '')) cmds += ['scoreboard objectives setdisplay sidebar kills', 'scoreboard objectives setdisplay list hp', 'scoreboard objectives setdisplay belowName deaths', 'scoreboard objectives setdisplay sidebar.team.red mined', @@ -1509,7 +1523,7 @@ def scoreboard_commands(): cmds.append(f'scoreboard teams option t_{c} collisionRule {["always", "never", "pushOtherTeams", "pushOwnTeam"][i % 4]}') cmds += ['scoreboard teams join t_red ' + PLAYER, 'scoreboard teams join t_blue Fakeplayer1 Fakeplayer2', 'scoreboard teams join t_gold Zombie'] - for i, (name, crit, disp) in enumerate(OBJECTIVES): + for i, (name, crit, disp) in enumerate(objectives()): if crit in ('health', 'food', 'air', 'armor', 'xp', 'level'): continue # read-only criteria cmds.append(f'scoreboard players set {PLAYER} {name} {i * 7 - 3}') @@ -1765,6 +1779,10 @@ def populate(server, Bot, port, protocol, name, problems): problems.append(('lab_actions', ['the bot lost its connection: %s' % error])) else: say(achievement_commands()) + if ERA == 8: # 1.8 makes a map only when an empty map is used + for slot in range(3): + bot.use_map_18(slot) + bot.send(0x09, struct.pack('>h', 8)) time.sleep(3) # the inventory ticks once: the server creates the maps time.sleep(2) say(['save-all flush']) From 3d20af9a9c751051eda37c9ebcddcf67fdc26c6d Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 03:27:20 +0200 Subject: [PATCH 24/25] Datafix: every server fix ported; saves without a DataVersion upgrade from -1 --- crates/horizon-client/src/save.rs | 7 +++---- crates/horizon-world/src/datafix/mod.rs | 14 +++++++------- docs/world-data.md | 2 +- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/crates/horizon-client/src/save.rs b/crates/horizon-client/src/save.rs index 274ad9820..1b1a21d18 100644 --- a/crates/horizon-client/src/save.rs +++ b/crates/horizon-client/src/save.rs @@ -121,10 +121,9 @@ pub fn upgrade_older_world(world: &Path) -> Result<()> { let Some(root) = read_dat(&world.join("level.dat")) else { return Ok(()); }; - let version = root - .get("Data") - .and_then(|d| number(d.get("DataVersion"))) - .unwrap_or(i64::from(DATA_VERSION)); + let version = root.get("Data").map_or(i64::from(DATA_VERSION), |d| { + number(d.get("DataVersion")).unwrap_or(-1) // saves of 1.8 and before have none + }); if version >= i64::from(DATA_VERSION) { return Ok(()); } diff --git a/crates/horizon-world/src/datafix/mod.rs b/crates/horizon-world/src/datafix/mod.rs index 0d04bb63f..014c84614 100644 --- a/crates/horizon-world/src/datafix/mod.rs +++ b/crates/horizon-world/src/datafix/mod.rs @@ -1,13 +1,13 @@ -//! Vanilla's DataFixers from the 1.19 schemas on (`net.minecraft.util.datafix`): -//! the data of worlds saved by 1.18.2 to 26.2 brought to the 26.3 format exactly +//! Vanilla's DataFixers (`net.minecraft.util.datafix`, DataVersion 99 on): +//! the data of worlds saved by 1.8 to 26.2 brought to the 26.3 format exactly //! as 26.3 does when it reads them, and the file fixes it runs when it opens //! such a world (`net.minecraft.util.filefix`). //! //! DataFixerUpper reads the data once with the schema of its version (running //! the schema's read hooks), applies every fix with a key above that version //! in order, and writes it with the current schema. Each fix finds its values -//! with the schema just below its own key ([`schema`]). Data older than -//! [`OLDEST_SUPPORTED`] needs fixes that are not ported. The fixes of client +//! with the schema just below its own key ([`schema`]). Every +//! fix of the server data is ported ([`OLDEST_SUPPORTED`]). The fixes of client //! files (options, hotbars, debug profiles) are not ported either. mod block_state_data; mod chunk_flatten; @@ -34,9 +34,9 @@ use schema::{Key, Ty, key, walk}; /// The DataVersion of the game. pub const CURRENT: i32 = crate::DATA_VERSION; -/// Data saved before this DataVersion (1.17 is 2724) needs fixes that are not -/// ported (2717 and everything before). -pub const OLDEST_SUPPORTED: i32 = 2571; +/// Data saved before this DataVersion needs fixes that are not ported. Every +/// server fix is, down to the saves of 1.8, which have no DataVersion (read as -1). +pub const OLDEST_SUPPORTED: i32 = -1; /// `Identifier.tryParse` validity, as `NamespacedSchema.ensureNamespaced` uses it. pub fn identifier(id: &str) -> Option<(String, String)> { diff --git a/docs/world-data.md b/docs/world-data.md index 57543de8f..59b6049b7 100644 --- a/docs/world-data.md +++ b/docs/world-data.md @@ -68,7 +68,7 @@ The registry loader checks data version, duplicate states, default IDs and block-name coverage. The local oracle exports all 35,723 state identities and defaults from vanilla. This imports identities, not block implementations, shapes or behavior. Registry exports and game-derived fixtures stay in `.local/`. -Chunk access requires data version 5023. A world saved by an older version is upgraded when it is opened, as 26.3 does: the file fixes (`FileFixerUpper`) and level.dat, then vanilla's DataFixers over every chunk, entity chunk, POI chunk, player, saved data, advancements and statistics file (`horizon_world::datafix`; vanilla upgrades each file as it reads it, Horizon all of them on opening). `tools/test_datafix_parity.py` compares the result with vanilla's own upgrade over worlds written by older server jars. Worlds older than the ported fixes are refused with a message pointing at `tools/upgrade_world.py`, which runs vanilla's `--forceUpgrade` on a copy. `BlockRegistry::resolve` rejects invalid property descriptors. The separate +Chunk access requires data version 5023. A world saved by an older version is upgraded when it is opened, as 26.3 does: the file fixes (`FileFixerUpper`) and level.dat, then vanilla's DataFixers over every chunk, entity chunk, POI chunk, player, saved data, advancements and statistics file (`horizon_world::datafix`; vanilla upgrades each file as it reads it, Horizon all of them on opening). `tools/test_datafix_parity.py` compares the result with vanilla's own upgrade over worlds written by older server jars. Every server data fix is ported, from the saves of 1.8 (no DataVersion) on; only the fixes of client files (options, hotbars) are not. `BlockRegistry::resolve` rejects invalid property descriptors. The separate [block-state JSON codec](block-state-codecs.md) reproduces vanilla property fallback for compact and full JSON forms. From 9b1c29463b667184ec628ef1a5262e23c7d14706 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 03:29:13 +0200 Subject: [PATCH 25/25] Test: worlds from 1.12.2 and 1.16.5 are upgraded on opening --- crates/horizon-client/src/save.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/horizon-client/src/save.rs b/crates/horizon-client/src/save.rs index 673752bcb..880729f8c 100644 --- a/crates/horizon-client/src/save.rs +++ b/crates/horizon-client/src/save.rs @@ -2242,10 +2242,12 @@ mod tests { super::read_dat(&dir.join("level.dat")) .and_then(|r| super::number(r.get("Data")?.get("DataVersion"))) }; - // 1.16.5, older than the ported fixes: refused, left as it is. - super::write_dat(&dir.join("level.dat"), level(2586)).unwrap(); - assert!(super::upgrade_older_world(&dir).is_err()); - assert_eq!(version(&dir), Some(2586)); + // 1.12.2 and 1.16.5: upgraded too, every server fix is ported. + for old in [1343, 2586] { + super::write_dat(&dir.join("level.dat"), level(old)).unwrap(); + super::upgrade_older_world(&dir).unwrap(); + assert_eq!(version(&dir), Some(i64::from(super::DATA_VERSION))); + } // 1.21.1: upgraded to the current version. super::write_dat(&dir.join("level.dat"), level(3955)).unwrap(); super::upgrade_older_world(&dir).unwrap();