From 7743bb1a84020752d49d1b308da6cc93f7254e80 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 27 May 2022 00:32:10 -0500 Subject: [PATCH 01/33] Fix version.py to work from any directory --- codegen/lib/code/version.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/codegen/lib/code/version.py b/codegen/lib/code/version.py index 77911f16..e131a598 100644 --- a/codegen/lib/code/version.py +++ b/codegen/lib/code/version.py @@ -1,6 +1,7 @@ import re +import os -README_DIR = '../README.md' +README_DIR = os.path.join(os.path.dirname(__file__), '../../../README.md') VERSION_REGEX = r'\*Currently supported Minecraft version: `(.*)`.\*' @@ -30,6 +31,7 @@ def set_version_id(version_id: str) -> None: with open(README_DIR, 'w') as f: f.write(readme_text) + def get_protocol_version() -> str: # azalea-protocol/src/packets/mod.rs # pub const PROTOCOL_VERSION: u32 = 758; @@ -38,7 +40,9 @@ def get_protocol_version() -> str: for line in mod_rs: if line.strip().startswith('pub const PROTOCOL_VERSION'): return line.strip().split(' ')[-1].strip(';') - raise Exception('Could not find protocol version in azalea-protocol/src/packets/mod.rs') + raise Exception( + 'Could not find protocol version in azalea-protocol/src/packets/mod.rs') + def set_protocol_version(protocol_version: str) -> None: with open('../azalea-protocol/src/packets/mod.rs', 'r') as f: @@ -48,7 +52,8 @@ def set_protocol_version(protocol_version: str) -> None: mod_rs[i] = f'pub const PROTOCOL_VERSION: u32 = {protocol_version};' break else: - raise Exception('Could not find protocol version in azalea-protocol/src/packets/mod.rs') + raise Exception( + 'Could not find protocol version in azalea-protocol/src/packets/mod.rs') with open('../azalea-protocol/src/packets/mod.rs', 'w') as f: - f.write('\n'.join(mod_rs)) \ No newline at end of file + f.write('\n'.join(mod_rs)) From 68ab3d65247c02d469d77e5702f57e46f690965b Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 27 May 2022 01:11:42 -0500 Subject: [PATCH 02/33] Fix codegen more --- codegen/lib/code/version.py | 3 ++- codegen/lib/download.py | 40 ++++++++++++++++++------------------- codegen/lib/utils.py | 5 +++++ 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/codegen/lib/code/version.py b/codegen/lib/code/version.py index e131a598..4c8500be 100644 --- a/codegen/lib/code/version.py +++ b/codegen/lib/code/version.py @@ -1,7 +1,8 @@ import re import os +from lib.utils import get_dir_location -README_DIR = os.path.join(os.path.dirname(__file__), '../../../README.md') +README_DIR = get_dir_location('../README.md') VERSION_REGEX = r'\*Currently supported Minecraft version: `(.*)`.\*' diff --git a/codegen/lib/download.py b/codegen/lib/download.py index 5030f8f3..0d6668bd 100644 --- a/codegen/lib/download.py +++ b/codegen/lib/download.py @@ -1,42 +1,40 @@ +from lib.utils import get_dir_location from .mappings import Mappings import requests import json import os # make sure the downloads directory exists -if not os.path.exists('downloads'): - os.mkdir('downloads') +if not os.path.exists(get_dir_location('downloads')): + os.mkdir(get_dir_location('downloads')) def get_burger(): - if not os.path.exists('downloads/Burger'): - with open('burger.json', 'w') as f: - json.dump(requests.get( - 'https://api.github.com/repos/Burger/Burger/releases/latest').json(), f) + if not os.path.exists(get_dir_location('downloads/Burger')): print('\033[92mDownloading Burger...\033[m') os.system( - 'cd downloads && git clone https://github.com/pokechu22/Burger && cd Burger && git pull') + f'cd {get_dir_location("downloads")} && git clone https://github.com/pokechu22/Burger && cd Burger && git pull') print('\033[92mInstalling dependencies...\033[m') os.system('cd downloads/Burger && pip install six jawa') def get_version_manifest(): - if not os.path.exists(f'downloads/version_manifest.json'): + if not os.path.exists(get_dir_location(f'downloads/version_manifest.json')): print( f'\033[92mDownloading version manifest...\033[m') version_manifest_data = requests.get( 'https://launchermeta.mojang.com/mc/game/version_manifest.json').json() - with open(f'downloads/version_manifest.json', 'w') as f: + with open(get_dir_location(f'downloads/version_manifest.json'), 'w') as f: json.dump(version_manifest_data, f) else: - with open(f'downloads/version_manifest.json', 'r') as f: + with open(get_dir_location(f'downloads/version_manifest.json'), 'r') as f: version_manifest_data = json.load(f) return version_manifest_data def get_version_data(version_id: str): - if not os.path.exists(f'downloads/{version_id}.json'): + if not os.path.exists(get_dir_location(f'downloads/{version_id}.json')): version_manifest_data = get_version_manifest() print( @@ -48,46 +46,46 @@ def get_version_data(version_id: str): raise ValueError( f'No version with id {version_id} found. Maybe delete downloads/version_manifest.json and try again?') package_data = requests.get(package_url).json() - with open(f'downloads/{version_id}.json', 'w') as f: + with open(get_dir_location(f'downloads/{version_id}.json'), 'w') as f: json.dump(package_data, f) else: - with open(f'downloads/{version_id}.json', 'r') as f: + with open(get_dir_location(f'downloads/{version_id}.json'), 'r') as f: package_data = json.load(f) return package_data def get_client_jar(version_id: str): - if not os.path.exists(f'downloads/client-{version_id}.jar'): + if not os.path.exists(get_dir_location(f'downloads/client-{version_id}.jar')): package_data = get_version_data(version_id) print('\033[92mDownloading client jar...\033[m') client_jar_url = package_data['downloads']['client']['url'] - with open(f'downloads/client-{version_id}.jar', 'wb') as f: + with open(get_dir_location(f'downloads/client-{version_id}.jar'), 'wb') as f: f.write(requests.get(client_jar_url).content) def get_burger_data_for_version(version_id: str): - if not os.path.exists(f'downloads/burger-{version_id}.json'): + if not os.path.exists(get_dir_location(f'downloads/burger-{version_id}.json')): get_burger() get_client_jar(version_id) os.system( - f'cd downloads/Burger && python munch.py ../client-{version_id}.jar --output ../burger-{version_id}.json' + f'cd {get_dir_location("downloads/Burger")} && python munch.py ../client-{version_id}.jar --output ../burger-{version_id}.json' ) - with open(f'downloads/burger-{version_id}.json', 'r') as f: + with open(get_dir_location(f'downloads/burger-{version_id}.json'), 'r') as f: return json.load(f) def get_mappings_for_version(version_id: str): - if not os.path.exists(f'downloads/mappings-{version_id}.txt'): + if not os.path.exists(get_dir_location(f'downloads/mappings-{version_id}.txt')): package_data = get_version_data(version_id) client_mappings_url = package_data['downloads']['client_mappings']['url'] mappings_text = requests.get(client_mappings_url).text - with open(f'downloads/mappings-{version_id}.txt', 'w') as f: + with open(get_dir_location(f'downloads/mappings-{version_id}.txt'), 'w') as f: f.write(mappings_text) else: - with open(f'downloads/mappings-{version_id}.txt', 'r') as f: + with open(get_dir_location(f'downloads/mappings-{version_id}.txt'), 'r') as f: mappings_text = f.read() return Mappings.parse(mappings_text) diff --git a/codegen/lib/utils.py b/codegen/lib/utils.py index c185c0e5..77a7b2d4 100644 --- a/codegen/lib/utils.py +++ b/codegen/lib/utils.py @@ -1,4 +1,5 @@ import re +import os # utilities that could be used for things other than codegen @@ -44,3 +45,7 @@ def group_packets(packets: list[PacketIdentifier]): packet_groups[key] = [] packet_groups[key].append(packet.packet_id) return packet_groups + + +def get_dir_location(name: str): + return os.path.join(os.path.dirname(__file__), '..', name) From 86cc2a9b7c85b0cb412fa8cbe2ab6b9a7ae5fcfc Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 27 May 2022 01:37:52 -0500 Subject: [PATCH 03/33] codegen/extract.py Preparation for azalea-block --- codegen/lib/download.py | 17 +++++++---------- codegen/lib/extract.py | 34 ++++++++++++++++++++++++++++++++++ codegen/migrate.py | 5 +++-- codegen/newpacket.py | 16 +++++++++------- 4 files changed, 53 insertions(+), 19 deletions(-) create mode 100644 codegen/lib/extract.py diff --git a/codegen/lib/download.py b/codegen/lib/download.py index 0d6668bd..e05d9a93 100644 --- a/codegen/lib/download.py +++ b/codegen/lib/download.py @@ -63,16 +63,13 @@ def get_client_jar(version_id: str): f.write(requests.get(client_jar_url).content) -def get_burger_data_for_version(version_id: str): - if not os.path.exists(get_dir_location(f'downloads/burger-{version_id}.json')): - get_burger() - get_client_jar(version_id) - - os.system( - f'cd {get_dir_location("downloads/Burger")} && python munch.py ../client-{version_id}.jar --output ../burger-{version_id}.json' - ) - with open(get_dir_location(f'downloads/burger-{version_id}.json'), 'r') as f: - return json.load(f) +def get_server_jar(version_id: str): + if not os.path.exists(get_dir_location(f'downloads/server-{version_id}.jar')): + package_data = get_version_data(version_id) + print('\033[92mDownloading server jar...\033[m') + server_jar_url = package_data['downloads']['server']['url'] + with open(get_dir_location(f'downloads/server-{version_id}.jar'), 'wb') as f: + f.write(requests.get(server_jar_url).content) def get_mappings_for_version(version_id: str): diff --git a/codegen/lib/extract.py b/codegen/lib/extract.py new file mode 100644 index 00000000..82ae257d --- /dev/null +++ b/codegen/lib/extract.py @@ -0,0 +1,34 @@ +# Extracting data from the Minecraft jars + +from lib.download import get_server_jar, get_burger, get_client_jar +from lib.utils import get_dir_location +import json +import os + + +def generate_data_from_server_jar(version_id: str): + if os.path.exists(get_dir_location(f'downloads/generated-{version_id}')): + return + + get_server_jar(version_id) + os.system( + f'java -jar {get_dir_location(f"downloads/server-{version_id}.jar")} --all --output {get_dir_location(f"downloads/generated-{version_id}")}' + ) + + +def get_block_states(version_id: str): + generate_data_from_server_jar(version_id) + with open(get_dir_location(f'downloads/generated-{version_id}/reports/blocks.json'), 'r') as f: + return json.load(f) + + +def get_burger_data_for_version(version_id: str): + if not os.path.exists(get_dir_location(f'downloads/burger-{version_id}.json')): + get_burger() + get_client_jar(version_id) + + os.system( + f'cd {get_dir_location("downloads/Burger")} && python munch.py ../client-{version_id}.jar --output ../burger-{version_id}.json' + ) + with open(get_dir_location(f'downloads/burger-{version_id}.json'), 'r') as f: + return json.load(f) diff --git a/codegen/migrate.py b/codegen/migrate.py index 98b701bf..cdffb2de 100644 --- a/codegen/migrate.py +++ b/codegen/migrate.py @@ -4,17 +4,18 @@ import lib.code.utils import lib.code.version import lib.code.packet import lib.download +import lib.extract import sys import os old_version_id = lib.code.version.get_version_id() old_mappings = lib.download.get_mappings_for_version(old_version_id) -old_burger_data = lib.download.get_burger_data_for_version(old_version_id) +old_burger_data = lib.extract.get_burger_data_for_version(old_version_id) old_packet_list = list(old_burger_data[0]['packets']['packet'].values()) new_version_id = sys.argv[1] new_mappings = lib.download.get_mappings_for_version(new_version_id) -new_burger_data = lib.download.get_burger_data_for_version(new_version_id) +new_burger_data = lib.extract.get_burger_data_for_version(new_version_id) new_packet_list = list(new_burger_data[0]['packets']['packet'].values()) diff --git a/codegen/newpacket.py b/codegen/newpacket.py index 2e4c77d7..52d6a2b4 100644 --- a/codegen/newpacket.py +++ b/codegen/newpacket.py @@ -1,17 +1,19 @@ -from lib import download, code # type: ignore +import lib.code.packet +import lib.code.utils +import lib.download +import lib.extract import sys -import os -mappings = download.get_mappings_for_version('1.18.2') -burger_data = download.get_burger_data_for_version('1.18.2') +mappings = lib.download.get_mappings_for_version('1.18.2') +burger_data = lib.extract.get_burger_data_for_version('1.18.2') burger_packets_data = burger_data[0]['packets']['packet'] packet_id, direction, state = int(sys.argv[1]), sys.argv[2], sys.argv[3] print( f'Generating code for packet id: {packet_id} with direction {direction} and state {state}') -code.packetcodegen.generate_packet(burger_packets_data, mappings, - packet_id, direction, state) +lib.code.packet.generate_packet(burger_packets_data, mappings, + packet_id, direction, state) -code.fmt() +lib.code.utils.fmt() print('Done!') From aac64d013546c8be3b992af63d70150155386c11 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 27 May 2022 16:04:22 -0500 Subject: [PATCH 04/33] Start making azalea-block --- Cargo.lock | 4 ++ Cargo.toml | 1 + azalea-block/Cargo.toml | 8 ++++ azalea-block/README.md | 8 ++++ azalea-block/src/behavior.rs | 3 ++ azalea-block/src/blocks.rs | 88 ++++++++++++++++++++++++++++++++++ azalea-block/src/lib.rs | 5 ++ azalea-block/src/properties.rs | 20 ++++++++ 8 files changed, 137 insertions(+) create mode 100644 azalea-block/Cargo.toml create mode 100644 azalea-block/README.md create mode 100644 azalea-block/src/behavior.rs create mode 100644 azalea-block/src/blocks.rs create mode 100644 azalea-block/src/lib.rs create mode 100644 azalea-block/src/properties.rs diff --git a/Cargo.lock b/Cargo.lock index 0faed271..87a6a3aa 100755 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,6 +78,10 @@ dependencies = [ "uuid", ] +[[package]] +name = "azalea-block" +version = "0.1.0" + [[package]] name = "azalea-brigadier" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 6c1fcaab..484da0b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ members = [ "azalea-crypto", "azalea-world", "azalea-language", + "azalea-block", ] [profile.release] diff --git a/azalea-block/Cargo.toml b/azalea-block/Cargo.toml new file mode 100644 index 00000000..ea43e8ae --- /dev/null +++ b/azalea-block/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "azalea-block" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/azalea-block/README.md b/azalea-block/README.md new file mode 100644 index 00000000..39843ef4 --- /dev/null +++ b/azalea-block/README.md @@ -0,0 +1,8 @@ +# Azalea Block + +Representation of Minecraft block states. + +There's two main things here, the `BlockState` enum and the `Block` trait. +`BlockState` is a simple enum with every possible block state as variant, and `Block` is a heavier trait which lets you access information about a block more easily. + +Every block is a struct that implements `Block`. You can freely convert between `BlockState` and `Block` with .into(). diff --git a/azalea-block/src/behavior.rs b/azalea-block/src/behavior.rs new file mode 100644 index 00000000..974260f2 --- /dev/null +++ b/azalea-block/src/behavior.rs @@ -0,0 +1,3 @@ +pub struct BlockBehavior { + pub has_collision: bool, +} diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs new file mode 100644 index 00000000..f6f33a89 --- /dev/null +++ b/azalea-block/src/blocks.rs @@ -0,0 +1,88 @@ +use crate::{behavior::BlockBehavior, properties}; + +// make_block_states! { +// acacia_button => BlockBehavior { has_collision: false }, { +// Face, +// Facing, +// Powered +// }; +// acacia_door => BlockBehavior { has_collision: true }, { +// Facing, +// Half, +// Hinge, +// Open, +// Powered +// }; +// } + +// the underscore makes it more readable, so i think it's fine to allow it +#[allow(non_camel_case_types)] +pub enum BlockState { + AcaciaButton_FloorNorthTrue, + AcaciaButton_WallNorthTrue, + AcaciaButton_CeilingNorthTrue, +} + +pub trait Block { + fn behavior(&self) -> BlockBehavior; +} + +#[derive(Debug)] +pub struct AcaciaButtonBlock { + pub face: properties::Face, + pub facing: properties::Facing, + pub powered: properties::Powered, +} + +impl Block for AcaciaButtonBlock { + fn behavior(&self) -> BlockBehavior { + BlockBehavior { + has_collision: false, + } + } +} + +pub struct AcaciaDoorBlock { + pub facing: properties::Facing, + // pub half: properties::Half, + // pub hinge: properties::Hinge, + // pub open: properties::Open, + pub powered: properties::Powered, +} + +impl From for &dyn Block { + fn from(b: BlockState) -> Self { + match b { + BlockState::AcaciaButton_FloorNorthTrue => &AcaciaButtonBlock { + face: properties::Face::Floor, + facing: properties::Facing::North, + powered: properties::Powered::True, + }, + // BlockState::AcaciaButton_WallNorthTrue => todo!(), + // BlockState::AcaciaButton_CeilingNorthTrue => todo!(), + _ => todo!(), + } + } +} +impl From for BlockState { + fn from(b: AcaciaButtonBlock) -> Self { + match b { + AcaciaButtonBlock { + face: properties::Face::Floor, + facing: properties::Facing::North, + powered: properties::Powered::True, + } => BlockState::AcaciaButton_FloorNorthTrue, + // AcaciaButtonBlock { + // face: properties::Face::Wall, + // facing: properties::Facing::North, + // powered: properties::Powered::True, + // } => todo!(), + // AcaciaButtonBlock { + // face: properties::Face::Ceiling, + // facing: properties::Facing::North, + // powered: properties::Powered::True, + // } => todo!(), + _ => todo!(), + } + } +} diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs new file mode 100644 index 00000000..db94d081 --- /dev/null +++ b/azalea-block/src/lib.rs @@ -0,0 +1,5 @@ +pub mod behavior; +pub mod blocks; +pub mod properties; + +use std::fmt::Debug; diff --git a/azalea-block/src/properties.rs b/azalea-block/src/properties.rs new file mode 100644 index 00000000..ac81fcb3 --- /dev/null +++ b/azalea-block/src/properties.rs @@ -0,0 +1,20 @@ +#[derive(Debug, Clone, Copy)] +pub enum Face { + Floor, + Wall, + Ceiling, +} + +#[derive(Debug, Clone, Copy)] +pub enum Facing { + North, + South, + West, + East, +} + +#[derive(Debug, Clone, Copy)] +pub enum Powered { + True, + False, +} From 88bc6d16602c163d122685997dc269d5d97a93a2 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 27 May 2022 19:34:09 -0500 Subject: [PATCH 05/33] Start making block macro --- Cargo.lock | 40 ++++-- azalea-block/Cargo.toml | 5 +- azalea-block/block-macros/Cargo.toml | 14 ++ azalea-block/block-macros/src/lib.rs | 157 ++++++++++++++++++++++ azalea-block/src/blocks.rs | 188 ++++++++++++++++----------- azalea-block/src/lib.rs | 2 - azalea-block/src/properties.rs | 20 --- 7 files changed, 310 insertions(+), 116 deletions(-) create mode 100644 azalea-block/block-macros/Cargo.toml create mode 100644 azalea-block/block-macros/src/lib.rs delete mode 100644 azalea-block/src/properties.rs diff --git a/Cargo.lock b/Cargo.lock index 87a6a3aa..09523320 100755 --- a/Cargo.lock +++ b/Cargo.lock @@ -81,6 +81,9 @@ dependencies = [ [[package]] name = "azalea-block" version = "0.1.0" +dependencies = [ + "block-macros", +] [[package]] name = "azalea-brigadier" @@ -200,6 +203,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-macros" +version = "0.1.0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "bot" version = "0.1.0" @@ -971,11 +983,11 @@ checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" [[package]] name = "proc-macro2" -version = "1.0.36" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" +checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -986,9 +998,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.10" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" dependencies = [ "proc-macro2", ] @@ -1244,13 +1256,13 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.92" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ff7c592601f11445996a06f8ad0c27f094a58857c2f89e97974ab9235b92c52" +checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -1407,6 +1419,12 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +[[package]] +name = "unicode-ident" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" + [[package]] name = "unicode-normalization" version = "0.1.19" @@ -1428,12 +1446,6 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - [[package]] name = "url" version = "2.2.2" diff --git a/azalea-block/Cargo.toml b/azalea-block/Cargo.toml index ea43e8ae..edeba385 100644 --- a/azalea-block/Cargo.toml +++ b/azalea-block/Cargo.toml @@ -1,8 +1,11 @@ [package] +edition = "2021" name = "azalea-block" version = "0.1.0" -edition = "2021" + +[lib] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +block-macros = {path = "./block-macros"} diff --git a/azalea-block/block-macros/Cargo.toml b/azalea-block/block-macros/Cargo.toml new file mode 100644 index 00000000..03b19e1d --- /dev/null +++ b/azalea-block/block-macros/Cargo.toml @@ -0,0 +1,14 @@ +[package] +edition = "2021" +name = "block-macros" +version = "0.1.0" + +[lib] +proc-macro = true + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +proc-macro2 = "1.0.39" +quote = "1.0.18" +syn = "1.0.95" diff --git a/azalea-block/block-macros/src/lib.rs b/azalea-block/block-macros/src/lib.rs new file mode 100644 index 00000000..20ec5f3e --- /dev/null +++ b/azalea-block/block-macros/src/lib.rs @@ -0,0 +1,157 @@ +use proc_macro::TokenStream; +use quote::{quote, ToTokens}; +use std::fmt::Debug; +use syn::{ + self, braced, + parse::{Parse, ParseStream, Result}, + parse_macro_input, + punctuated::Punctuated, + Data, DeriveInput, Expr, FieldsNamed, Ident, LitInt, Token, +}; + +struct PropertyDefinition { + name: Ident, + variants: Punctuated, +} +struct PropertyDefinitions { + properties: Vec, +} + +struct BlockDefinition { + name: Ident, + behavior: Expr, + properties: Punctuated, +} +struct BlockDefinitions { + blocks: Vec, +} +struct MakeBlockStates { + property_definitions: PropertyDefinitions, + block_definitions: BlockDefinitions, +} + +impl Parse for PropertyDefinition { + fn parse(input: ParseStream) -> Result { + // Face { + // Floor, + // Wall, + // Ceiling + // }; + let name = input.parse()?; + let variants = input.parse_terminated(Ident::parse)?; + input.parse::()?; + Ok(PropertyDefinition { name, variants }) + } +} + +impl Parse for PropertyDefinitions { + fn parse(input: ParseStream) -> Result { + let mut property_definitions = Vec::new(); + while !input.is_empty() { + property_definitions.push(input.parse()?); + } + + Ok(PropertyDefinitions { + properties: property_definitions, + }) + } +} + +impl Parse for BlockDefinition { + fn parse(input: ParseStream) -> Result { + // acacia_button => BlockBehavior { has_collision: false }, { + // Face, + // Facing, + // Powered + // }; + let name = input.parse()?; + input.parse::]>()?; + let behavior = input.parse()?; + input.parse::()?; + let content; + braced!(content in input); + let properties = content.parse_terminated(Ident::parse)?; + input.parse::()?; + Ok(BlockDefinition { + name, + behavior, + properties, + }) + } +} + +impl Parse for BlockDefinitions { + fn parse(input: ParseStream) -> Result { + let mut blocks = Vec::new(); + while !input.is_empty() { + blocks.push(input.parse()?); + } + + Ok(BlockDefinitions { blocks }) + } +} + +impl Parse for MakeBlockStates { + fn parse(input: ParseStream) -> Result { + // PROPERTIES => { ... } BLOCKS => { ... } + let properties_ident = input.parse::()?; + assert_eq!(properties_ident.to_string(), "PROPERTIES"); + input.parse::]>()?; + let content; + braced!(content in input); + let properties = content.parse()?; + + let blocks_ident = input.parse::()?; + assert_eq!(blocks_ident.to_string(), "BLOCKS"); + input.parse::]>()?; + let content; + braced!(content in input); + let blocks = content.parse()?; + + Ok(MakeBlockStates { + property_definitions: properties, + block_definitions: blocks, + }) + } +} + +#[proc_macro] +pub fn make_block_states(input: TokenStream) -> TokenStream { + let input = parse_macro_input!(input as MakeBlockStates); + + let mut property_enums = quote! {}; + + for property in &input.property_definitions.properties { + let mut property_enum_variants = quote! {}; + + for variant in &property.variants { + property_enum_variants.extend(quote! { + #variant, + }); + } + + let property_name = property.name; + + property_enums.extend(quote! { + #[derive(Debug, Clone, Copy)] + pub enum #property_name { + #property_enum_variants + } + }); + } + + // let mut block_state_enum_variants = quote! {}; + + // for block in &input.block_definitions.blocks { + // let block_state_enum_variant = quote! { + // #block.name(#block.behavior, #block.properties) + // }; + // block_state_enum_variants.extend(block_state_enum_variant); + // } + + quote! { + #property_enums + // #block_state_enum_variants + } + .into() +} diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index f6f33a89..6bc82a20 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -1,88 +1,118 @@ use crate::{behavior::BlockBehavior, properties}; -// make_block_states! { -// acacia_button => BlockBehavior { has_collision: false }, { -// Face, -// Facing, -// Powered -// }; -// acacia_door => BlockBehavior { has_collision: true }, { -// Facing, -// Half, -// Hinge, -// Open, -// Powered -// }; +make_block_states! { + PROPERTIES => { + Face { + Floor, + Wall, + Ceiling + }; + } + BLOCKS => { + acacia_button => BlockBehavior { has_collision: false }, { + Face, + Facing, + Powered + }; + acacia_door => BlockBehavior { has_collision: true }, { + Facing, + Half, + Hinge, + Open, + Powered + }; + } +} + +// #[derive(Debug, Clone, Copy)] +// pub enum Face { +// Floor, +// Wall, +// Ceiling, // } -// the underscore makes it more readable, so i think it's fine to allow it -#[allow(non_camel_case_types)] -pub enum BlockState { - AcaciaButton_FloorNorthTrue, - AcaciaButton_WallNorthTrue, - AcaciaButton_CeilingNorthTrue, -} +// #[derive(Debug, Clone, Copy)] +// pub enum Facing { +// North, +// South, +// West, +// East, +// } -pub trait Block { - fn behavior(&self) -> BlockBehavior; -} +// #[derive(Debug, Clone, Copy)] +// pub enum Powered { +// True, +// False, +// } -#[derive(Debug)] -pub struct AcaciaButtonBlock { - pub face: properties::Face, - pub facing: properties::Facing, - pub powered: properties::Powered, -} +// // the underscore makes it more readable, so i think it's fine to allow it +// #[allow(non_camel_case_types)] +// pub enum BlockState { +// AcaciaButton_FloorNorthTrue, +// AcaciaButton_WallNorthTrue, +// AcaciaButton_CeilingNorthTrue, +// } -impl Block for AcaciaButtonBlock { - fn behavior(&self) -> BlockBehavior { - BlockBehavior { - has_collision: false, - } - } -} +// pub trait Block { +// fn behavior(&self) -> BlockBehavior; +// } -pub struct AcaciaDoorBlock { - pub facing: properties::Facing, - // pub half: properties::Half, - // pub hinge: properties::Hinge, - // pub open: properties::Open, - pub powered: properties::Powered, -} +// #[derive(Debug)] +// pub struct AcaciaButtonBlock { +// pub face: properties::Face, +// pub facing: properties::Facing, +// pub powered: properties::Powered, +// } -impl From for &dyn Block { - fn from(b: BlockState) -> Self { - match b { - BlockState::AcaciaButton_FloorNorthTrue => &AcaciaButtonBlock { - face: properties::Face::Floor, - facing: properties::Facing::North, - powered: properties::Powered::True, - }, - // BlockState::AcaciaButton_WallNorthTrue => todo!(), - // BlockState::AcaciaButton_CeilingNorthTrue => todo!(), - _ => todo!(), - } - } -} -impl From for BlockState { - fn from(b: AcaciaButtonBlock) -> Self { - match b { - AcaciaButtonBlock { - face: properties::Face::Floor, - facing: properties::Facing::North, - powered: properties::Powered::True, - } => BlockState::AcaciaButton_FloorNorthTrue, - // AcaciaButtonBlock { - // face: properties::Face::Wall, - // facing: properties::Facing::North, - // powered: properties::Powered::True, - // } => todo!(), - // AcaciaButtonBlock { - // face: properties::Face::Ceiling, - // facing: properties::Facing::North, - // powered: properties::Powered::True, - // } => todo!(), - _ => todo!(), - } - } -} +// impl Block for AcaciaButtonBlock { +// fn behavior(&self) -> BlockBehavior { +// BlockBehavior { +// has_collision: false, +// } +// } +// } + +// pub struct AcaciaDoorBlock { +// pub facing: properties::Facing, +// // pub half: properties::Half, +// // pub hinge: properties::Hinge, +// // pub open: properties::Open, +// pub powered: properties::Powered, +// } + +// impl From for &dyn Block { +// fn from(b: BlockState) -> Self { +// match b { +// BlockState::AcaciaButton_FloorNorthTrue => &AcaciaButtonBlock { +// face: properties::Face::Floor, +// facing: properties::Facing::North, +// powered: properties::Powered::True, +// }, +// // BlockState::AcaciaButton_WallNorthTrue => todo!(), +// // BlockState::AcaciaButton_CeilingNorthTrue => todo!(), +// _ => todo!(), +// } +// } +// } +// impl From for BlockState { +// fn from(b: AcaciaButtonBlock) -> Self { +// match b { +// AcaciaButtonBlock { +// face: properties::Face::Floor, +// facing: properties::Facing::North, +// powered: properties::Powered::True, +// } => BlockState::AcaciaButton_FloorNorthTrue, +// // AcaciaButtonBlock { +// // face: properties::Face::Wall, +// // facing: properties::Facing::North, +// // powered: properties::Powered::True, +// // } => todo!(), +// // AcaciaButtonBlock { +// // face: properties::Face::Ceiling, +// // facing: properties::Facing::North, +// // powered: properties::Powered::True, +// // } => todo!(), +// _ => todo!(), +// } +// } +// } diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index db94d081..30f2aadc 100644 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -1,5 +1,3 @@ pub mod behavior; pub mod blocks; pub mod properties; - -use std::fmt::Debug; diff --git a/azalea-block/src/properties.rs b/azalea-block/src/properties.rs deleted file mode 100644 index ac81fcb3..00000000 --- a/azalea-block/src/properties.rs +++ /dev/null @@ -1,20 +0,0 @@ -#[derive(Debug, Clone, Copy)] -pub enum Face { - Floor, - Wall, - Ceiling, -} - -#[derive(Debug, Clone, Copy)] -pub enum Facing { - North, - South, - West, - East, -} - -#[derive(Debug, Clone, Copy)] -pub enum Powered { - True, - False, -} From c0433b7d4934caa5b1a42625d16058fcece2a86d Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 27 May 2022 19:36:18 -0500 Subject: [PATCH 06/33] Compiles --- azalea-block/block-macros/src/lib.rs | 8 ++++++-- azalea-block/src/blocks.rs | 3 ++- azalea-block/src/lib.rs | 1 - 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/azalea-block/block-macros/src/lib.rs b/azalea-block/block-macros/src/lib.rs index 20ec5f3e..d6c3465e 100644 --- a/azalea-block/block-macros/src/lib.rs +++ b/azalea-block/block-macros/src/lib.rs @@ -38,7 +38,11 @@ impl Parse for PropertyDefinition { // Ceiling // }; let name = input.parse()?; - let variants = input.parse_terminated(Ident::parse)?; + + let content; + braced!(content in input); + let variants = content.parse_terminated(Ident::parse)?; + input.parse::()?; Ok(PropertyDefinition { name, variants }) } @@ -130,7 +134,7 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { }); } - let property_name = property.name; + let property_name = &property.name; property_enums.extend(quote! { #[derive(Debug, Clone, Copy)] diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index 6bc82a20..a50e8804 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -1,4 +1,5 @@ -use crate::{behavior::BlockBehavior, properties}; +use crate::behavior::BlockBehavior; +use block_macros::make_block_states; make_block_states! { PROPERTIES => { diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index 30f2aadc..488e8e62 100644 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -1,3 +1,2 @@ pub mod behavior; pub mod blocks; -pub mod properties; From d56c44766e0f71f5f871b6a457174b81126a2331 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 27 May 2022 23:10:34 -0500 Subject: [PATCH 07/33] block macros --- azalea-block/block-macros/src/lib.rs | 58 ++++++++++++++++++++------ azalea-block/block-macros/src/utils.rs | 39 +++++++++++++++++ azalea-block/src/blocks.rs | 27 ++++++++++-- examples/craft_dig_straight_down.rs | 2 +- 4 files changed, 109 insertions(+), 17 deletions(-) create mode 100644 azalea-block/block-macros/src/utils.rs diff --git a/azalea-block/block-macros/src/lib.rs b/azalea-block/block-macros/src/lib.rs index d6c3465e..9cbd6ca3 100644 --- a/azalea-block/block-macros/src/lib.rs +++ b/azalea-block/block-macros/src/lib.rs @@ -1,13 +1,16 @@ +mod utils; + use proc_macro::TokenStream; -use quote::{quote, ToTokens}; -use std::fmt::Debug; +use quote::quote; +use std::collections::HashMap; use syn::{ self, braced, parse::{Parse, ParseStream, Result}, parse_macro_input, punctuated::Punctuated, - Data, DeriveInput, Expr, FieldsNamed, Ident, LitInt, Token, + Expr, Ident, Token, }; +use utils::{combinations_of, to_pascal_case}; struct PropertyDefinition { name: Ident, @@ -71,6 +74,7 @@ impl Parse for BlockDefinition { let name = input.parse()?; input.parse::]>()?; let behavior = input.parse()?; + input.parse::()?; let content; braced!(content in input); @@ -124,14 +128,16 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { let input = parse_macro_input!(input as MakeBlockStates); let mut property_enums = quote! {}; - + let mut properties_map = HashMap::new(); for property in &input.property_definitions.properties { let mut property_enum_variants = quote! {}; + let mut property_enum_variant_names = Vec::new(); for variant in &property.variants { property_enum_variants.extend(quote! { #variant, }); + property_enum_variant_names.push(variant.to_string()); } let property_name = &property.name; @@ -142,20 +148,46 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { #property_enum_variants } }); + properties_map.insert(property_name.to_string(), property_enum_variant_names); } - // let mut block_state_enum_variants = quote! {}; - - // for block in &input.block_definitions.blocks { - // let block_state_enum_variant = quote! { - // #block.name(#block.behavior, #block.properties) - // }; - // block_state_enum_variants.extend(block_state_enum_variant); - // } + let mut block_state_enum_variants = quote! {}; + for block in &input.block_definitions.blocks { + let block_properties = &block.properties; + let mut block_properties_vec = Vec::new(); + for property in block_properties { + let property_name = &property.to_string(); + let property_variants = properties_map + .get(property_name) + .expect(format!("Property '{}' not found", property_name).as_str()) + .clone(); + block_properties_vec.push(property_variants); + } + for combination in combinations_of(&block_properties_vec) { + let variant_name = Ident::new( + &format!( + "{}_{}", + to_pascal_case(&block.name.to_string()), + combination + .iter() + .map(|v| v.to_string()) + .collect::>() + .join("") + ), + proc_macro2::Span::call_site(), + ); + block_state_enum_variants.extend(quote! { + #variant_name, + }); + } + } quote! { #property_enums - // #block_state_enum_variants + + pub enum BlockState { + #block_state_enum_variants + } } .into() } diff --git a/azalea-block/block-macros/src/utils.rs b/azalea-block/block-macros/src/utils.rs new file mode 100644 index 00000000..8700e17f --- /dev/null +++ b/azalea-block/block-macros/src/utils.rs @@ -0,0 +1,39 @@ +pub fn combinations_of(items: &[Vec]) -> Vec> { + let mut combinations = Vec::new(); + if items.len() == 1 { + for item in &items[0] { + combinations.push(vec![item.clone()]); + } + return combinations; + }; + + for i in 0..items[0].len() { + let item = &items[0][i]; + for other_combinations in combinations_of(&items[1..]) { + let mut combination = Vec::new(); + combination.push(item.clone()); + combination.extend(other_combinations); + combinations.push(combination); + } + } + + combinations +} + +pub fn to_pascal_case(s: &str) -> String { + let mut result = String::new(); + let mut prev_was_underscore = true; // set to true by default so the first character is capitalized + for c in s.chars() { + if c == '_' { + prev_was_underscore = true; + } else { + if prev_was_underscore { + result.push(c.to_ascii_uppercase()); + prev_was_underscore = false; + } else { + result.push(c); + } + } + } + result +} diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index a50e8804..855de96b 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -1,4 +1,3 @@ -use crate::behavior::BlockBehavior; use block_macros::make_block_states; make_block_states! { @@ -8,14 +7,36 @@ make_block_states! { Wall, Ceiling }; + Facing { + North, + South, + West, + East + }; + Powered { + True, + False + }; + Half { + Upper, + Lower + }; + Hinge { + Left, + Right + }; + Open { + True, + False + }; } BLOCKS => { - acacia_button => BlockBehavior { has_collision: false }, { + acacia_button => BlockBehavior::new().no_collision(), { Face, Facing, Powered }; - acacia_door => BlockBehavior { has_collision: true }, { + acacia_door => BlockBehavior::new(), { Facing, Half, Hinge, diff --git a/examples/craft_dig_straight_down.rs b/examples/craft_dig_straight_down.rs index 79985672..1d1a89f6 100644 --- a/examples/craft_dig_straight_down.rs +++ b/examples/craft_dig_straight_down.rs @@ -14,7 +14,7 @@ loop { pathfinder::Goals::NearXZ(5, azalea::BlockXZ(0, 0)) ).await; let chest = bot.open_chest(&bot.world.find_one_block(|b| b.id == "minecraft:chest")).await.unwrap(); - bot.take_amount(&chest, 3, |i| i.id == "#minecraft:planks").await; + bot.take_amount(&chest, 5, |i| i.id == "#minecraft:planks").await; // when rust adds async drop this won't be necessary chest.close().await; From 3573eb4ba04280cd25263fbe6e468b05036bc9cb Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 28 May 2022 01:12:12 -0500 Subject: [PATCH 08/33] more block macro stuff --- azalea-block/block-macros/src/lib.rs | 79 ++++++++++++++++++++++++++-- azalea-block/src/behavior.rs | 9 ++++ azalea-block/src/blocks.rs | 9 +++- azalea-block/src/lib.rs | 7 ++- 4 files changed, 97 insertions(+), 7 deletions(-) diff --git a/azalea-block/block-macros/src/lib.rs b/azalea-block/block-macros/src/lib.rs index 9cbd6ca3..0ad5af34 100644 --- a/azalea-block/block-macros/src/lib.rs +++ b/azalea-block/block-macros/src/lib.rs @@ -152,17 +152,40 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { } let mut block_state_enum_variants = quote! {}; + let mut block_structs = quote! {}; for block in &input.block_definitions.blocks { - let block_properties = &block.properties; + let block_property_names = &block + .properties + .iter() + .map(|p| p.to_string()) + .collect::>(); let mut block_properties_vec = Vec::new(); - for property in block_properties { - let property_name = &property.to_string(); + for property_name in block_property_names { let property_variants = properties_map .get(property_name) .expect(format!("Property '{}' not found", property_name).as_str()) .clone(); block_properties_vec.push(property_variants); } + + // pub face: properties::Face, + // pub facing: properties::Facing, + // pub powered: properties::Powered, + let mut block_struct_fields = quote! {}; + for property in &block.properties { + let property_name_snake = + Ident::new(&property.to_string(), proc_macro2::Span::call_site()); + block_struct_fields.extend(quote! { + pub #property_name_snake: #property, + }) + } + let block_struct_name = Ident::new( + &format!("{}Block", to_pascal_case(&block.name.to_string())), + proc_macro2::Span::call_site(), + ); + + let mut from_block_to_state_match = quote! {}; + for combination in combinations_of(&block_properties_vec) { let variant_name = Ident::new( &format!( @@ -179,7 +202,55 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { block_state_enum_variants.extend(quote! { #variant_name, }); + + // face: properties::Face::Floor, + // facing: properties::Facing::North, + // powered: properties::Powered::True, + let mut from_block_to_state_match_inner = quote! {}; + for i in 0..block_property_names.len() { + let property_name = &block_property_names[i]; + let property_name_ident = Ident::new(property_name, proc_macro2::Span::call_site()); + let property_name_snake = + Ident::new(&property_name.to_string(), proc_macro2::Span::call_site()); + let variant = + Ident::new(&combination[i].to_string(), proc_macro2::Span::call_site()); + + from_block_to_state_match_inner.extend(quote! { + #property_name_ident: #property_name_snake::#variant, + }); + } + + from_block_to_state_match.extend(quote! { + #block_struct_name { + #from_block_to_state_match_inner + } => BlockState::#variant_name, + }); } + + let block_behavior = &block.behavior; + let block_struct = quote! { + #[derive(Debug)] + pub struct #block_struct_name { + #block_struct_fields + } + + impl Block for #block_struct_name { + fn behavior(&self) -> BlockBehavior { + #block_behavior + } + } + + impl From<#block_struct_name> for BlockState { + fn from(b: #block_struct_name) -> Self { + match b { + #from_block_to_state_match + } + } + } + + }; + + block_structs.extend(block_struct); } quote! { @@ -188,6 +259,8 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { pub enum BlockState { #block_state_enum_variants } + + #block_structs } .into() } diff --git a/azalea-block/src/behavior.rs b/azalea-block/src/behavior.rs index 974260f2..949f3bd8 100644 --- a/azalea-block/src/behavior.rs +++ b/azalea-block/src/behavior.rs @@ -1,3 +1,12 @@ +#[derive(Default)] pub struct BlockBehavior { pub has_collision: bool, } + +impl BlockBehavior { + #[inline] + pub fn no_collision(mut self) -> Self { + self.has_collision = false; + self + } +} diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index 855de96b..d4339ada 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -1,5 +1,10 @@ +use crate::BlockBehavior; use block_macros::make_block_states; +pub trait Block { + fn behavior(&self) -> BlockBehavior; +} + make_block_states! { PROPERTIES => { Face { @@ -31,12 +36,12 @@ make_block_states! { }; } BLOCKS => { - acacia_button => BlockBehavior::new().no_collision(), { + acacia_button => BlockBehavior::default().no_collision(), { Face, Facing, Powered }; - acacia_door => BlockBehavior::new(), { + acacia_door => BlockBehavior::default(), { Facing, Half, Hinge, diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index 488e8e62..459b486e 100644 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -1,2 +1,5 @@ -pub mod behavior; -pub mod blocks; +mod behavior; +mod blocks; + +pub use behavior::BlockBehavior; +pub use blocks::*; From 5ce6eb23bbca98e8b8d5c6db691dbbde08041335 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 28 May 2022 01:16:32 -0500 Subject: [PATCH 09/33] impl From for &dyn Block { --- azalea-block/block-macros/src/lib.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/azalea-block/block-macros/src/lib.rs b/azalea-block/block-macros/src/lib.rs index 0ad5af34..4e82d39d 100644 --- a/azalea-block/block-macros/src/lib.rs +++ b/azalea-block/block-macros/src/lib.rs @@ -153,6 +153,7 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { let mut block_state_enum_variants = quote! {}; let mut block_structs = quote! {}; + let mut from_state_to_block_match = quote! {}; for block in &input.block_definitions.blocks { let block_property_names = &block .properties @@ -225,6 +226,17 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { #from_block_to_state_match_inner } => BlockState::#variant_name, }); + + // BlockState::AcaciaButton_FloorNorthTrue => &AcaciaButtonBlock { + // face: properties::Face::Floor, + // facing: properties::Facing::North, + // powered: properties::Powered::True, + // }, + from_state_to_block_match.extend(quote! { + BlockState::#variant_name => &#block_struct_name { + #from_block_to_state_match_inner + }, + }) } let block_behavior = &block.behavior; @@ -261,6 +273,16 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { } #block_structs + + impl From for &dyn Block { + fn from(b: BlockState) -> Self { + match b { + #from_state_to_block_match + } + } + } + + } .into() } From ff2f3c7af5bd4c1a1c10fa7c269830b9081319e4 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 28 May 2022 13:39:33 -0500 Subject: [PATCH 10/33] slight optimization --- azalea-block/block-macros/src/lib.rs | 90 ++++++++++++++++++++++------ azalea-block/src/blocks.rs | 25 ++++++++ 2 files changed, 97 insertions(+), 18 deletions(-) diff --git a/azalea-block/block-macros/src/lib.rs b/azalea-block/block-macros/src/lib.rs index 4e82d39d..3d937ac4 100644 --- a/azalea-block/block-macros/src/lib.rs +++ b/azalea-block/block-macros/src/lib.rs @@ -129,24 +129,51 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { let mut property_enums = quote! {}; let mut properties_map = HashMap::new(); + + let mut state_id = 0usize; + for property in &input.property_definitions.properties { let mut property_enum_variants = quote! {}; + let mut property_from_number_variants = quote! {}; let mut property_enum_variant_names = Vec::new(); - for variant in &property.variants { + let property_name = &property.name; + + for i in 0..property.variants.len() { + let variant = &property.variants[i]; + + let i_lit = syn::Lit::Int(syn::LitInt::new( + &i.to_string(), + proc_macro2::Span::call_site(), + )); + property_enum_variants.extend(quote! { - #variant, + #variant = #i_lit, }); + + // i_lit is used here instead of i because otherwise it says 0size + // in the expansion and that looks uglier + property_from_number_variants.extend(quote! { + #i_lit => #property_name::#variant, + }); + property_enum_variant_names.push(variant.to_string()); } - let property_name = &property.name; - property_enums.extend(quote! { #[derive(Debug, Clone, Copy)] pub enum #property_name { #property_enum_variants } + + impl From for #property_name { + fn from(value: usize) -> Self { + match value { + #property_from_number_variants + _ => panic!("Invalid property value: {}", value), + } + } + } }); properties_map.insert(property_name.to_string(), property_enum_variant_names); } @@ -187,7 +214,10 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { let mut from_block_to_state_match = quote! {}; + let first_state_id = state_id; + for combination in combinations_of(&block_properties_vec) { + state_id += 1; let variant_name = Ident::new( &format!( "{}_{}", @@ -226,20 +256,41 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { #from_block_to_state_match_inner } => BlockState::#variant_name, }); - - // BlockState::AcaciaButton_FloorNorthTrue => &AcaciaButtonBlock { - // face: properties::Face::Floor, - // facing: properties::Facing::North, - // powered: properties::Powered::True, - // }, - from_state_to_block_match.extend(quote! { - BlockState::#variant_name => &#block_struct_name { - #from_block_to_state_match_inner - }, - }) } + // 7035..=7058 => { + // let b = b - 7035; + // &AcaciaButtonBlock { + // Powered: Powered::from((b / 1) % 2), + // Facing: Facing::from((b / 2) % 4), + // Face: Face::from((b / 8) % 3), + // } + // } + let mut from_state_to_block_inner = quote! {}; + let mut division = 1usize; + for i in (0..block.properties.len()).rev() { + let property = &block.properties[i]; + let property_variants = &block_properties_vec[i]; + let property_variants_count = property_variants.len(); + from_state_to_block_inner.extend(quote! { + #property: #property::from((b / #division) % #property_variants_count), + }); + + division *= property_variants_count; + } + + let last_state_id = state_id - 1; + from_state_to_block_match.extend(quote! { + #first_state_id..=#last_state_id => { + let b = b - #first_state_id; + Box::new(#block_struct_name { + #from_state_to_block_inner + }) + }, + }); + let block_behavior = &block.behavior; + let block_id = block.name.to_string(); let block_struct = quote! { #[derive(Debug)] pub struct #block_struct_name { @@ -250,6 +301,9 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { fn behavior(&self) -> BlockBehavior { #block_behavior } + fn id(&self) -> &'static str { + #block_id + } } impl From<#block_struct_name> for BlockState { @@ -274,15 +328,15 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { #block_structs - impl From for &dyn Block { + impl From for Box { fn from(b: BlockState) -> Self { + let b = b as usize; match b { #from_state_to_block_match + _ => panic!("Invalid block state: {}", b), } } } - - } .into() } diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index d4339ada..beba877e 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -3,6 +3,7 @@ use block_macros::make_block_states; pub trait Block { fn behavior(&self) -> BlockBehavior; + fn id(&self) -> &'static str; } make_block_states! { @@ -143,3 +144,27 @@ make_block_states! { // } // } // } + +// #[cfg(test)] +// mod tests { +// use super::*; + +// fn test_from_state_to_block() { +// let state = BlockState::AcaciaButton_CeilingSouthFalse; +// let block_state = BlockState::from(state); +// let block: Box = block_state.into(); +// assert_eq!(block.id(), "acacia_button"); +// // downcast block to AcaciaButtonBlock +// // let acacia_button_block = block.try_into::().unwrap(); +// // assert_eq!(acacia_button_block.face, Face::Ceiling); +// // assert_eq!(acacia_button_block.facing, Facing::South); +// // assert_eq!(acacia_button_block.powered, Powered::False); +// } + +// fn test_from_state_to_block_bottom_edge() { +// let state = BlockState::AcaciaButton_FloorNorthTrue; +// let block_state = BlockState::from(state); +// let block: Box = block_state.into(); +// assert_eq!(block.id(), "acacia_button"); +// } +// } From 5d764c79d0b2be9a57a863cd2cb31ca47c16beca Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 28 May 2022 18:20:15 -0500 Subject: [PATCH 11/33] genblocks --- azalea-block/block-macros/src/lib.rs | 6 +++--- azalea-block/src/blocks.rs | 4 ++-- codegen/genblocks.py | 13 +++++++++++++ codegen/lib/code/blocks.py | 17 +++++++++++++++++ codegen/newpacket.py | 7 +++++-- 5 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 codegen/genblocks.py create mode 100644 codegen/lib/code/blocks.py diff --git a/azalea-block/block-macros/src/lib.rs b/azalea-block/block-macros/src/lib.rs index 3d937ac4..63e21e58 100644 --- a/azalea-block/block-macros/src/lib.rs +++ b/azalea-block/block-macros/src/lib.rs @@ -101,16 +101,16 @@ impl Parse for BlockDefinitions { impl Parse for MakeBlockStates { fn parse(input: ParseStream) -> Result { - // PROPERTIES => { ... } BLOCKS => { ... } + // Properties => { ... } Blocks => { ... } let properties_ident = input.parse::()?; - assert_eq!(properties_ident.to_string(), "PROPERTIES"); + assert_eq!(properties_ident.to_string(), "Properties"); input.parse::]>()?; let content; braced!(content in input); let properties = content.parse()?; let blocks_ident = input.parse::()?; - assert_eq!(blocks_ident.to_string(), "BLOCKS"); + assert_eq!(blocks_ident.to_string(), "Blocks"); input.parse::]>()?; let content; braced!(content in input); diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index beba877e..88253e34 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -7,7 +7,7 @@ pub trait Block { } make_block_states! { - PROPERTIES => { + Properties => { Face { Floor, Wall, @@ -36,7 +36,7 @@ make_block_states! { False }; } - BLOCKS => { + Blocks => { acacia_button => BlockBehavior::default().no_collision(), { Face, Facing, diff --git a/codegen/genblocks.py b/codegen/genblocks.py new file mode 100644 index 00000000..70004820 --- /dev/null +++ b/codegen/genblocks.py @@ -0,0 +1,13 @@ +import lib.code.version +import lib.code.packet +import lib.code.blocks +import lib.code.utils +import lib.download +import lib.extract +import sys + +version_id = lib.code.version.get_version_id() + +block_states_data = lib.extract.get_block_states(version_id) + +lib.code.blocks.generate_blocks(block_states_data) diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py new file mode 100644 index 00000000..bf1260ba --- /dev/null +++ b/codegen/lib/code/blocks.py @@ -0,0 +1,17 @@ +BLOCKS_RS_DIR = '../azalea-blocks/src/blocks.rs' + + +def generate_blocks(blocks: dict): + with open(BLOCKS_RS_DIR, 'r') as f: + existing_code = f.read().splitlines() + + new_make_block_states_macro_code = [] + new_make_block_states_macro_code.append('make_block_states! {') + + properties = {} + for block_name, block_data in blocks.items(): + block_properties = block_data['properties'] + + properties.update(block_properties) + + print(properties) diff --git a/codegen/newpacket.py b/codegen/newpacket.py index 52d6a2b4..48d97640 100644 --- a/codegen/newpacket.py +++ b/codegen/newpacket.py @@ -1,11 +1,14 @@ +import lib.code.version import lib.code.packet import lib.code.utils import lib.download import lib.extract import sys -mappings = lib.download.get_mappings_for_version('1.18.2') -burger_data = lib.extract.get_burger_data_for_version('1.18.2') +version_id = lib.code.version.get_version_id() + +mappings = lib.download.get_mappings_for_version(version_id) +burger_data = lib.extract.get_burger_data_for_version(version_id) burger_packets_data = burger_data[0]['packets']['packet'] packet_id, direction, state = int(sys.argv[1]), sys.argv[2], sys.argv[3] From 6c1aeb4255cf3e9cb09c33fc2e43a9a587eb919e Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 28 May 2022 18:26:22 -0500 Subject: [PATCH 12/33] Fixed data extractor --- codegen/lib/extract.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen/lib/extract.py b/codegen/lib/extract.py index 82ae257d..2e46736e 100644 --- a/codegen/lib/extract.py +++ b/codegen/lib/extract.py @@ -12,7 +12,7 @@ def generate_data_from_server_jar(version_id: str): get_server_jar(version_id) os.system( - f'java -jar {get_dir_location(f"downloads/server-{version_id}.jar")} --all --output {get_dir_location(f"downloads/generated-{version_id}")}' + f'cd {get_dir_location(f"downloads")} && java -DbundlerMainClass=net.minecraft.data.Main -jar {get_dir_location(f"downloads/server-{version_id}.jar")} --all --output \"{get_dir_location(f"downloads/generated-{version_id}")}\"' ) From 8cd0ff2aac9f8a03446f897c48fc92b00b5291a2 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 28 May 2022 18:28:35 -0500 Subject: [PATCH 13/33] fix blocks dir --- codegen/lib/code/blocks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index bf1260ba..fd268b98 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -1,4 +1,7 @@ -BLOCKS_RS_DIR = '../azalea-blocks/src/blocks.rs' +from lib.utils import get_dir_location + + +BLOCKS_RS_DIR = get_dir_location('../azalea-block/src/blocks.rs') def generate_blocks(blocks: dict): From 9c1c2862361a4863cfd0af36c80705fb6213c3a4 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 28 May 2022 20:59:22 -0500 Subject: [PATCH 14/33] default block properties --- azalea-block/block-macros/src/lib.rs | 73 ++++++++++++++++++++++------ azalea-block/src/blocks.rs | 34 ++++++------- codegen/lib/code/blocks.py | 46 ++++++++++++++++-- codegen/lib/utils.py | 7 ++- 4 files changed, 123 insertions(+), 37 deletions(-) diff --git a/azalea-block/block-macros/src/lib.rs b/azalea-block/block-macros/src/lib.rs index 63e21e58..c0b5422d 100644 --- a/azalea-block/block-macros/src/lib.rs +++ b/azalea-block/block-macros/src/lib.rs @@ -20,10 +20,14 @@ struct PropertyDefinitions { properties: Vec, } +struct PropertyAndDefault { + name: Ident, + default: Ident, +} struct BlockDefinition { name: Ident, behavior: Expr, - properties: Punctuated, + properties_and_defaults: Vec, } struct BlockDefinitions { blocks: Vec, @@ -39,14 +43,14 @@ impl Parse for PropertyDefinition { // Floor, // Wall, // Ceiling - // }; + // }, let name = input.parse()?; let content; braced!(content in input); let variants = content.parse_terminated(Ident::parse)?; - input.parse::()?; + input.parse::()?; Ok(PropertyDefinition { name, variants }) } } @@ -66,11 +70,11 @@ impl Parse for PropertyDefinitions { impl Parse for BlockDefinition { fn parse(input: ParseStream) -> Result { - // acacia_button => BlockBehavior { has_collision: false }, { + // acacia_button => BlockBehavior::default().no_collision(), { // Face, // Facing, // Powered - // }; + // }, let name = input.parse()?; input.parse::]>()?; let behavior = input.parse()?; @@ -78,12 +82,29 @@ impl Parse for BlockDefinition { input.parse::()?; let content; braced!(content in input); - let properties = content.parse_terminated(Ident::parse)?; - input.parse::()?; + + let mut properties_and_defaults = Vec::new(); + + loop { + let property = match content.parse() { + Ok(property) => property, + Err(_) => break, + }; + content.parse::()?; + let property_default = content.parse()?; + properties_and_defaults.push(PropertyAndDefault { + name: property, + default: property_default, + }); + if content.parse::().is_err() { + break; + } + } + input.parse::()?; Ok(BlockDefinition { name, behavior, - properties, + properties_and_defaults, }) } } @@ -109,6 +130,8 @@ impl Parse for MakeBlockStates { braced!(content in input); let properties = content.parse()?; + input.parse::()?; + let blocks_ident = input.parse::()?; assert_eq!(blocks_ident.to_string(), "Blocks"); input.parse::]>()?; @@ -183,9 +206,9 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { let mut from_state_to_block_match = quote! {}; for block in &input.block_definitions.blocks { let block_property_names = &block - .properties + .properties_and_defaults .iter() - .map(|p| p.to_string()) + .map(|p| p.name.to_string()) .collect::>(); let mut block_properties_vec = Vec::new(); for property_name in block_property_names { @@ -200,7 +223,7 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { // pub facing: properties::Facing, // pub powered: properties::Powered, let mut block_struct_fields = quote! {}; - for property in &block.properties { + for PropertyAndDefault { name: property, .. } in &block.properties_and_defaults { let property_name_snake = Ident::new(&property.to_string(), proc_macro2::Span::call_site()); block_struct_fields.extend(quote! { @@ -268,12 +291,16 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { // } let mut from_state_to_block_inner = quote! {}; let mut division = 1usize; - for i in (0..block.properties.len()).rev() { - let property = &block.properties[i]; + for i in (0..block.properties_and_defaults.len()).rev() { + let PropertyAndDefault { + name: property_name, + .. + } = &block.properties_and_defaults[i]; + let property_variants = &block_properties_vec[i]; let property_variants_count = property_variants.len(); from_state_to_block_inner.extend(quote! { - #property: #property::from((b / #division) % #property_variants_count), + #property_name: #property_name::from((b / #division) % #property_variants_count), }); division *= property_variants_count; @@ -289,6 +316,17 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { }, }); + let mut block_default_fields = quote! {}; + for PropertyAndDefault { + name: property, + default: property_default, + } in &block.properties_and_defaults + { + block_default_fields.extend(quote! { + #property: #property::#property_default, + }) + } + let block_behavior = &block.behavior; let block_id = block.name.to_string(); let block_struct = quote! { @@ -314,6 +352,13 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { } } + impl Default for #block_struct_name { + fn default() -> Self { + Self { + #block_default_fields + } + } + } }; block_structs.extend(block_struct); diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index 88253e34..8a4a150b 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -12,43 +12,43 @@ make_block_states! { Floor, Wall, Ceiling - }; + }, Facing { North, South, West, East - }; + }, Powered { True, False - }; + }, Half { Upper, Lower - }; + }, Hinge { Left, Right - }; + }, Open { True, False - }; - } + }, + }, Blocks => { acacia_button => BlockBehavior::default().no_collision(), { - Face, - Facing, - Powered - }; + Face=Floor, + Facing=North, + Powered=True + }, acacia_door => BlockBehavior::default(), { - Facing, - Half, - Hinge, - Open, - Powered - }; + Facing=North, + Half=Upper, + Hinge=Left, + Open=True, + Powered=True + }, } } diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index fd268b98..a8f9afd1 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -1,5 +1,6 @@ +from lib.utils import to_camel_case from lib.utils import get_dir_location - +import json BLOCKS_RS_DIR = get_dir_location('../azalea-block/src/blocks.rs') @@ -11,10 +12,45 @@ def generate_blocks(blocks: dict): new_make_block_states_macro_code = [] new_make_block_states_macro_code.append('make_block_states! {') + # Find properties properties = {} - for block_name, block_data in blocks.items(): - block_properties = block_data['properties'] - + for block_data in blocks.values(): + block_properties = block_data.get('properties', {}) properties.update(block_properties) - print(properties) + # Property codegen + new_make_block_states_macro_code.append(' Properties => {') + for property_name, property_variants in properties.items(): + new_make_block_states_macro_code.append( + f' {to_camel_case(property_name)} => {{') + + for variant in property_variants: + new_make_block_states_macro_code.append( + f' {to_camel_case(variant)},') + + new_make_block_states_macro_code.append( + f' }},') + new_make_block_states_macro_code.append(' },') + + # Block codegen + new_make_block_states_macro_code.append(' Blocks => {') + for block_id, block_data in blocks.items(): + block_id = block_id.split(':')[1] + block_states = block_data['states'] + + default_property_variants = {} + for state in block_states: + if state.get('default'): + default_property_variants = state.get('properties', {}) + + # TODO: use burger to generate the blockbehavior + new_make_block_states_macro_code.append( + f' {block_id} => BlockBehavior::default(), {{') + for property in block_data.get('properties', {}): + property_default = default_property_variants.get(property) + new_make_block_states_macro_code.append( + f' {to_camel_case(property)}={to_camel_case(property_default)},') + new_make_block_states_macro_code.append(' },') + new_make_block_states_macro_code.append(' },') + + print('\n'.join(new_make_block_states_macro_code)) diff --git a/codegen/lib/utils.py b/codegen/lib/utils.py index 77a7b2d4..fb43af21 100644 --- a/codegen/lib/utils.py +++ b/codegen/lib/utils.py @@ -11,7 +11,12 @@ def to_snake_case(name: str): def to_camel_case(name: str): s = re.sub('_([a-z])', lambda m: m.group(1).upper(), name) - return s[0].upper() + s[1:] + s = s[0].upper() + s[1:] + # if the first character is a number, we need to add an underscore + # maybe we could convert it to the number name (like 2 would become "two")? + if s[0].isdigit(): + s = f'_{s}' + return s def padded_hex(n: int): From e832c84eb8196744c3c48a4412c808d38c917a80 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 28 May 2022 21:38:30 -0500 Subject: [PATCH 15/33] fixed macro for blocks with no properties --- azalea-block/block-macros/src/lib.rs | 40 +++++++++++++++++++------- azalea-block/block-macros/src/utils.rs | 3 ++ azalea-block/src/blocks.rs | 6 +--- codegen/lib/code/blocks.py | 22 ++++++++++++-- 4 files changed, 53 insertions(+), 18 deletions(-) diff --git a/azalea-block/block-macros/src/lib.rs b/azalea-block/block-macros/src/lib.rs index c0b5422d..b5a7909f 100644 --- a/azalea-block/block-macros/src/lib.rs +++ b/azalea-block/block-macros/src/lib.rs @@ -230,21 +230,32 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { pub #property_name_snake: #property, }) } + let block_name_pascal_case = Ident::new( + &to_pascal_case(&block.name.to_string()), + proc_macro2::Span::call_site(), + ); let block_struct_name = Ident::new( - &format!("{}Block", to_pascal_case(&block.name.to_string())), + &format!("{}Block", block_name_pascal_case), proc_macro2::Span::call_site(), ); - let mut from_block_to_state_match = quote! {}; + let mut from_block_to_state_match_inner = quote! {}; let first_state_id = state_id; + // if there's no properties, then the block is just a single state + if block_properties_vec.len() == 0 { + block_state_enum_variants.extend(quote! { + #block_name_pascal_case, + }); + state_id += 1; + } for combination in combinations_of(&block_properties_vec) { state_id += 1; let variant_name = Ident::new( &format!( "{}_{}", - to_pascal_case(&block.name.to_string()), + block_name_pascal_case, combination .iter() .map(|v| v.to_string()) @@ -260,7 +271,7 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { // face: properties::Face::Floor, // facing: properties::Facing::North, // powered: properties::Powered::True, - let mut from_block_to_state_match_inner = quote! {}; + let mut from_block_to_state_combination_match_inner = quote! {}; for i in 0..block_property_names.len() { let property_name = &block_property_names[i]; let property_name_ident = Ident::new(property_name, proc_macro2::Span::call_site()); @@ -269,14 +280,14 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { let variant = Ident::new(&combination[i].to_string(), proc_macro2::Span::call_site()); - from_block_to_state_match_inner.extend(quote! { + from_block_to_state_combination_match_inner.extend(quote! { #property_name_ident: #property_name_snake::#variant, }); } - from_block_to_state_match.extend(quote! { + from_block_to_state_match_inner.extend(quote! { #block_struct_name { - #from_block_to_state_match_inner + #from_block_to_state_combination_match_inner } => BlockState::#variant_name, }); } @@ -329,6 +340,17 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { let block_behavior = &block.behavior; let block_id = block.name.to_string(); + + let from_block_to_state_match = if block.properties_and_defaults.len() > 0 { + quote! { + match b { + #from_block_to_state_match_inner + } + } + } else { + quote! { BlockState::#block_name_pascal_case } + }; + let block_struct = quote! { #[derive(Debug)] pub struct #block_struct_name { @@ -346,9 +368,7 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { impl From<#block_struct_name> for BlockState { fn from(b: #block_struct_name) -> Self { - match b { - #from_block_to_state_match - } + #from_block_to_state_match } } diff --git a/azalea-block/block-macros/src/utils.rs b/azalea-block/block-macros/src/utils.rs index 8700e17f..019fd60f 100644 --- a/azalea-block/block-macros/src/utils.rs +++ b/azalea-block/block-macros/src/utils.rs @@ -1,5 +1,8 @@ pub fn combinations_of(items: &[Vec]) -> Vec> { let mut combinations = Vec::new(); + if items.len() == 0 { + return combinations; + }; if items.len() == 1 { for item in &items[0] { combinations.push(vec![item.clone()]); diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index 8a4a150b..a5f6283d 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -43,11 +43,6 @@ make_block_states! { Powered=True }, acacia_door => BlockBehavior::default(), { - Facing=North, - Half=Upper, - Hinge=Left, - Open=True, - Powered=True }, } } @@ -168,3 +163,4 @@ make_block_states! { // assert_eq!(block.id(), "acacia_button"); // } // } +// } diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index a8f9afd1..ca178ff3 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -22,7 +22,7 @@ def generate_blocks(blocks: dict): new_make_block_states_macro_code.append(' Properties => {') for property_name, property_variants in properties.items(): new_make_block_states_macro_code.append( - f' {to_camel_case(property_name)} => {{') + f' {to_camel_case(property_name)} {{') for variant in property_variants: new_make_block_states_macro_code.append( @@ -51,6 +51,22 @@ def generate_blocks(blocks: dict): new_make_block_states_macro_code.append( f' {to_camel_case(property)}={to_camel_case(property_default)},') new_make_block_states_macro_code.append(' },') - new_make_block_states_macro_code.append(' },') + new_make_block_states_macro_code.append(' }') + new_make_block_states_macro_code.append('}') - print('\n'.join(new_make_block_states_macro_code)) + new_code = [] + in_macro = False + for line in existing_code: + if line == 'make_block_states! {': + in_macro = True + elif line == '}': + if in_macro: + in_macro = False + new_code.extend(new_make_block_states_macro_code) + continue + if in_macro: + continue + new_code.append(line) + + with open(BLOCKS_RS_DIR, 'w') as f: + f.write('\n'.join(new_code)) From 7d4eceefde825e65e51b89394f46beb41847103c Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 29 May 2022 00:39:27 -0500 Subject: [PATCH 16/33] mmmmmmmmmm --- azalea-block/src/blocks.rs | 3667 +++++++++++++++++++++++++++++++++++- 1 file changed, 3656 insertions(+), 11 deletions(-) diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index a5f6283d..8da49de0 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -11,38 +11,3683 @@ make_block_states! { Face { Floor, Wall, - Ceiling + Ceiling, }, Facing { North, South, West, - East + East, }, Powered { True, - False + False, }, Half { - Upper, - Lower + Top, + Bottom, }, Hinge { Left, - Right + Right, }, Open { True, - False + False, + }, + East { + True, + False, + }, + North { + True, + False, + }, + South { + True, + False, + }, + Waterlogged { + True, + False, + }, + West { + True, + False, + }, + InWall { + True, + False, + }, + Distance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + Persistent { + True, + False, + }, + Axis { + X, + Y, + Z, + }, + Stage { + _0, + _1, + }, + Rotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + Type { + Top, + Bottom, + Double, + }, + Shape { + Straight, + InnerLeft, + InnerRight, + OuterLeft, + OuterRight, + }, + Up { + True, + False, + }, + Age { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + Leaves { + None, + Small, + Large, + }, + HoneyLevel { + _0, + _1, + _2, + _3, + _4, + _5, + }, + Attachment { + Floor, + Ceiling, + SingleWall, + DoubleWall, + }, + Tilt { + None, + Unstable, + Partial, + Full, + }, + Occupied { + True, + False, + }, + Part { + Head, + Foot, + }, + Candles { + _1, + _2, + _3, + _4, + }, + Lit { + True, + False, + }, + HasBottle_0 { + True, + False, + }, + HasBottle_1 { + True, + False, + }, + HasBottle_2 { + True, + False, + }, + Down { + True, + False, + }, + Drag { + True, + False, + }, + Bites { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + }, + SignalFire { + True, + False, + }, + Berries { + True, + False, + }, + Conditional { + True, + False, + }, + Mode { + Save, + Load, + Corner, + Data, + }, + Level { + _1, + _2, + _3, + }, + Inverted { + True, + False, + }, + Power { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + Triggered { + True, + False, + }, + Eye { + True, + False, + }, + Moisture { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + Snowy { + True, + False, + }, + Enabled { + True, + False, + }, + Orientation { + DownEast, + DownNorth, + DownSouth, + DownWest, + UpEast, + UpNorth, + UpSouth, + UpWest, + WestUp, + EastUp, + NorthUp, + SouthUp, + }, + HasRecord { + True, + False, + }, + Hanging { + True, + False, + }, + HasBook { + True, + False, + }, + Instrument { + Harp, + Basedrum, + Snare, + Hat, + Bass, + Flute, + Bell, + Guitar, + Chime, + Xylophone, + IronXylophone, + CowBell, + Didgeridoo, + Bit, + Banjo, + Pling, + }, + Note { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + _16, + _17, + _18, + _19, + _20, + _21, + _22, + _23, + _24, + }, + Extended { + True, + False, + }, + Short { + True, + False, + }, + Thickness { + TipMerge, + Tip, + Frustum, + Middle, + Base, + }, + VerticalDirection { + Up, + Down, + }, + Delay { + _1, + _2, + _3, + _4, + }, + Locked { + True, + False, + }, + Charges { + _0, + _1, + _2, + _3, + _4, + }, + Bottom { + True, + False, + }, + Bloom { + True, + False, + }, + SculkSensorPhase { + Inactive, + Active, + Cooldown, + }, + CanSummon { + True, + False, + }, + Shrieking { + True, + False, + }, + Pickles { + _1, + _2, + _3, + _4, + }, + Layers { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + }, + Unstable { + True, + False, + }, + Attached { + True, + False, + }, + Disarmed { + True, + False, + }, + Eggs { + _1, + _2, + _3, + _4, + }, + Hatch { + _0, + _1, + _2, }, }, Blocks => { - acacia_button => BlockBehavior::default().no_collision(), { - Face=Floor, + acacia_button => BlockBehavior::default(), { + Face=Wall, Facing=North, - Powered=True + Powered=False, }, acacia_door => BlockBehavior::default(), { + Facing=North, + Half=Lower, + Hinge=Left, + Open=False, + Powered=False, + }, + acacia_fence => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + acacia_fence_gate => BlockBehavior::default(), { + Facing=North, + InWall=False, + Open=False, + Powered=False, + }, + acacia_leaves => BlockBehavior::default(), { + Distance=_7, + Persistent=False, + Waterlogged=False, + }, + acacia_log => BlockBehavior::default(), { + Axis=Y, + }, + acacia_planks => BlockBehavior::default(), { + }, + acacia_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + acacia_sapling => BlockBehavior::default(), { + Stage=_0, + }, + acacia_sign => BlockBehavior::default(), { + Rotation=_0, + Waterlogged=False, + }, + acacia_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + acacia_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + acacia_trapdoor => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Open=False, + Powered=False, + Waterlogged=False, + }, + acacia_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + acacia_wood => BlockBehavior::default(), { + Axis=Y, + }, + activator_rail => BlockBehavior::default(), { + Powered=False, + Shape=NorthSouth, + Waterlogged=False, + }, + air => BlockBehavior::default(), { + }, + allium => BlockBehavior::default(), { + }, + amethyst_block => BlockBehavior::default(), { + }, + amethyst_cluster => BlockBehavior::default(), { + Facing=Up, + Waterlogged=False, + }, + ancient_debris => BlockBehavior::default(), { + }, + andesite => BlockBehavior::default(), { + }, + andesite_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + andesite_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + andesite_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + anvil => BlockBehavior::default(), { + Facing=North, + }, + attached_melon_stem => BlockBehavior::default(), { + Facing=North, + }, + attached_pumpkin_stem => BlockBehavior::default(), { + Facing=North, + }, + azalea => BlockBehavior::default(), { + }, + azalea_leaves => BlockBehavior::default(), { + Distance=_7, + Persistent=False, + Waterlogged=False, + }, + azure_bluet => BlockBehavior::default(), { + }, + bamboo => BlockBehavior::default(), { + Age=_0, + Leaves=None, + Stage=_0, + }, + bamboo_sapling => BlockBehavior::default(), { + }, + barrel => BlockBehavior::default(), { + Facing=North, + Open=False, + }, + barrier => BlockBehavior::default(), { + }, + basalt => BlockBehavior::default(), { + Axis=Y, + }, + beacon => BlockBehavior::default(), { + }, + bedrock => BlockBehavior::default(), { + }, + bee_nest => BlockBehavior::default(), { + Facing=North, + HoneyLevel=_0, + }, + beehive => BlockBehavior::default(), { + Facing=North, + HoneyLevel=_0, + }, + beetroots => BlockBehavior::default(), { + Age=_0, + }, + bell => BlockBehavior::default(), { + Attachment=Floor, + Facing=North, + Powered=False, + }, + big_dripleaf => BlockBehavior::default(), { + Facing=North, + Tilt=None, + Waterlogged=False, + }, + big_dripleaf_stem => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + birch_button => BlockBehavior::default(), { + Face=Wall, + Facing=North, + Powered=False, + }, + birch_door => BlockBehavior::default(), { + Facing=North, + Half=Lower, + Hinge=Left, + Open=False, + Powered=False, + }, + birch_fence => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + birch_fence_gate => BlockBehavior::default(), { + Facing=North, + InWall=False, + Open=False, + Powered=False, + }, + birch_leaves => BlockBehavior::default(), { + Distance=_7, + Persistent=False, + Waterlogged=False, + }, + birch_log => BlockBehavior::default(), { + Axis=Y, + }, + birch_planks => BlockBehavior::default(), { + }, + birch_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + birch_sapling => BlockBehavior::default(), { + Stage=_0, + }, + birch_sign => BlockBehavior::default(), { + Rotation=_0, + Waterlogged=False, + }, + birch_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + birch_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + birch_trapdoor => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Open=False, + Powered=False, + Waterlogged=False, + }, + birch_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + birch_wood => BlockBehavior::default(), { + Axis=Y, + }, + black_banner => BlockBehavior::default(), { + Rotation=_0, + }, + black_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + black_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + black_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + black_carpet => BlockBehavior::default(), { + }, + black_concrete => BlockBehavior::default(), { + }, + black_concrete_powder => BlockBehavior::default(), { + }, + black_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + black_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + black_stained_glass => BlockBehavior::default(), { + }, + black_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + black_terracotta => BlockBehavior::default(), { + }, + black_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + black_wool => BlockBehavior::default(), { + }, + blackstone => BlockBehavior::default(), { + }, + blackstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + blackstone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + blackstone_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + blast_furnace => BlockBehavior::default(), { + Facing=North, + Lit=False, + }, + blue_banner => BlockBehavior::default(), { + Rotation=_0, + }, + blue_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + blue_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + blue_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + blue_carpet => BlockBehavior::default(), { + }, + blue_concrete => BlockBehavior::default(), { + }, + blue_concrete_powder => BlockBehavior::default(), { + }, + blue_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + blue_ice => BlockBehavior::default(), { + }, + blue_orchid => BlockBehavior::default(), { + }, + blue_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + blue_stained_glass => BlockBehavior::default(), { + }, + blue_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + blue_terracotta => BlockBehavior::default(), { + }, + blue_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + blue_wool => BlockBehavior::default(), { + }, + bone_block => BlockBehavior::default(), { + Axis=Y, + }, + bookshelf => BlockBehavior::default(), { + }, + brain_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + brain_coral_block => BlockBehavior::default(), { + }, + brain_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + brain_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + brewing_stand => BlockBehavior::default(), { + HasBottle_0=False, + HasBottle_1=False, + HasBottle_2=False, + }, + brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + brick_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + bricks => BlockBehavior::default(), { + }, + brown_banner => BlockBehavior::default(), { + Rotation=_0, + }, + brown_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + brown_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + brown_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + brown_carpet => BlockBehavior::default(), { + }, + brown_concrete => BlockBehavior::default(), { + }, + brown_concrete_powder => BlockBehavior::default(), { + }, + brown_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + brown_mushroom => BlockBehavior::default(), { + }, + brown_mushroom_block => BlockBehavior::default(), { + Down=True, + East=True, + North=True, + South=True, + Up=True, + West=True, + }, + brown_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + brown_stained_glass => BlockBehavior::default(), { + }, + brown_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + brown_terracotta => BlockBehavior::default(), { + }, + brown_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + brown_wool => BlockBehavior::default(), { + }, + bubble_column => BlockBehavior::default(), { + Drag=True, + }, + bubble_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + bubble_coral_block => BlockBehavior::default(), { + }, + bubble_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + bubble_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + budding_amethyst => BlockBehavior::default(), { + }, + cactus => BlockBehavior::default(), { + Age=_0, + }, + cake => BlockBehavior::default(), { + Bites=_0, + }, + calcite => BlockBehavior::default(), { + }, + campfire => BlockBehavior::default(), { + Facing=North, + Lit=True, + SignalFire=False, + Waterlogged=False, + }, + candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + candle_cake => BlockBehavior::default(), { + Lit=False, + }, + carrots => BlockBehavior::default(), { + Age=_0, + }, + cartography_table => BlockBehavior::default(), { + }, + carved_pumpkin => BlockBehavior::default(), { + Facing=North, + }, + cauldron => BlockBehavior::default(), { + }, + cave_air => BlockBehavior::default(), { + }, + cave_vines => BlockBehavior::default(), { + Age=_0, + Berries=False, + }, + cave_vines_plant => BlockBehavior::default(), { + Berries=False, + }, + chain => BlockBehavior::default(), { + Axis=Y, + Waterlogged=False, + }, + chain_command_block => BlockBehavior::default(), { + Conditional=False, + Facing=North, + }, + chest => BlockBehavior::default(), { + Type=Single, + Facing=North, + Waterlogged=False, + }, + chipped_anvil => BlockBehavior::default(), { + Facing=North, + }, + chiseled_deepslate => BlockBehavior::default(), { + }, + chiseled_nether_bricks => BlockBehavior::default(), { + }, + chiseled_polished_blackstone => BlockBehavior::default(), { + }, + chiseled_quartz_block => BlockBehavior::default(), { + }, + chiseled_red_sandstone => BlockBehavior::default(), { + }, + chiseled_sandstone => BlockBehavior::default(), { + }, + chiseled_stone_bricks => BlockBehavior::default(), { + }, + chorus_flower => BlockBehavior::default(), { + Age=_0, + }, + chorus_plant => BlockBehavior::default(), { + Down=False, + East=False, + North=False, + South=False, + Up=False, + West=False, + }, + clay => BlockBehavior::default(), { + }, + coal_block => BlockBehavior::default(), { + }, + coal_ore => BlockBehavior::default(), { + }, + coarse_dirt => BlockBehavior::default(), { + }, + cobbled_deepslate => BlockBehavior::default(), { + }, + cobbled_deepslate_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + cobbled_deepslate_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + cobbled_deepslate_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + cobblestone => BlockBehavior::default(), { + }, + cobblestone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + cobblestone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + cobblestone_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + cobweb => BlockBehavior::default(), { + }, + cocoa => BlockBehavior::default(), { + Age=_0, + Facing=North, + }, + command_block => BlockBehavior::default(), { + Conditional=False, + Facing=North, + }, + comparator => BlockBehavior::default(), { + Facing=North, + Mode=Compare, + Powered=False, + }, + composter => BlockBehavior::default(), { + Level=_0, + }, + conduit => BlockBehavior::default(), { + Waterlogged=True, + }, + copper_block => BlockBehavior::default(), { + }, + copper_ore => BlockBehavior::default(), { + }, + cornflower => BlockBehavior::default(), { + }, + cracked_deepslate_bricks => BlockBehavior::default(), { + }, + cracked_deepslate_tiles => BlockBehavior::default(), { + }, + cracked_nether_bricks => BlockBehavior::default(), { + }, + cracked_polished_blackstone_bricks => BlockBehavior::default(), { + }, + cracked_stone_bricks => BlockBehavior::default(), { + }, + crafting_table => BlockBehavior::default(), { + }, + creeper_head => BlockBehavior::default(), { + Rotation=_0, + }, + creeper_wall_head => BlockBehavior::default(), { + Facing=North, + }, + crimson_button => BlockBehavior::default(), { + Face=Wall, + Facing=North, + Powered=False, + }, + crimson_door => BlockBehavior::default(), { + Facing=North, + Half=Lower, + Hinge=Left, + Open=False, + Powered=False, + }, + crimson_fence => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + crimson_fence_gate => BlockBehavior::default(), { + Facing=North, + InWall=False, + Open=False, + Powered=False, + }, + crimson_fungus => BlockBehavior::default(), { + }, + crimson_hyphae => BlockBehavior::default(), { + Axis=Y, + }, + crimson_nylium => BlockBehavior::default(), { + }, + crimson_planks => BlockBehavior::default(), { + }, + crimson_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + crimson_roots => BlockBehavior::default(), { + }, + crimson_sign => BlockBehavior::default(), { + Rotation=_0, + Waterlogged=False, + }, + crimson_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + crimson_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + crimson_stem => BlockBehavior::default(), { + Axis=Y, + }, + crimson_trapdoor => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Open=False, + Powered=False, + Waterlogged=False, + }, + crimson_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + crying_obsidian => BlockBehavior::default(), { + }, + cut_copper => BlockBehavior::default(), { + }, + cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + cut_red_sandstone => BlockBehavior::default(), { + }, + cut_red_sandstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + cut_sandstone => BlockBehavior::default(), { + }, + cut_sandstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + cyan_banner => BlockBehavior::default(), { + Rotation=_0, + }, + cyan_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + cyan_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + cyan_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + cyan_carpet => BlockBehavior::default(), { + }, + cyan_concrete => BlockBehavior::default(), { + }, + cyan_concrete_powder => BlockBehavior::default(), { + }, + cyan_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + cyan_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + cyan_stained_glass => BlockBehavior::default(), { + }, + cyan_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + cyan_terracotta => BlockBehavior::default(), { + }, + cyan_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + cyan_wool => BlockBehavior::default(), { + }, + damaged_anvil => BlockBehavior::default(), { + Facing=North, + }, + dandelion => BlockBehavior::default(), { + }, + dark_oak_button => BlockBehavior::default(), { + Face=Wall, + Facing=North, + Powered=False, + }, + dark_oak_door => BlockBehavior::default(), { + Facing=North, + Half=Lower, + Hinge=Left, + Open=False, + Powered=False, + }, + dark_oak_fence => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + dark_oak_fence_gate => BlockBehavior::default(), { + Facing=North, + InWall=False, + Open=False, + Powered=False, + }, + dark_oak_leaves => BlockBehavior::default(), { + Distance=_7, + Persistent=False, + Waterlogged=False, + }, + dark_oak_log => BlockBehavior::default(), { + Axis=Y, + }, + dark_oak_planks => BlockBehavior::default(), { + }, + dark_oak_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + dark_oak_sapling => BlockBehavior::default(), { + Stage=_0, + }, + dark_oak_sign => BlockBehavior::default(), { + Rotation=_0, + Waterlogged=False, + }, + dark_oak_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + dark_oak_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + dark_oak_trapdoor => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Open=False, + Powered=False, + Waterlogged=False, + }, + dark_oak_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + dark_oak_wood => BlockBehavior::default(), { + Axis=Y, + }, + dark_prismarine => BlockBehavior::default(), { + }, + dark_prismarine_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + dark_prismarine_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + daylight_detector => BlockBehavior::default(), { + Inverted=False, + Power=_0, + }, + dead_brain_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_brain_coral_block => BlockBehavior::default(), { + }, + dead_brain_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_brain_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + dead_bubble_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_bubble_coral_block => BlockBehavior::default(), { + }, + dead_bubble_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_bubble_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + dead_bush => BlockBehavior::default(), { + }, + dead_fire_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_fire_coral_block => BlockBehavior::default(), { + }, + dead_fire_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_fire_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + dead_horn_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_horn_coral_block => BlockBehavior::default(), { + }, + dead_horn_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_horn_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + dead_tube_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_tube_coral_block => BlockBehavior::default(), { + }, + dead_tube_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_tube_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + deepslate => BlockBehavior::default(), { + Axis=Y, + }, + deepslate_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + deepslate_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + deepslate_brick_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + deepslate_bricks => BlockBehavior::default(), { + }, + deepslate_coal_ore => BlockBehavior::default(), { + }, + deepslate_copper_ore => BlockBehavior::default(), { + }, + deepslate_diamond_ore => BlockBehavior::default(), { + }, + deepslate_emerald_ore => BlockBehavior::default(), { + }, + deepslate_gold_ore => BlockBehavior::default(), { + }, + deepslate_iron_ore => BlockBehavior::default(), { + }, + deepslate_lapis_ore => BlockBehavior::default(), { + }, + deepslate_redstone_ore => BlockBehavior::default(), { + Lit=False, + }, + deepslate_tile_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + deepslate_tile_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + deepslate_tile_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + deepslate_tiles => BlockBehavior::default(), { + }, + detector_rail => BlockBehavior::default(), { + Powered=False, + Shape=NorthSouth, + Waterlogged=False, + }, + diamond_block => BlockBehavior::default(), { + }, + diamond_ore => BlockBehavior::default(), { + }, + diorite => BlockBehavior::default(), { + }, + diorite_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + diorite_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + diorite_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + dirt => BlockBehavior::default(), { + }, + dirt_path => BlockBehavior::default(), { + }, + dispenser => BlockBehavior::default(), { + Facing=North, + Triggered=False, + }, + dragon_egg => BlockBehavior::default(), { + }, + dragon_head => BlockBehavior::default(), { + Rotation=_0, + }, + dragon_wall_head => BlockBehavior::default(), { + Facing=North, + }, + dried_kelp_block => BlockBehavior::default(), { + }, + dripstone_block => BlockBehavior::default(), { + }, + dropper => BlockBehavior::default(), { + Facing=North, + Triggered=False, + }, + emerald_block => BlockBehavior::default(), { + }, + emerald_ore => BlockBehavior::default(), { + }, + enchanting_table => BlockBehavior::default(), { + }, + end_gateway => BlockBehavior::default(), { + }, + end_portal => BlockBehavior::default(), { + }, + end_portal_frame => BlockBehavior::default(), { + Eye=False, + Facing=North, + }, + end_rod => BlockBehavior::default(), { + Facing=Up, + }, + end_stone => BlockBehavior::default(), { + }, + end_stone_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + end_stone_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + end_stone_brick_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + end_stone_bricks => BlockBehavior::default(), { + }, + ender_chest => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + exposed_copper => BlockBehavior::default(), { + }, + exposed_cut_copper => BlockBehavior::default(), { + }, + exposed_cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + exposed_cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + farmland => BlockBehavior::default(), { + Moisture=_0, + }, + fern => BlockBehavior::default(), { + }, + fire => BlockBehavior::default(), { + Age=_0, + East=False, + North=False, + South=False, + Up=False, + West=False, + }, + fire_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + fire_coral_block => BlockBehavior::default(), { + }, + fire_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + fire_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + fletching_table => BlockBehavior::default(), { + }, + flower_pot => BlockBehavior::default(), { + }, + flowering_azalea => BlockBehavior::default(), { + }, + flowering_azalea_leaves => BlockBehavior::default(), { + Distance=_7, + Persistent=False, + Waterlogged=False, + }, + frogspawn => BlockBehavior::default(), { + }, + frosted_ice => BlockBehavior::default(), { + Age=_0, + }, + furnace => BlockBehavior::default(), { + Facing=North, + Lit=False, + }, + gilded_blackstone => BlockBehavior::default(), { + }, + glass => BlockBehavior::default(), { + }, + glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + glow_lichen => BlockBehavior::default(), { + Down=False, + East=False, + North=False, + South=False, + Up=False, + Waterlogged=False, + West=False, + }, + glowstone => BlockBehavior::default(), { + }, + gold_block => BlockBehavior::default(), { + }, + gold_ore => BlockBehavior::default(), { + }, + granite => BlockBehavior::default(), { + }, + granite_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + granite_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + granite_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + grass => BlockBehavior::default(), { + }, + grass_block => BlockBehavior::default(), { + Snowy=False, + }, + gravel => BlockBehavior::default(), { + }, + gray_banner => BlockBehavior::default(), { + Rotation=_0, + }, + gray_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + gray_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + gray_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + gray_carpet => BlockBehavior::default(), { + }, + gray_concrete => BlockBehavior::default(), { + }, + gray_concrete_powder => BlockBehavior::default(), { + }, + gray_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + gray_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + gray_stained_glass => BlockBehavior::default(), { + }, + gray_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + gray_terracotta => BlockBehavior::default(), { + }, + gray_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + gray_wool => BlockBehavior::default(), { + }, + green_banner => BlockBehavior::default(), { + Rotation=_0, + }, + green_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + green_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + green_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + green_carpet => BlockBehavior::default(), { + }, + green_concrete => BlockBehavior::default(), { + }, + green_concrete_powder => BlockBehavior::default(), { + }, + green_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + green_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + green_stained_glass => BlockBehavior::default(), { + }, + green_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + green_terracotta => BlockBehavior::default(), { + }, + green_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + green_wool => BlockBehavior::default(), { + }, + grindstone => BlockBehavior::default(), { + Face=Wall, + Facing=North, + }, + hanging_roots => BlockBehavior::default(), { + Waterlogged=False, + }, + hay_block => BlockBehavior::default(), { + Axis=Y, + }, + heavy_weighted_pressure_plate => BlockBehavior::default(), { + Power=_0, + }, + honey_block => BlockBehavior::default(), { + }, + honeycomb_block => BlockBehavior::default(), { + }, + hopper => BlockBehavior::default(), { + Enabled=True, + Facing=Down, + }, + horn_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + horn_coral_block => BlockBehavior::default(), { + }, + horn_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + horn_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + ice => BlockBehavior::default(), { + }, + infested_chiseled_stone_bricks => BlockBehavior::default(), { + }, + infested_cobblestone => BlockBehavior::default(), { + }, + infested_cracked_stone_bricks => BlockBehavior::default(), { + }, + infested_deepslate => BlockBehavior::default(), { + Axis=Y, + }, + infested_mossy_stone_bricks => BlockBehavior::default(), { + }, + infested_stone => BlockBehavior::default(), { + }, + infested_stone_bricks => BlockBehavior::default(), { + }, + iron_bars => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + iron_block => BlockBehavior::default(), { + }, + iron_door => BlockBehavior::default(), { + Facing=North, + Half=Lower, + Hinge=Left, + Open=False, + Powered=False, + }, + iron_ore => BlockBehavior::default(), { + }, + iron_trapdoor => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Open=False, + Powered=False, + Waterlogged=False, + }, + jack_o_lantern => BlockBehavior::default(), { + Facing=North, + }, + jigsaw => BlockBehavior::default(), { + Orientation=NorthUp, + }, + jukebox => BlockBehavior::default(), { + HasRecord=False, + }, + jungle_button => BlockBehavior::default(), { + Face=Wall, + Facing=North, + Powered=False, + }, + jungle_door => BlockBehavior::default(), { + Facing=North, + Half=Lower, + Hinge=Left, + Open=False, + Powered=False, + }, + jungle_fence => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + jungle_fence_gate => BlockBehavior::default(), { + Facing=North, + InWall=False, + Open=False, + Powered=False, + }, + jungle_leaves => BlockBehavior::default(), { + Distance=_7, + Persistent=False, + Waterlogged=False, + }, + jungle_log => BlockBehavior::default(), { + Axis=Y, + }, + jungle_planks => BlockBehavior::default(), { + }, + jungle_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + jungle_sapling => BlockBehavior::default(), { + Stage=_0, + }, + jungle_sign => BlockBehavior::default(), { + Rotation=_0, + Waterlogged=False, + }, + jungle_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + jungle_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + jungle_trapdoor => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Open=False, + Powered=False, + Waterlogged=False, + }, + jungle_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + jungle_wood => BlockBehavior::default(), { + Axis=Y, + }, + kelp => BlockBehavior::default(), { + Age=_0, + }, + kelp_plant => BlockBehavior::default(), { + }, + ladder => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + lantern => BlockBehavior::default(), { + Hanging=False, + Waterlogged=False, + }, + lapis_block => BlockBehavior::default(), { + }, + lapis_ore => BlockBehavior::default(), { + }, + large_amethyst_bud => BlockBehavior::default(), { + Facing=Up, + Waterlogged=False, + }, + large_fern => BlockBehavior::default(), { + Half=Lower, + }, + lava => BlockBehavior::default(), { + Level=_0, + }, + lava_cauldron => BlockBehavior::default(), { + }, + lectern => BlockBehavior::default(), { + Facing=North, + HasBook=False, + Powered=False, + }, + lever => BlockBehavior::default(), { + Face=Wall, + Facing=North, + Powered=False, + }, + light => BlockBehavior::default(), { + Level=_15, + Waterlogged=False, + }, + light_blue_banner => BlockBehavior::default(), { + Rotation=_0, + }, + light_blue_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + light_blue_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + light_blue_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + light_blue_carpet => BlockBehavior::default(), { + }, + light_blue_concrete => BlockBehavior::default(), { + }, + light_blue_concrete_powder => BlockBehavior::default(), { + }, + light_blue_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + light_blue_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + light_blue_stained_glass => BlockBehavior::default(), { + }, + light_blue_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + light_blue_terracotta => BlockBehavior::default(), { + }, + light_blue_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + light_blue_wool => BlockBehavior::default(), { + }, + light_gray_banner => BlockBehavior::default(), { + Rotation=_0, + }, + light_gray_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + light_gray_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + light_gray_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + light_gray_carpet => BlockBehavior::default(), { + }, + light_gray_concrete => BlockBehavior::default(), { + }, + light_gray_concrete_powder => BlockBehavior::default(), { + }, + light_gray_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + light_gray_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + light_gray_stained_glass => BlockBehavior::default(), { + }, + light_gray_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + light_gray_terracotta => BlockBehavior::default(), { + }, + light_gray_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + light_gray_wool => BlockBehavior::default(), { + }, + light_weighted_pressure_plate => BlockBehavior::default(), { + Power=_0, + }, + lightning_rod => BlockBehavior::default(), { + Facing=Up, + Powered=False, + Waterlogged=False, + }, + lilac => BlockBehavior::default(), { + Half=Lower, + }, + lily_of_the_valley => BlockBehavior::default(), { + }, + lily_pad => BlockBehavior::default(), { + }, + lime_banner => BlockBehavior::default(), { + Rotation=_0, + }, + lime_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + lime_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + lime_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + lime_carpet => BlockBehavior::default(), { + }, + lime_concrete => BlockBehavior::default(), { + }, + lime_concrete_powder => BlockBehavior::default(), { + }, + lime_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + lime_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + lime_stained_glass => BlockBehavior::default(), { + }, + lime_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + lime_terracotta => BlockBehavior::default(), { + }, + lime_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + lime_wool => BlockBehavior::default(), { + }, + lodestone => BlockBehavior::default(), { + }, + loom => BlockBehavior::default(), { + Facing=North, + }, + magenta_banner => BlockBehavior::default(), { + Rotation=_0, + }, + magenta_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + magenta_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + magenta_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + magenta_carpet => BlockBehavior::default(), { + }, + magenta_concrete => BlockBehavior::default(), { + }, + magenta_concrete_powder => BlockBehavior::default(), { + }, + magenta_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + magenta_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + magenta_stained_glass => BlockBehavior::default(), { + }, + magenta_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + magenta_terracotta => BlockBehavior::default(), { + }, + magenta_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + magenta_wool => BlockBehavior::default(), { + }, + magma_block => BlockBehavior::default(), { + }, + mangrove_button => BlockBehavior::default(), { + Face=Wall, + Facing=North, + Powered=False, + }, + mangrove_door => BlockBehavior::default(), { + Facing=North, + Half=Lower, + Hinge=Left, + Open=False, + Powered=False, + }, + mangrove_fence => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + mangrove_fence_gate => BlockBehavior::default(), { + Facing=North, + InWall=False, + Open=False, + Powered=False, + }, + mangrove_leaves => BlockBehavior::default(), { + Distance=_7, + Persistent=False, + Waterlogged=False, + }, + mangrove_log => BlockBehavior::default(), { + Axis=Y, + }, + mangrove_planks => BlockBehavior::default(), { + }, + mangrove_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + mangrove_propagule => BlockBehavior::default(), { + Age=_0, + Hanging=False, + Stage=_0, + Waterlogged=False, + }, + mangrove_roots => BlockBehavior::default(), { + Waterlogged=False, + }, + mangrove_sign => BlockBehavior::default(), { + Rotation=_0, + Waterlogged=False, + }, + mangrove_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + mangrove_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + mangrove_trapdoor => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Open=False, + Powered=False, + Waterlogged=False, + }, + mangrove_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + mangrove_wood => BlockBehavior::default(), { + Axis=Y, + }, + medium_amethyst_bud => BlockBehavior::default(), { + Facing=Up, + Waterlogged=False, + }, + melon => BlockBehavior::default(), { + }, + melon_stem => BlockBehavior::default(), { + Age=_0, + }, + moss_block => BlockBehavior::default(), { + }, + moss_carpet => BlockBehavior::default(), { + }, + mossy_cobblestone => BlockBehavior::default(), { + }, + mossy_cobblestone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + mossy_cobblestone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + mossy_cobblestone_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + mossy_stone_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + mossy_stone_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + mossy_stone_brick_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + mossy_stone_bricks => BlockBehavior::default(), { + }, + moving_piston => BlockBehavior::default(), { + Type=Normal, + Facing=North, + }, + mud => BlockBehavior::default(), { + }, + mud_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + mud_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + mud_brick_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + mud_bricks => BlockBehavior::default(), { + }, + muddy_mangrove_roots => BlockBehavior::default(), { + Axis=Y, + }, + mushroom_stem => BlockBehavior::default(), { + Down=True, + East=True, + North=True, + South=True, + Up=True, + West=True, + }, + mycelium => BlockBehavior::default(), { + Snowy=False, + }, + nether_brick_fence => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + nether_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + nether_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + nether_brick_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + nether_bricks => BlockBehavior::default(), { + }, + nether_gold_ore => BlockBehavior::default(), { + }, + nether_portal => BlockBehavior::default(), { + Axis=X, + }, + nether_quartz_ore => BlockBehavior::default(), { + }, + nether_sprouts => BlockBehavior::default(), { + }, + nether_wart => BlockBehavior::default(), { + Age=_0, + }, + nether_wart_block => BlockBehavior::default(), { + }, + netherite_block => BlockBehavior::default(), { + }, + netherrack => BlockBehavior::default(), { + }, + note_block => BlockBehavior::default(), { + Instrument=Harp, + Note=_0, + Powered=False, + }, + oak_button => BlockBehavior::default(), { + Face=Wall, + Facing=North, + Powered=False, + }, + oak_door => BlockBehavior::default(), { + Facing=North, + Half=Lower, + Hinge=Left, + Open=False, + Powered=False, + }, + oak_fence => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + oak_fence_gate => BlockBehavior::default(), { + Facing=North, + InWall=False, + Open=False, + Powered=False, + }, + oak_leaves => BlockBehavior::default(), { + Distance=_7, + Persistent=False, + Waterlogged=False, + }, + oak_log => BlockBehavior::default(), { + Axis=Y, + }, + oak_planks => BlockBehavior::default(), { + }, + oak_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + oak_sapling => BlockBehavior::default(), { + Stage=_0, + }, + oak_sign => BlockBehavior::default(), { + Rotation=_0, + Waterlogged=False, + }, + oak_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + oak_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + oak_trapdoor => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Open=False, + Powered=False, + Waterlogged=False, + }, + oak_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + oak_wood => BlockBehavior::default(), { + Axis=Y, + }, + observer => BlockBehavior::default(), { + Facing=South, + Powered=False, + }, + obsidian => BlockBehavior::default(), { + }, + ochre_froglight => BlockBehavior::default(), { + Axis=Y, + }, + orange_banner => BlockBehavior::default(), { + Rotation=_0, + }, + orange_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + orange_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + orange_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + orange_carpet => BlockBehavior::default(), { + }, + orange_concrete => BlockBehavior::default(), { + }, + orange_concrete_powder => BlockBehavior::default(), { + }, + orange_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + orange_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + orange_stained_glass => BlockBehavior::default(), { + }, + orange_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + orange_terracotta => BlockBehavior::default(), { + }, + orange_tulip => BlockBehavior::default(), { + }, + orange_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + orange_wool => BlockBehavior::default(), { + }, + oxeye_daisy => BlockBehavior::default(), { + }, + oxidized_copper => BlockBehavior::default(), { + }, + oxidized_cut_copper => BlockBehavior::default(), { + }, + oxidized_cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + oxidized_cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + packed_ice => BlockBehavior::default(), { + }, + packed_mud => BlockBehavior::default(), { + }, + pearlescent_froglight => BlockBehavior::default(), { + Axis=Y, + }, + peony => BlockBehavior::default(), { + Half=Lower, + }, + petrified_oak_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + pink_banner => BlockBehavior::default(), { + Rotation=_0, + }, + pink_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + pink_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + pink_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + pink_carpet => BlockBehavior::default(), { + }, + pink_concrete => BlockBehavior::default(), { + }, + pink_concrete_powder => BlockBehavior::default(), { + }, + pink_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + pink_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + pink_stained_glass => BlockBehavior::default(), { + }, + pink_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + pink_terracotta => BlockBehavior::default(), { + }, + pink_tulip => BlockBehavior::default(), { + }, + pink_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + pink_wool => BlockBehavior::default(), { + }, + piston => BlockBehavior::default(), { + Extended=False, + Facing=North, + }, + piston_head => BlockBehavior::default(), { + Type=Normal, + Facing=North, + Short=False, + }, + player_head => BlockBehavior::default(), { + Rotation=_0, + }, + player_wall_head => BlockBehavior::default(), { + Facing=North, + }, + podzol => BlockBehavior::default(), { + Snowy=False, + }, + pointed_dripstone => BlockBehavior::default(), { + Thickness=Tip, + VerticalDirection=Up, + Waterlogged=False, + }, + polished_andesite => BlockBehavior::default(), { + }, + polished_andesite_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + polished_andesite_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + polished_basalt => BlockBehavior::default(), { + Axis=Y, + }, + polished_blackstone => BlockBehavior::default(), { + }, + polished_blackstone_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + polished_blackstone_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + polished_blackstone_brick_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + polished_blackstone_bricks => BlockBehavior::default(), { + }, + polished_blackstone_button => BlockBehavior::default(), { + Face=Wall, + Facing=North, + Powered=False, + }, + polished_blackstone_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + polished_blackstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + polished_blackstone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + polished_blackstone_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + polished_deepslate => BlockBehavior::default(), { + }, + polished_deepslate_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + polished_deepslate_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + polished_deepslate_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + polished_diorite => BlockBehavior::default(), { + }, + polished_diorite_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + polished_diorite_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + polished_granite => BlockBehavior::default(), { + }, + polished_granite_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + polished_granite_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + poppy => BlockBehavior::default(), { + }, + potatoes => BlockBehavior::default(), { + Age=_0, + }, + potted_acacia_sapling => BlockBehavior::default(), { + }, + potted_allium => BlockBehavior::default(), { + }, + potted_azalea_bush => BlockBehavior::default(), { + }, + potted_azure_bluet => BlockBehavior::default(), { + }, + potted_bamboo => BlockBehavior::default(), { + }, + potted_birch_sapling => BlockBehavior::default(), { + }, + potted_blue_orchid => BlockBehavior::default(), { + }, + potted_brown_mushroom => BlockBehavior::default(), { + }, + potted_cactus => BlockBehavior::default(), { + }, + potted_cornflower => BlockBehavior::default(), { + }, + potted_crimson_fungus => BlockBehavior::default(), { + }, + potted_crimson_roots => BlockBehavior::default(), { + }, + potted_dandelion => BlockBehavior::default(), { + }, + potted_dark_oak_sapling => BlockBehavior::default(), { + }, + potted_dead_bush => BlockBehavior::default(), { + }, + potted_fern => BlockBehavior::default(), { + }, + potted_flowering_azalea_bush => BlockBehavior::default(), { + }, + potted_jungle_sapling => BlockBehavior::default(), { + }, + potted_lily_of_the_valley => BlockBehavior::default(), { + }, + potted_mangrove_propagule => BlockBehavior::default(), { + }, + potted_oak_sapling => BlockBehavior::default(), { + }, + potted_orange_tulip => BlockBehavior::default(), { + }, + potted_oxeye_daisy => BlockBehavior::default(), { + }, + potted_pink_tulip => BlockBehavior::default(), { + }, + potted_poppy => BlockBehavior::default(), { + }, + potted_red_mushroom => BlockBehavior::default(), { + }, + potted_red_tulip => BlockBehavior::default(), { + }, + potted_spruce_sapling => BlockBehavior::default(), { + }, + potted_warped_fungus => BlockBehavior::default(), { + }, + potted_warped_roots => BlockBehavior::default(), { + }, + potted_white_tulip => BlockBehavior::default(), { + }, + potted_wither_rose => BlockBehavior::default(), { + }, + powder_snow => BlockBehavior::default(), { + }, + powder_snow_cauldron => BlockBehavior::default(), { + Level=_1, + }, + powered_rail => BlockBehavior::default(), { + Powered=False, + Shape=NorthSouth, + Waterlogged=False, + }, + prismarine => BlockBehavior::default(), { + }, + prismarine_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + prismarine_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + prismarine_bricks => BlockBehavior::default(), { + }, + prismarine_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + prismarine_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + prismarine_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + pumpkin => BlockBehavior::default(), { + }, + pumpkin_stem => BlockBehavior::default(), { + Age=_0, + }, + purple_banner => BlockBehavior::default(), { + Rotation=_0, + }, + purple_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + purple_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + purple_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + purple_carpet => BlockBehavior::default(), { + }, + purple_concrete => BlockBehavior::default(), { + }, + purple_concrete_powder => BlockBehavior::default(), { + }, + purple_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + purple_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + purple_stained_glass => BlockBehavior::default(), { + }, + purple_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + purple_terracotta => BlockBehavior::default(), { + }, + purple_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + purple_wool => BlockBehavior::default(), { + }, + purpur_block => BlockBehavior::default(), { + }, + purpur_pillar => BlockBehavior::default(), { + Axis=Y, + }, + purpur_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + purpur_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + quartz_block => BlockBehavior::default(), { + }, + quartz_bricks => BlockBehavior::default(), { + }, + quartz_pillar => BlockBehavior::default(), { + Axis=Y, + }, + quartz_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + quartz_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + rail => BlockBehavior::default(), { + Shape=NorthSouth, + Waterlogged=False, + }, + raw_copper_block => BlockBehavior::default(), { + }, + raw_gold_block => BlockBehavior::default(), { + }, + raw_iron_block => BlockBehavior::default(), { + }, + red_banner => BlockBehavior::default(), { + Rotation=_0, + }, + red_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + red_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + red_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + red_carpet => BlockBehavior::default(), { + }, + red_concrete => BlockBehavior::default(), { + }, + red_concrete_powder => BlockBehavior::default(), { + }, + red_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + red_mushroom => BlockBehavior::default(), { + }, + red_mushroom_block => BlockBehavior::default(), { + Down=True, + East=True, + North=True, + South=True, + Up=True, + West=True, + }, + red_nether_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + red_nether_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + red_nether_brick_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + red_nether_bricks => BlockBehavior::default(), { + }, + red_sand => BlockBehavior::default(), { + }, + red_sandstone => BlockBehavior::default(), { + }, + red_sandstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + red_sandstone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + red_sandstone_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + red_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + red_stained_glass => BlockBehavior::default(), { + }, + red_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + red_terracotta => BlockBehavior::default(), { + }, + red_tulip => BlockBehavior::default(), { + }, + red_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + red_wool => BlockBehavior::default(), { + }, + redstone_block => BlockBehavior::default(), { + }, + redstone_lamp => BlockBehavior::default(), { + Lit=False, + }, + redstone_ore => BlockBehavior::default(), { + Lit=False, + }, + redstone_torch => BlockBehavior::default(), { + Lit=True, + }, + redstone_wall_torch => BlockBehavior::default(), { + Facing=North, + Lit=True, + }, + redstone_wire => BlockBehavior::default(), { + East=None, + North=None, + Power=_0, + South=None, + West=None, + }, + reinforced_deepslate => BlockBehavior::default(), { + }, + repeater => BlockBehavior::default(), { + Delay=_1, + Facing=North, + Locked=False, + Powered=False, + }, + repeating_command_block => BlockBehavior::default(), { + Conditional=False, + Facing=North, + }, + respawn_anchor => BlockBehavior::default(), { + Charges=_0, + }, + rooted_dirt => BlockBehavior::default(), { + }, + rose_bush => BlockBehavior::default(), { + Half=Lower, + }, + sand => BlockBehavior::default(), { + }, + sandstone => BlockBehavior::default(), { + }, + sandstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + sandstone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + sandstone_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + scaffolding => BlockBehavior::default(), { + Bottom=False, + Distance=_7, + Waterlogged=False, + }, + sculk => BlockBehavior::default(), { + }, + sculk_catalyst => BlockBehavior::default(), { + Bloom=False, + }, + sculk_sensor => BlockBehavior::default(), { + Power=_0, + SculkSensorPhase=Inactive, + Waterlogged=False, + }, + sculk_shrieker => BlockBehavior::default(), { + CanSummon=False, + Shrieking=False, + Waterlogged=False, + }, + sculk_vein => BlockBehavior::default(), { + Down=False, + East=False, + North=False, + South=False, + Up=False, + Waterlogged=False, + West=False, + }, + sea_lantern => BlockBehavior::default(), { + }, + sea_pickle => BlockBehavior::default(), { + Pickles=_1, + Waterlogged=True, + }, + seagrass => BlockBehavior::default(), { + }, + shroomlight => BlockBehavior::default(), { + }, + shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + skeleton_skull => BlockBehavior::default(), { + Rotation=_0, + }, + skeleton_wall_skull => BlockBehavior::default(), { + Facing=North, + }, + slime_block => BlockBehavior::default(), { + }, + small_amethyst_bud => BlockBehavior::default(), { + Facing=Up, + Waterlogged=False, + }, + small_dripleaf => BlockBehavior::default(), { + Facing=North, + Half=Lower, + Waterlogged=False, + }, + smithing_table => BlockBehavior::default(), { + }, + smoker => BlockBehavior::default(), { + Facing=North, + Lit=False, + }, + smooth_basalt => BlockBehavior::default(), { + }, + smooth_quartz => BlockBehavior::default(), { + }, + smooth_quartz_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + smooth_quartz_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + smooth_red_sandstone => BlockBehavior::default(), { + }, + smooth_red_sandstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + smooth_red_sandstone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + smooth_sandstone => BlockBehavior::default(), { + }, + smooth_sandstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + smooth_sandstone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + smooth_stone => BlockBehavior::default(), { + }, + smooth_stone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + snow => BlockBehavior::default(), { + Layers=_1, + }, + snow_block => BlockBehavior::default(), { + }, + soul_campfire => BlockBehavior::default(), { + Facing=North, + Lit=True, + SignalFire=False, + Waterlogged=False, + }, + soul_fire => BlockBehavior::default(), { + }, + soul_lantern => BlockBehavior::default(), { + Hanging=False, + Waterlogged=False, + }, + soul_sand => BlockBehavior::default(), { + }, + soul_soil => BlockBehavior::default(), { + }, + soul_torch => BlockBehavior::default(), { + }, + soul_wall_torch => BlockBehavior::default(), { + Facing=North, + }, + spawner => BlockBehavior::default(), { + }, + sponge => BlockBehavior::default(), { + }, + spore_blossom => BlockBehavior::default(), { + }, + spruce_button => BlockBehavior::default(), { + Face=Wall, + Facing=North, + Powered=False, + }, + spruce_door => BlockBehavior::default(), { + Facing=North, + Half=Lower, + Hinge=Left, + Open=False, + Powered=False, + }, + spruce_fence => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + spruce_fence_gate => BlockBehavior::default(), { + Facing=North, + InWall=False, + Open=False, + Powered=False, + }, + spruce_leaves => BlockBehavior::default(), { + Distance=_7, + Persistent=False, + Waterlogged=False, + }, + spruce_log => BlockBehavior::default(), { + Axis=Y, + }, + spruce_planks => BlockBehavior::default(), { + }, + spruce_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + spruce_sapling => BlockBehavior::default(), { + Stage=_0, + }, + spruce_sign => BlockBehavior::default(), { + Rotation=_0, + Waterlogged=False, + }, + spruce_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + spruce_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + spruce_trapdoor => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Open=False, + Powered=False, + Waterlogged=False, + }, + spruce_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + spruce_wood => BlockBehavior::default(), { + Axis=Y, + }, + sticky_piston => BlockBehavior::default(), { + Extended=False, + Facing=North, + }, + stone => BlockBehavior::default(), { + }, + stone_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + stone_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + stone_brick_wall => BlockBehavior::default(), { + East=None, + North=None, + South=None, + Up=True, + Waterlogged=False, + West=None, + }, + stone_bricks => BlockBehavior::default(), { + }, + stone_button => BlockBehavior::default(), { + Face=Wall, + Facing=North, + Powered=False, + }, + stone_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + stone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + stone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + stonecutter => BlockBehavior::default(), { + Facing=North, + }, + stripped_acacia_log => BlockBehavior::default(), { + Axis=Y, + }, + stripped_acacia_wood => BlockBehavior::default(), { + Axis=Y, + }, + stripped_birch_log => BlockBehavior::default(), { + Axis=Y, + }, + stripped_birch_wood => BlockBehavior::default(), { + Axis=Y, + }, + stripped_crimson_hyphae => BlockBehavior::default(), { + Axis=Y, + }, + stripped_crimson_stem => BlockBehavior::default(), { + Axis=Y, + }, + stripped_dark_oak_log => BlockBehavior::default(), { + Axis=Y, + }, + stripped_dark_oak_wood => BlockBehavior::default(), { + Axis=Y, + }, + stripped_jungle_log => BlockBehavior::default(), { + Axis=Y, + }, + stripped_jungle_wood => BlockBehavior::default(), { + Axis=Y, + }, + stripped_mangrove_log => BlockBehavior::default(), { + Axis=Y, + }, + stripped_mangrove_wood => BlockBehavior::default(), { + Axis=Y, + }, + stripped_oak_log => BlockBehavior::default(), { + Axis=Y, + }, + stripped_oak_wood => BlockBehavior::default(), { + Axis=Y, + }, + stripped_spruce_log => BlockBehavior::default(), { + Axis=Y, + }, + stripped_spruce_wood => BlockBehavior::default(), { + Axis=Y, + }, + stripped_warped_hyphae => BlockBehavior::default(), { + Axis=Y, + }, + stripped_warped_stem => BlockBehavior::default(), { + Axis=Y, + }, + structure_block => BlockBehavior::default(), { + Mode=Load, + }, + structure_void => BlockBehavior::default(), { + }, + sugar_cane => BlockBehavior::default(), { + Age=_0, + }, + sunflower => BlockBehavior::default(), { + Half=Lower, + }, + sweet_berry_bush => BlockBehavior::default(), { + Age=_0, + }, + tall_grass => BlockBehavior::default(), { + Half=Lower, + }, + tall_seagrass => BlockBehavior::default(), { + Half=Lower, + }, + target => BlockBehavior::default(), { + Power=_0, + }, + terracotta => BlockBehavior::default(), { + }, + tinted_glass => BlockBehavior::default(), { + }, + tnt => BlockBehavior::default(), { + Unstable=False, + }, + torch => BlockBehavior::default(), { + }, + trapped_chest => BlockBehavior::default(), { + Type=Single, + Facing=North, + Waterlogged=False, + }, + tripwire => BlockBehavior::default(), { + Attached=False, + Disarmed=False, + East=False, + North=False, + Powered=False, + South=False, + West=False, + }, + tripwire_hook => BlockBehavior::default(), { + Attached=False, + Facing=North, + Powered=False, + }, + tube_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + tube_coral_block => BlockBehavior::default(), { + }, + tube_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + tube_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + tuff => BlockBehavior::default(), { + }, + turtle_egg => BlockBehavior::default(), { + Eggs=_1, + Hatch=_0, + }, + twisting_vines => BlockBehavior::default(), { + Age=_0, + }, + twisting_vines_plant => BlockBehavior::default(), { + }, + verdant_froglight => BlockBehavior::default(), { + Axis=Y, + }, + vine => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Up=False, + West=False, + }, + void_air => BlockBehavior::default(), { + }, + wall_torch => BlockBehavior::default(), { + Facing=North, + }, + warped_button => BlockBehavior::default(), { + Face=Wall, + Facing=North, + Powered=False, + }, + warped_door => BlockBehavior::default(), { + Facing=North, + Half=Lower, + Hinge=Left, + Open=False, + Powered=False, + }, + warped_fence => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + warped_fence_gate => BlockBehavior::default(), { + Facing=North, + InWall=False, + Open=False, + Powered=False, + }, + warped_fungus => BlockBehavior::default(), { + }, + warped_hyphae => BlockBehavior::default(), { + Axis=Y, + }, + warped_nylium => BlockBehavior::default(), { + }, + warped_planks => BlockBehavior::default(), { + }, + warped_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + warped_roots => BlockBehavior::default(), { + }, + warped_sign => BlockBehavior::default(), { + Rotation=_0, + Waterlogged=False, + }, + warped_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + warped_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + warped_stem => BlockBehavior::default(), { + Axis=Y, + }, + warped_trapdoor => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Open=False, + Powered=False, + Waterlogged=False, + }, + warped_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + warped_wart_block => BlockBehavior::default(), { + }, + water => BlockBehavior::default(), { + Level=_0, + }, + water_cauldron => BlockBehavior::default(), { + Level=_1, + }, + waxed_copper_block => BlockBehavior::default(), { + }, + waxed_cut_copper => BlockBehavior::default(), { + }, + waxed_cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + waxed_cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + waxed_exposed_copper => BlockBehavior::default(), { + }, + waxed_exposed_cut_copper => BlockBehavior::default(), { + }, + waxed_exposed_cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + waxed_exposed_cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + waxed_oxidized_copper => BlockBehavior::default(), { + }, + waxed_oxidized_cut_copper => BlockBehavior::default(), { + }, + waxed_oxidized_cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + waxed_oxidized_cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + waxed_weathered_copper => BlockBehavior::default(), { + }, + waxed_weathered_cut_copper => BlockBehavior::default(), { + }, + waxed_weathered_cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + waxed_weathered_cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + weathered_copper => BlockBehavior::default(), { + }, + weathered_cut_copper => BlockBehavior::default(), { + }, + weathered_cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + weathered_cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + weeping_vines => BlockBehavior::default(), { + Age=_0, + }, + weeping_vines_plant => BlockBehavior::default(), { + }, + wet_sponge => BlockBehavior::default(), { + }, + wheat => BlockBehavior::default(), { + Age=_0, + }, + white_banner => BlockBehavior::default(), { + Rotation=_0, + }, + white_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + white_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + white_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + white_carpet => BlockBehavior::default(), { + }, + white_concrete => BlockBehavior::default(), { + }, + white_concrete_powder => BlockBehavior::default(), { + }, + white_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + white_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + white_stained_glass => BlockBehavior::default(), { + }, + white_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + white_terracotta => BlockBehavior::default(), { + }, + white_tulip => BlockBehavior::default(), { + }, + white_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + white_wool => BlockBehavior::default(), { + }, + wither_rose => BlockBehavior::default(), { + }, + wither_skeleton_skull => BlockBehavior::default(), { + Rotation=_0, + }, + wither_skeleton_wall_skull => BlockBehavior::default(), { + Facing=North, + }, + yellow_banner => BlockBehavior::default(), { + Rotation=_0, + }, + yellow_bed => BlockBehavior::default(), { + Facing=North, + Occupied=False, + Part=Foot, + }, + yellow_candle => BlockBehavior::default(), { + Candles=_1, + Lit=False, + Waterlogged=False, + }, + yellow_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + yellow_carpet => BlockBehavior::default(), { + }, + yellow_concrete => BlockBehavior::default(), { + }, + yellow_concrete_powder => BlockBehavior::default(), { + }, + yellow_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + yellow_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + yellow_stained_glass => BlockBehavior::default(), { + }, + yellow_stained_glass_pane => BlockBehavior::default(), { + East=False, + North=False, + South=False, + Waterlogged=False, + West=False, + }, + yellow_terracotta => BlockBehavior::default(), { + }, + yellow_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + yellow_wool => BlockBehavior::default(), { + }, + zombie_head => BlockBehavior::default(), { + Rotation=_0, + }, + zombie_wall_head => BlockBehavior::default(), { + Facing=North, }, } } @@ -163,4 +3808,4 @@ make_block_states! { // assert_eq!(block.id(), "acacia_button"); // } // } -// } +// } \ No newline at end of file From 4a3a2d2a3da1dab19f492a39f50ac0cd22ae6512 Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 9 Jun 2022 19:37:03 -0500 Subject: [PATCH 17/33] work on genblocks --- .vscode/settings.json | 2 +- codegen/genblocks.py | 14 +++++++++++++- codegen/lib/code/blocks.py | 32 ++++++++++++++++++++++++++++---- codegen/lib/extract.py | 10 +++++++--- 4 files changed, 49 insertions(+), 9 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 3b614348..b0d07499 100755 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "editor.formatOnSave": true + "editor.formatOnSave": false } \ No newline at end of file diff --git a/codegen/genblocks.py b/codegen/genblocks.py index 70004820..0863ec31 100644 --- a/codegen/genblocks.py +++ b/codegen/genblocks.py @@ -4,10 +4,22 @@ import lib.code.blocks import lib.code.utils import lib.download import lib.extract +import lib.utils import sys +import os version_id = lib.code.version.get_version_id() +lib.download.get_burger() +lib.download.get_client_jar(version_id) + +print('Generating data with burger') +os.system( + f'cd {lib.utils.get_dir_location("downloads/Burger")} && python munch.py ../client-{version_id}.jar --output ../burger-{version_id}.json --toppings blockstates' +) +print('Ok') + +mappings = lib.download.get_mappings_for_version(version_id) block_states_data = lib.extract.get_block_states(version_id) -lib.code.blocks.generate_blocks(block_states_data) +lib.code.blocks.generate_blocks(block_states_data, mappings) diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index ca178ff3..bc5083c7 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -1,11 +1,29 @@ -from lib.utils import to_camel_case from lib.utils import get_dir_location +from lib.utils import to_camel_case +from ..mappings import Mappings import json BLOCKS_RS_DIR = get_dir_location('../azalea-block/src/blocks.rs') +# Terminology: +# - Property: A property of a block, like "direction" +# - Variant: A potential state of a property, like "up" +# - State: A possible state of a block, a combination of variants +# - Block: Has properties and states. -def generate_blocks(blocks: dict): + +def get_property_variants(data) -> list[str]: + if 'values' in data: + return list(map(str.lower, data['values'])) + if data['type'] == 'bool': + return ['true', 'false'] + if data['type'] == 'int': + # range between data['min'] and data['max'] + return [str(i) for i in range(data['min'], data['max'] + 1)] + raise Exception('Unknown property type: ' + data['type']) + + +def generate_blocks(blocks: dict, mappings: Mappings): with open(BLOCKS_RS_DIR, 'r') as f: existing_code = f.read().splitlines() @@ -15,7 +33,14 @@ def generate_blocks(blocks: dict): # Find properties properties = {} for block_data in blocks.values(): - block_properties = block_data.get('properties', {}) + block_properties = {} + for property in block_data.get('states', []): + property_name = mappings.get_field( + property.get('declared_in', block_data['class']), property['field_name']).lower() + property_variants = get_property_variants(property) + block_properties[property_name] = property_variants + # if property_name == 'eggs': + # print(property, property_name, property_variants) properties.update(block_properties) # Property codegen @@ -35,7 +60,6 @@ def generate_blocks(blocks: dict): # Block codegen new_make_block_states_macro_code.append(' Blocks => {') for block_id, block_data in blocks.items(): - block_id = block_id.split(':')[1] block_states = block_data['states'] default_property_variants = {} diff --git a/codegen/lib/extract.py b/codegen/lib/extract.py index 2e46736e..bf116437 100644 --- a/codegen/lib/extract.py +++ b/codegen/lib/extract.py @@ -16,10 +16,14 @@ def generate_data_from_server_jar(version_id: str): ) +# the minecraft server jar doesn't give enough useful info so we use burger instead +# def get_block_states(version_id: str): +# generate_data_from_server_jar(version_id) +# with open(get_dir_location(f'downloads/generated-{version_id}/reports/blocks.json'), 'r') as f: +# return json.load(f) def get_block_states(version_id: str): - generate_data_from_server_jar(version_id) - with open(get_dir_location(f'downloads/generated-{version_id}/reports/blocks.json'), 'r') as f: - return json.load(f) + burger_data = get_burger_data_for_version(version_id) + return burger_data[0]['blocks']['block'] def get_burger_data_for_version(version_id: str): From ab0796119b39b785da8cff4c09904511de16bf72 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 10 Jun 2022 15:06:15 -0500 Subject: [PATCH 18/33] blocks works probably --- azalea-block/src/blocks.rs | 708 +++++++++++++++++++------------------ codegen/genblocks.py | 5 +- codegen/lib/code/blocks.py | 47 ++- codegen/lib/extract.py | 12 +- 4 files changed, 398 insertions(+), 374 deletions(-) diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index 8da49de0..938daf81 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -8,30 +8,34 @@ pub trait Block { make_block_states! { Properties => { - Face { - Floor, - Wall, - Ceiling, - }, Facing { North, + East, South, West, - East, }, Powered { True, False, }, + Face { + Floor, + Wall, + Ceiling, + }, Half { Top, Bottom, }, + Open { + True, + False, + }, Hinge { Left, Right, }, - Open { + North { True, False, }, @@ -39,7 +43,7 @@ make_block_states! { True, False, }, - North { + West { True, False, }, @@ -51,10 +55,6 @@ make_block_states! { True, False, }, - West { - True, - False, - }, InWall { True, False, @@ -115,6 +115,26 @@ make_block_states! { True, False, }, + NorthWall { + None, + Low, + Tall, + }, + EastWall { + None, + Low, + Tall, + }, + WestWall { + None, + Low, + Tall, + }, + SouthWall { + None, + Low, + Tall, + }, Age { _0, _1, @@ -150,14 +170,14 @@ make_block_states! { Partial, Full, }, - Occupied { - True, - False, - }, Part { Head, Foot, }, + Occupied { + True, + False, + }, Candles { _1, _2, @@ -168,15 +188,7 @@ make_block_states! { True, False, }, - HasBottle_0 { - True, - False, - }, - HasBottle_1 { - True, - False, - }, - HasBottle_2 { + HasBottle { True, False, }, @@ -184,7 +196,7 @@ make_block_states! { True, False, }, - Drag { + DragDown { True, False, }, @@ -201,10 +213,6 @@ make_block_states! { True, False, }, - Berries { - True, - False, - }, Conditional { True, False, @@ -220,10 +228,6 @@ make_block_states! { _2, _3, }, - Inverted { - True, - False, - }, Power { _0, _1, @@ -242,11 +246,15 @@ make_block_states! { _14, _15, }, + Inverted { + True, + False, + }, Triggered { True, False, }, - Eye { + HasEye { True, False, }, @@ -347,6 +355,10 @@ make_block_states! { True, False, }, + TipDirection { + Up, + Down, + }, Thickness { TipMerge, Tip, @@ -354,10 +366,6 @@ make_block_states! { Middle, Base, }, - VerticalDirection { - Up, - Down, - }, Delay { _1, _2, @@ -368,7 +376,7 @@ make_block_states! { True, False, }, - Charges { + Charge { _0, _1, _2, @@ -379,20 +387,20 @@ make_block_states! { True, False, }, - Bloom { + Pulse { True, False, }, - SculkSensorPhase { + Phase { Inactive, Active, Cooldown, }, - CanSummon { + Shrieking { True, False, }, - Shrieking { + CanSummon { True, False, }, @@ -412,6 +420,24 @@ make_block_states! { _7, _8, }, + OutputPower { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, Unstable { True, False, @@ -424,43 +450,43 @@ make_block_states! { True, False, }, + Hatch { + _0, + _1, + _2, + }, Eggs { _1, _2, _3, _4, }, - Hatch { - _0, - _1, - _2, - }, }, Blocks => { acacia_button => BlockBehavior::default(), { - Face=Wall, Facing=North, Powered=False, + Face=Wall, }, acacia_door => BlockBehavior::default(), { - Facing=North, Half=Lower, - Hinge=Left, + Facing=North, Open=False, + Hinge=Left, Powered=False, }, acacia_fence => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, acacia_fence_gate => BlockBehavior::default(), { Facing=North, - InWall=False, Open=False, Powered=False, + InWall=False, }, acacia_leaves => BlockBehavior::default(), { Distance=_7, @@ -494,8 +520,8 @@ make_block_states! { }, acacia_trapdoor => BlockBehavior::default(), { Facing=North, - Half=Bottom, Open=False, + Half=Bottom, Powered=False, Waterlogged=False, }, @@ -507,8 +533,8 @@ make_block_states! { Axis=Y, }, activator_rail => BlockBehavior::default(), { - Powered=False, Shape=NorthSouth, + Powered=False, Waterlogged=False, }, air => BlockBehavior::default(), { @@ -518,8 +544,8 @@ make_block_states! { amethyst_block => BlockBehavior::default(), { }, amethyst_cluster => BlockBehavior::default(), { - Facing=Up, Waterlogged=False, + Facing=Up, }, ancient_debris => BlockBehavior::default(), { }, @@ -536,12 +562,12 @@ make_block_states! { Waterlogged=False, }, andesite_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, anvil => BlockBehavior::default(), { Facing=North, @@ -582,54 +608,54 @@ make_block_states! { bedrock => BlockBehavior::default(), { }, bee_nest => BlockBehavior::default(), { - Facing=North, HoneyLevel=_0, + Facing=North, }, beehive => BlockBehavior::default(), { - Facing=North, HoneyLevel=_0, + Facing=North, }, beetroots => BlockBehavior::default(), { Age=_0, }, bell => BlockBehavior::default(), { - Attachment=Floor, Facing=North, + Attachment=Floor, Powered=False, }, big_dripleaf => BlockBehavior::default(), { + Waterlogged=False, Facing=North, Tilt=None, - Waterlogged=False, }, big_dripleaf_stem => BlockBehavior::default(), { - Facing=North, Waterlogged=False, + Facing=North, }, birch_button => BlockBehavior::default(), { - Face=Wall, Facing=North, Powered=False, + Face=Wall, }, birch_door => BlockBehavior::default(), { - Facing=North, Half=Lower, - Hinge=Left, + Facing=North, Open=False, + Hinge=Left, Powered=False, }, birch_fence => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, birch_fence_gate => BlockBehavior::default(), { Facing=North, - InWall=False, Open=False, Powered=False, + InWall=False, }, birch_leaves => BlockBehavior::default(), { Distance=_7, @@ -663,8 +689,8 @@ make_block_states! { }, birch_trapdoor => BlockBehavior::default(), { Facing=North, - Half=Bottom, Open=False, + Half=Bottom, Powered=False, Waterlogged=False, }, @@ -680,8 +706,8 @@ make_block_states! { }, black_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, black_candle => BlockBehavior::default(), { Candles=_1, @@ -706,11 +732,11 @@ make_block_states! { black_stained_glass => BlockBehavior::default(), { }, black_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, black_terracotta => BlockBehavior::default(), { }, @@ -732,12 +758,12 @@ make_block_states! { Waterlogged=False, }, blackstone_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, blast_furnace => BlockBehavior::default(), { Facing=North, @@ -748,8 +774,8 @@ make_block_states! { }, blue_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, blue_candle => BlockBehavior::default(), { Candles=_1, @@ -778,11 +804,11 @@ make_block_states! { blue_stained_glass => BlockBehavior::default(), { }, blue_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, blue_terracotta => BlockBehavior::default(), { }, @@ -809,9 +835,9 @@ make_block_states! { Waterlogged=True, }, brewing_stand => BlockBehavior::default(), { - HasBottle_0=False, - HasBottle_1=False, - HasBottle_2=False, + HasBottle=False, + HasBottle=False, + HasBottle=False, }, brick_slab => BlockBehavior::default(), { Type=Bottom, @@ -824,12 +850,12 @@ make_block_states! { Waterlogged=False, }, brick_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, bricks => BlockBehavior::default(), { }, @@ -838,8 +864,8 @@ make_block_states! { }, brown_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, brown_candle => BlockBehavior::default(), { Candles=_1, @@ -861,11 +887,11 @@ make_block_states! { brown_mushroom => BlockBehavior::default(), { }, brown_mushroom_block => BlockBehavior::default(), { - Down=True, - East=True, - North=True, - South=True, Up=True, + Down=True, + North=True, + East=True, + South=True, West=True, }, brown_shulker_box => BlockBehavior::default(), { @@ -874,11 +900,11 @@ make_block_states! { brown_stained_glass => BlockBehavior::default(), { }, brown_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, brown_terracotta => BlockBehavior::default(), { }, @@ -888,7 +914,7 @@ make_block_states! { brown_wool => BlockBehavior::default(), { }, bubble_column => BlockBehavior::default(), { - Drag=True, + DragDown=True, }, bubble_coral => BlockBehavior::default(), { Waterlogged=True, @@ -913,10 +939,10 @@ make_block_states! { calcite => BlockBehavior::default(), { }, campfire => BlockBehavior::default(), { - Facing=North, Lit=True, SignalFire=False, Waterlogged=False, + Facing=North, }, candle => BlockBehavior::default(), { Candles=_1, @@ -939,23 +965,20 @@ make_block_states! { cave_air => BlockBehavior::default(), { }, cave_vines => BlockBehavior::default(), { - Age=_0, - Berries=False, }, cave_vines_plant => BlockBehavior::default(), { - Berries=False, }, chain => BlockBehavior::default(), { - Axis=Y, Waterlogged=False, + Axis=Y, }, chain_command_block => BlockBehavior::default(), { - Conditional=False, Facing=North, + Conditional=False, }, chest => BlockBehavior::default(), { - Type=Single, Facing=North, + Type=Single, Waterlogged=False, }, chipped_anvil => BlockBehavior::default(), { @@ -979,12 +1002,12 @@ make_block_states! { Age=_0, }, chorus_plant => BlockBehavior::default(), { - Down=False, - East=False, North=False, + East=False, South=False, - Up=False, West=False, + Up=False, + Down=False, }, clay => BlockBehavior::default(), { }, @@ -1007,12 +1030,12 @@ make_block_states! { Waterlogged=False, }, cobbled_deepslate_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, cobblestone => BlockBehavior::default(), { }, @@ -1027,22 +1050,22 @@ make_block_states! { Waterlogged=False, }, cobblestone_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, cobweb => BlockBehavior::default(), { }, cocoa => BlockBehavior::default(), { - Age=_0, Facing=North, + Age=_0, }, command_block => BlockBehavior::default(), { - Conditional=False, Facing=North, + Conditional=False, }, comparator => BlockBehavior::default(), { Facing=North, @@ -1080,29 +1103,29 @@ make_block_states! { Facing=North, }, crimson_button => BlockBehavior::default(), { - Face=Wall, Facing=North, Powered=False, + Face=Wall, }, crimson_door => BlockBehavior::default(), { - Facing=North, Half=Lower, - Hinge=Left, + Facing=North, Open=False, + Hinge=Left, Powered=False, }, crimson_fence => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, crimson_fence_gate => BlockBehavior::default(), { Facing=North, - InWall=False, Open=False, Powered=False, + InWall=False, }, crimson_fungus => BlockBehavior::default(), { }, @@ -1137,8 +1160,8 @@ make_block_states! { }, crimson_trapdoor => BlockBehavior::default(), { Facing=North, - Half=Bottom, Open=False, + Half=Bottom, Powered=False, Waterlogged=False, }, @@ -1177,8 +1200,8 @@ make_block_states! { }, cyan_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, cyan_candle => BlockBehavior::default(), { Candles=_1, @@ -1203,11 +1226,11 @@ make_block_states! { cyan_stained_glass => BlockBehavior::default(), { }, cyan_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, cyan_terracotta => BlockBehavior::default(), { }, @@ -1222,29 +1245,29 @@ make_block_states! { dandelion => BlockBehavior::default(), { }, dark_oak_button => BlockBehavior::default(), { - Face=Wall, Facing=North, Powered=False, + Face=Wall, }, dark_oak_door => BlockBehavior::default(), { - Facing=North, Half=Lower, - Hinge=Left, + Facing=North, Open=False, + Hinge=Left, Powered=False, }, dark_oak_fence => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, dark_oak_fence_gate => BlockBehavior::default(), { Facing=North, - InWall=False, Open=False, Powered=False, + InWall=False, }, dark_oak_leaves => BlockBehavior::default(), { Distance=_7, @@ -1278,8 +1301,8 @@ make_block_states! { }, dark_oak_trapdoor => BlockBehavior::default(), { Facing=North, - Half=Bottom, Open=False, + Half=Bottom, Powered=False, Waterlogged=False, }, @@ -1303,8 +1326,8 @@ make_block_states! { Waterlogged=False, }, daylight_detector => BlockBehavior::default(), { - Inverted=False, Power=_0, + Inverted=False, }, dead_brain_coral => BlockBehavior::default(), { Waterlogged=True, @@ -1382,12 +1405,12 @@ make_block_states! { Waterlogged=False, }, deepslate_brick_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, deepslate_bricks => BlockBehavior::default(), { }, @@ -1419,18 +1442,18 @@ make_block_states! { Waterlogged=False, }, deepslate_tile_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, deepslate_tiles => BlockBehavior::default(), { }, detector_rail => BlockBehavior::default(), { - Powered=False, Shape=NorthSouth, + Powered=False, Waterlogged=False, }, diamond_block => BlockBehavior::default(), { @@ -1450,12 +1473,12 @@ make_block_states! { Waterlogged=False, }, diorite_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, dirt => BlockBehavior::default(), { }, @@ -1492,8 +1515,8 @@ make_block_states! { end_portal => BlockBehavior::default(), { }, end_portal_frame => BlockBehavior::default(), { - Eye=False, Facing=North, + HasEye=False, }, end_rod => BlockBehavior::default(), { Facing=Up, @@ -1511,12 +1534,12 @@ make_block_states! { Waterlogged=False, }, end_stone_brick_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, end_stone_bricks => BlockBehavior::default(), { }, @@ -1545,11 +1568,11 @@ make_block_states! { }, fire => BlockBehavior::default(), { Age=_0, - East=False, North=False, + East=False, South=False, - Up=False, West=False, + Up=False, }, fire_coral => BlockBehavior::default(), { Waterlogged=True, @@ -1588,20 +1611,13 @@ make_block_states! { glass => BlockBehavior::default(), { }, glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, glow_lichen => BlockBehavior::default(), { - Down=False, - East=False, - North=False, - South=False, - Up=False, - Waterlogged=False, - West=False, }, glowstone => BlockBehavior::default(), { }, @@ -1622,12 +1638,12 @@ make_block_states! { Waterlogged=False, }, granite_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, grass => BlockBehavior::default(), { }, @@ -1641,8 +1657,8 @@ make_block_states! { }, gray_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, gray_candle => BlockBehavior::default(), { Candles=_1, @@ -1667,11 +1683,11 @@ make_block_states! { gray_stained_glass => BlockBehavior::default(), { }, gray_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, gray_terracotta => BlockBehavior::default(), { }, @@ -1685,8 +1701,8 @@ make_block_states! { }, green_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, green_candle => BlockBehavior::default(), { Candles=_1, @@ -1711,11 +1727,11 @@ make_block_states! { green_stained_glass => BlockBehavior::default(), { }, green_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, green_terracotta => BlockBehavior::default(), { }, @@ -1725,8 +1741,8 @@ make_block_states! { green_wool => BlockBehavior::default(), { }, grindstone => BlockBehavior::default(), { - Face=Wall, Facing=North, + Face=Wall, }, hanging_roots => BlockBehavior::default(), { Waterlogged=False, @@ -1742,8 +1758,8 @@ make_block_states! { honeycomb_block => BlockBehavior::default(), { }, hopper => BlockBehavior::default(), { - Enabled=True, Facing=Down, + Enabled=True, }, horn_coral => BlockBehavior::default(), { Waterlogged=True, @@ -1766,7 +1782,6 @@ make_block_states! { infested_cracked_stone_bricks => BlockBehavior::default(), { }, infested_deepslate => BlockBehavior::default(), { - Axis=Y, }, infested_mossy_stone_bricks => BlockBehavior::default(), { }, @@ -1775,27 +1790,27 @@ make_block_states! { infested_stone_bricks => BlockBehavior::default(), { }, iron_bars => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, iron_block => BlockBehavior::default(), { }, iron_door => BlockBehavior::default(), { - Facing=North, Half=Lower, - Hinge=Left, + Facing=North, Open=False, + Hinge=Left, Powered=False, }, iron_ore => BlockBehavior::default(), { }, iron_trapdoor => BlockBehavior::default(), { Facing=North, - Half=Bottom, Open=False, + Half=Bottom, Powered=False, Waterlogged=False, }, @@ -1809,29 +1824,29 @@ make_block_states! { HasRecord=False, }, jungle_button => BlockBehavior::default(), { - Face=Wall, Facing=North, Powered=False, + Face=Wall, }, jungle_door => BlockBehavior::default(), { - Facing=North, Half=Lower, - Hinge=Left, + Facing=North, Open=False, + Hinge=Left, Powered=False, }, jungle_fence => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, jungle_fence_gate => BlockBehavior::default(), { Facing=North, - InWall=False, Open=False, Powered=False, + InWall=False, }, jungle_leaves => BlockBehavior::default(), { Distance=_7, @@ -1865,8 +1880,8 @@ make_block_states! { }, jungle_trapdoor => BlockBehavior::default(), { Facing=North, - Half=Bottom, Open=False, + Half=Bottom, Powered=False, Waterlogged=False, }, @@ -1895,8 +1910,8 @@ make_block_states! { lapis_ore => BlockBehavior::default(), { }, large_amethyst_bud => BlockBehavior::default(), { - Facing=Up, Waterlogged=False, + Facing=Up, }, large_fern => BlockBehavior::default(), { Half=Lower, @@ -1908,8 +1923,8 @@ make_block_states! { }, lectern => BlockBehavior::default(), { Facing=North, - HasBook=False, Powered=False, + HasBook=False, }, lever => BlockBehavior::default(), { Face=Wall, @@ -1925,8 +1940,8 @@ make_block_states! { }, light_blue_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, light_blue_candle => BlockBehavior::default(), { Candles=_1, @@ -1951,11 +1966,11 @@ make_block_states! { light_blue_stained_glass => BlockBehavior::default(), { }, light_blue_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, light_blue_terracotta => BlockBehavior::default(), { }, @@ -1969,8 +1984,8 @@ make_block_states! { }, light_gray_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, light_gray_candle => BlockBehavior::default(), { Candles=_1, @@ -1995,11 +2010,11 @@ make_block_states! { light_gray_stained_glass => BlockBehavior::default(), { }, light_gray_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, light_gray_terracotta => BlockBehavior::default(), { }, @@ -2028,8 +2043,8 @@ make_block_states! { }, lime_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, lime_candle => BlockBehavior::default(), { Candles=_1, @@ -2054,11 +2069,11 @@ make_block_states! { lime_stained_glass => BlockBehavior::default(), { }, lime_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, lime_terracotta => BlockBehavior::default(), { }, @@ -2077,8 +2092,8 @@ make_block_states! { }, magenta_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, magenta_candle => BlockBehavior::default(), { Candles=_1, @@ -2103,11 +2118,11 @@ make_block_states! { magenta_stained_glass => BlockBehavior::default(), { }, magenta_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, magenta_terracotta => BlockBehavior::default(), { }, @@ -2119,29 +2134,29 @@ make_block_states! { magma_block => BlockBehavior::default(), { }, mangrove_button => BlockBehavior::default(), { - Face=Wall, Facing=North, Powered=False, + Face=Wall, }, mangrove_door => BlockBehavior::default(), { - Facing=North, Half=Lower, - Hinge=Left, + Facing=North, Open=False, + Hinge=Left, Powered=False, }, mangrove_fence => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, mangrove_fence_gate => BlockBehavior::default(), { Facing=North, - InWall=False, Open=False, Powered=False, + InWall=False, }, mangrove_leaves => BlockBehavior::default(), { Distance=_7, @@ -2157,10 +2172,10 @@ make_block_states! { Powered=False, }, mangrove_propagule => BlockBehavior::default(), { - Age=_0, - Hanging=False, Stage=_0, + Age=_0, Waterlogged=False, + Hanging=False, }, mangrove_roots => BlockBehavior::default(), { Waterlogged=False, @@ -2181,8 +2196,8 @@ make_block_states! { }, mangrove_trapdoor => BlockBehavior::default(), { Facing=North, - Half=Bottom, Open=False, + Half=Bottom, Powered=False, Waterlogged=False, }, @@ -2194,8 +2209,8 @@ make_block_states! { Axis=Y, }, medium_amethyst_bud => BlockBehavior::default(), { - Facing=Up, Waterlogged=False, + Facing=Up, }, melon => BlockBehavior::default(), { }, @@ -2219,12 +2234,12 @@ make_block_states! { Waterlogged=False, }, mossy_cobblestone_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, mossy_stone_brick_slab => BlockBehavior::default(), { Type=Bottom, @@ -2237,18 +2252,18 @@ make_block_states! { Waterlogged=False, }, mossy_stone_brick_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, mossy_stone_bricks => BlockBehavior::default(), { }, moving_piston => BlockBehavior::default(), { - Type=Normal, Facing=North, + Type=Normal, }, mud => BlockBehavior::default(), { }, @@ -2263,12 +2278,12 @@ make_block_states! { Waterlogged=False, }, mud_brick_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, mud_bricks => BlockBehavior::default(), { }, @@ -2276,22 +2291,22 @@ make_block_states! { Axis=Y, }, mushroom_stem => BlockBehavior::default(), { - Down=True, - East=True, - North=True, - South=True, Up=True, + Down=True, + North=True, + East=True, + South=True, West=True, }, mycelium => BlockBehavior::default(), { Snowy=False, }, nether_brick_fence => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, nether_brick_slab => BlockBehavior::default(), { Type=Bottom, @@ -2304,12 +2319,12 @@ make_block_states! { Waterlogged=False, }, nether_brick_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, nether_bricks => BlockBehavior::default(), { }, @@ -2333,33 +2348,33 @@ make_block_states! { }, note_block => BlockBehavior::default(), { Instrument=Harp, - Note=_0, Powered=False, + Note=_0, }, oak_button => BlockBehavior::default(), { - Face=Wall, Facing=North, Powered=False, + Face=Wall, }, oak_door => BlockBehavior::default(), { - Facing=North, Half=Lower, - Hinge=Left, + Facing=North, Open=False, + Hinge=Left, Powered=False, }, oak_fence => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, oak_fence_gate => BlockBehavior::default(), { Facing=North, - InWall=False, Open=False, Powered=False, + InWall=False, }, oak_leaves => BlockBehavior::default(), { Distance=_7, @@ -2393,8 +2408,8 @@ make_block_states! { }, oak_trapdoor => BlockBehavior::default(), { Facing=North, - Half=Bottom, Open=False, + Half=Bottom, Powered=False, Waterlogged=False, }, @@ -2419,8 +2434,8 @@ make_block_states! { }, orange_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, orange_candle => BlockBehavior::default(), { Candles=_1, @@ -2445,11 +2460,11 @@ make_block_states! { orange_stained_glass => BlockBehavior::default(), { }, orange_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, orange_terracotta => BlockBehavior::default(), { }, @@ -2495,8 +2510,8 @@ make_block_states! { }, pink_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, pink_candle => BlockBehavior::default(), { Candles=_1, @@ -2521,11 +2536,11 @@ make_block_states! { pink_stained_glass => BlockBehavior::default(), { }, pink_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, pink_terracotta => BlockBehavior::default(), { }, @@ -2537,12 +2552,12 @@ make_block_states! { pink_wool => BlockBehavior::default(), { }, piston => BlockBehavior::default(), { - Extended=False, Facing=North, + Extended=False, }, piston_head => BlockBehavior::default(), { - Type=Normal, Facing=North, + Type=Normal, Short=False, }, player_head => BlockBehavior::default(), { @@ -2555,8 +2570,8 @@ make_block_states! { Snowy=False, }, pointed_dripstone => BlockBehavior::default(), { + TipDirection=Up, Thickness=Tip, - VerticalDirection=Up, Waterlogged=False, }, polished_andesite => BlockBehavior::default(), { @@ -2587,19 +2602,19 @@ make_block_states! { Waterlogged=False, }, polished_blackstone_brick_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, polished_blackstone_bricks => BlockBehavior::default(), { }, polished_blackstone_button => BlockBehavior::default(), { - Face=Wall, Facing=North, Powered=False, + Face=Wall, }, polished_blackstone_pressure_plate => BlockBehavior::default(), { Powered=False, @@ -2615,12 +2630,12 @@ make_block_states! { Waterlogged=False, }, polished_blackstone_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, polished_deepslate => BlockBehavior::default(), { }, @@ -2635,12 +2650,12 @@ make_block_states! { Waterlogged=False, }, polished_deepslate_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, polished_diorite => BlockBehavior::default(), { }, @@ -2741,8 +2756,8 @@ make_block_states! { Level=_1, }, powered_rail => BlockBehavior::default(), { - Powered=False, Shape=NorthSouth, + Powered=False, Waterlogged=False, }, prismarine => BlockBehavior::default(), { @@ -2770,12 +2785,12 @@ make_block_states! { Waterlogged=False, }, prismarine_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, pumpkin => BlockBehavior::default(), { }, @@ -2787,8 +2802,8 @@ make_block_states! { }, purple_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, purple_candle => BlockBehavior::default(), { Candles=_1, @@ -2813,11 +2828,11 @@ make_block_states! { purple_stained_glass => BlockBehavior::default(), { }, purple_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, purple_terracotta => BlockBehavior::default(), { }, @@ -2873,8 +2888,8 @@ make_block_states! { }, red_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, red_candle => BlockBehavior::default(), { Candles=_1, @@ -2896,11 +2911,11 @@ make_block_states! { red_mushroom => BlockBehavior::default(), { }, red_mushroom_block => BlockBehavior::default(), { - Down=True, - East=True, - North=True, - South=True, Up=True, + Down=True, + North=True, + East=True, + South=True, West=True, }, red_nether_brick_slab => BlockBehavior::default(), { @@ -2914,12 +2929,12 @@ make_block_states! { Waterlogged=False, }, red_nether_brick_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, red_nether_bricks => BlockBehavior::default(), { }, @@ -2938,12 +2953,12 @@ make_block_states! { Waterlogged=False, }, red_sandstone_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, red_shulker_box => BlockBehavior::default(), { Facing=Up, @@ -2951,11 +2966,11 @@ make_block_states! { red_stained_glass => BlockBehavior::default(), { }, red_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, red_terracotta => BlockBehavior::default(), { }, @@ -2982,26 +2997,26 @@ make_block_states! { Lit=True, }, redstone_wire => BlockBehavior::default(), { - East=None, North=None, - Power=_0, + East=None, South=None, West=None, + Power=_0, }, reinforced_deepslate => BlockBehavior::default(), { }, repeater => BlockBehavior::default(), { - Delay=_1, Facing=North, + Delay=_1, Locked=False, Powered=False, }, repeating_command_block => BlockBehavior::default(), { - Conditional=False, Facing=North, + Conditional=False, }, respawn_anchor => BlockBehavior::default(), { - Charges=_0, + Charge=_0, }, rooted_dirt => BlockBehavior::default(), { }, @@ -3023,41 +3038,34 @@ make_block_states! { Waterlogged=False, }, sandstone_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, scaffolding => BlockBehavior::default(), { - Bottom=False, Distance=_7, Waterlogged=False, + Bottom=False, }, sculk => BlockBehavior::default(), { }, sculk_catalyst => BlockBehavior::default(), { - Bloom=False, + Pulse=False, }, sculk_sensor => BlockBehavior::default(), { + Phase=Inactive, Power=_0, - SculkSensorPhase=Inactive, Waterlogged=False, }, sculk_shrieker => BlockBehavior::default(), { - CanSummon=False, Shrieking=False, Waterlogged=False, + CanSummon=False, }, sculk_vein => BlockBehavior::default(), { - Down=False, - East=False, - North=False, - South=False, - Up=False, - Waterlogged=False, - West=False, }, sea_lantern => BlockBehavior::default(), { }, @@ -3081,13 +3089,13 @@ make_block_states! { slime_block => BlockBehavior::default(), { }, small_amethyst_bud => BlockBehavior::default(), { - Facing=Up, Waterlogged=False, + Facing=Up, }, small_dripleaf => BlockBehavior::default(), { - Facing=North, Half=Lower, Waterlogged=False, + Facing=North, }, smithing_table => BlockBehavior::default(), { }, @@ -3145,10 +3153,10 @@ make_block_states! { snow_block => BlockBehavior::default(), { }, soul_campfire => BlockBehavior::default(), { - Facing=North, Lit=True, SignalFire=False, Waterlogged=False, + Facing=North, }, soul_fire => BlockBehavior::default(), { }, @@ -3172,29 +3180,29 @@ make_block_states! { spore_blossom => BlockBehavior::default(), { }, spruce_button => BlockBehavior::default(), { - Face=Wall, Facing=North, Powered=False, + Face=Wall, }, spruce_door => BlockBehavior::default(), { - Facing=North, Half=Lower, - Hinge=Left, + Facing=North, Open=False, + Hinge=Left, Powered=False, }, spruce_fence => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, spruce_fence_gate => BlockBehavior::default(), { Facing=North, - InWall=False, Open=False, Powered=False, + InWall=False, }, spruce_leaves => BlockBehavior::default(), { Distance=_7, @@ -3228,8 +3236,8 @@ make_block_states! { }, spruce_trapdoor => BlockBehavior::default(), { Facing=North, - Half=Bottom, Open=False, + Half=Bottom, Powered=False, Waterlogged=False, }, @@ -3241,8 +3249,8 @@ make_block_states! { Axis=Y, }, sticky_piston => BlockBehavior::default(), { - Extended=False, Facing=North, + Extended=False, }, stone => BlockBehavior::default(), { }, @@ -3257,19 +3265,19 @@ make_block_states! { Waterlogged=False, }, stone_brick_wall => BlockBehavior::default(), { - East=None, - North=None, - South=None, Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, Waterlogged=False, - West=None, }, stone_bricks => BlockBehavior::default(), { }, stone_button => BlockBehavior::default(), { - Face=Wall, Facing=North, Powered=False, + Face=Wall, }, stone_pressure_plate => BlockBehavior::default(), { Powered=False, @@ -3362,7 +3370,7 @@ make_block_states! { Half=Lower, }, target => BlockBehavior::default(), { - Power=_0, + OutputPower=_0, }, terracotta => BlockBehavior::default(), { }, @@ -3374,23 +3382,23 @@ make_block_states! { torch => BlockBehavior::default(), { }, trapped_chest => BlockBehavior::default(), { - Type=Single, Facing=North, + Type=Single, Waterlogged=False, }, tripwire => BlockBehavior::default(), { + Powered=False, Attached=False, Disarmed=False, - East=False, North=False, - Powered=False, - South=False, + East=False, West=False, + South=False, }, tripwire_hook => BlockBehavior::default(), { - Attached=False, Facing=North, Powered=False, + Attached=False, }, tube_coral => BlockBehavior::default(), { Waterlogged=True, @@ -3407,8 +3415,8 @@ make_block_states! { tuff => BlockBehavior::default(), { }, turtle_egg => BlockBehavior::default(), { - Eggs=_1, Hatch=_0, + Eggs=_1, }, twisting_vines => BlockBehavior::default(), { Age=_0, @@ -3419,10 +3427,10 @@ make_block_states! { Axis=Y, }, vine => BlockBehavior::default(), { - East=False, - North=False, - South=False, Up=False, + North=False, + East=False, + South=False, West=False, }, void_air => BlockBehavior::default(), { @@ -3431,29 +3439,29 @@ make_block_states! { Facing=North, }, warped_button => BlockBehavior::default(), { - Face=Wall, Facing=North, Powered=False, + Face=Wall, }, warped_door => BlockBehavior::default(), { - Facing=North, Half=Lower, - Hinge=Left, + Facing=North, Open=False, + Hinge=Left, Powered=False, }, warped_fence => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, warped_fence_gate => BlockBehavior::default(), { Facing=North, - InWall=False, Open=False, Powered=False, + InWall=False, }, warped_fungus => BlockBehavior::default(), { }, @@ -3488,8 +3496,8 @@ make_block_states! { }, warped_trapdoor => BlockBehavior::default(), { Facing=North, - Half=Bottom, Open=False, + Half=Bottom, Powered=False, Waterlogged=False, }, @@ -3590,8 +3598,8 @@ make_block_states! { }, white_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, white_candle => BlockBehavior::default(), { Candles=_1, @@ -3616,11 +3624,11 @@ make_block_states! { white_stained_glass => BlockBehavior::default(), { }, white_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, white_terracotta => BlockBehavior::default(), { }, @@ -3644,8 +3652,8 @@ make_block_states! { }, yellow_bed => BlockBehavior::default(), { Facing=North, - Occupied=False, Part=Foot, + Occupied=False, }, yellow_candle => BlockBehavior::default(), { Candles=_1, @@ -3670,11 +3678,11 @@ make_block_states! { yellow_stained_glass => BlockBehavior::default(), { }, yellow_stained_glass_pane => BlockBehavior::default(), { - East=False, North=False, + East=False, + West=False, South=False, Waterlogged=False, - West=False, }, yellow_terracotta => BlockBehavior::default(), { }, diff --git a/codegen/genblocks.py b/codegen/genblocks.py index 0863ec31..75516626 100644 --- a/codegen/genblocks.py +++ b/codegen/genblocks.py @@ -20,6 +20,7 @@ os.system( print('Ok') mappings = lib.download.get_mappings_for_version(version_id) -block_states_data = lib.extract.get_block_states(version_id) +block_states_burger = lib.extract.get_block_states_burger(version_id) +block_states_report = lib.extract.get_block_states_report(version_id) -lib.code.blocks.generate_blocks(block_states_data, mappings) +lib.code.blocks.generate_blocks(block_states_burger, block_states_report, mappings) diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index bc5083c7..eb1485ef 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -23,24 +23,32 @@ def get_property_variants(data) -> list[str]: raise Exception('Unknown property type: ' + data['type']) -def generate_blocks(blocks: dict, mappings: Mappings): +def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings): with open(BLOCKS_RS_DIR, 'r') as f: existing_code = f.read().splitlines() new_make_block_states_macro_code = [] new_make_block_states_macro_code.append('make_block_states! {') + def get_property_name(property: dict, block_data_burger: dict) -> str: + property_name = None + for class_name in [block_data_burger['class']] + block_data_burger['super']: + property_name = mappings.get_field(class_name, property['field_name']) + if property_name: + break + assert property_name + property_name = property_name.lower() + return property_name + # Find properties properties = {} - for block_data in blocks.values(): + for block_data_burger in blocks_burger.values(): block_properties = {} - for property in block_data.get('states', []): - property_name = mappings.get_field( - property.get('declared_in', block_data['class']), property['field_name']).lower() + for property in block_data_burger.get('states', []): + property_name = get_property_name(property, block_data_burger) + property_variants = get_property_variants(property) block_properties[property_name] = property_variants - # if property_name == 'eggs': - # print(property, property_name, property_variants) properties.update(block_properties) # Property codegen @@ -59,21 +67,28 @@ def generate_blocks(blocks: dict, mappings: Mappings): # Block codegen new_make_block_states_macro_code.append(' Blocks => {') - for block_id, block_data in blocks.items(): - block_states = block_data['states'] + for block_id, block_data_burger in blocks_burger.items(): + block_data_report = blocks_report['minecraft:' + block_id] - default_property_variants = {} - for state in block_states: - if state.get('default'): - default_property_variants = state.get('properties', {}) + block_properties_burger = block_data_burger['states'] + + default_property_variants: dict[str, str] = {} + for property in block_data_report['states']: + if property.get('default'): + default_property_variants = property.get('properties', {}) # TODO: use burger to generate the blockbehavior new_make_block_states_macro_code.append( f' {block_id} => BlockBehavior::default(), {{') - for property in block_data.get('properties', {}): - property_default = default_property_variants.get(property) + print('block data', block_data_burger) + for property in block_properties_burger: + property_default = default_property_variants.get(property['name']) + property_struct_name = get_property_name(property, block_data_burger) + assert property_default is not None new_make_block_states_macro_code.append( - f' {to_camel_case(property)}={to_camel_case(property_default)},') + f' {to_camel_case(property_struct_name)}={to_camel_case(property_default)},') + # new_make_block_states_macro_code.append( + # f' {to_camel_case(state)}=TODO,') new_make_block_states_macro_code.append(' },') new_make_block_states_macro_code.append(' }') new_make_block_states_macro_code.append('}') diff --git a/codegen/lib/extract.py b/codegen/lib/extract.py index bf116437..360c368c 100644 --- a/codegen/lib/extract.py +++ b/codegen/lib/extract.py @@ -16,12 +16,12 @@ def generate_data_from_server_jar(version_id: str): ) -# the minecraft server jar doesn't give enough useful info so we use burger instead -# def get_block_states(version_id: str): -# generate_data_from_server_jar(version_id) -# with open(get_dir_location(f'downloads/generated-{version_id}/reports/blocks.json'), 'r') as f: -# return json.load(f) -def get_block_states(version_id: str): +def get_block_states_report(version_id: str): + generate_data_from_server_jar(version_id) + with open(get_dir_location(f'downloads/generated-{version_id}/reports/blocks.json'), 'r') as f: + return json.load(f) + +def get_block_states_burger(version_id: str): burger_data = get_burger_data_for_version(version_id) return burger_data[0]['blocks']['block'] From 8c5d7407fe9a7f23e19b3ecf02c4cb7848fb4d29 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 10 Jun 2022 15:17:13 -0500 Subject: [PATCH 19/33] fix Facing property --- azalea-block/src/blocks.rs | 2 +- codegen/lib/code/blocks.py | 18 ++++-------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index 938daf81..ea58c062 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -10,9 +10,9 @@ make_block_states! { Properties => { Facing { North, - East, South, West, + East, }, Powered { True, diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index eb1485ef..0737270b 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -11,18 +11,6 @@ BLOCKS_RS_DIR = get_dir_location('../azalea-block/src/blocks.rs') # - State: A possible state of a block, a combination of variants # - Block: Has properties and states. - -def get_property_variants(data) -> list[str]: - if 'values' in data: - return list(map(str.lower, data['values'])) - if data['type'] == 'bool': - return ['true', 'false'] - if data['type'] == 'int': - # range between data['min'] and data['max'] - return [str(i) for i in range(data['min'], data['max'] + 1)] - raise Exception('Unknown property type: ' + data['type']) - - def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings): with open(BLOCKS_RS_DIR, 'r') as f: existing_code = f.read().splitlines() @@ -42,12 +30,14 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings # Find properties properties = {} - for block_data_burger in blocks_burger.values(): + for block_id, block_data_burger in blocks_burger.items(): + block_data_report = blocks_report[f'minecraft:{block_id}'] + block_properties = {} for property in block_data_burger.get('states', []): + property_variants = block_data_report['properties'][property['name']] property_name = get_property_name(property, block_data_burger) - property_variants = get_property_variants(property) block_properties[property_name] = property_variants properties.update(block_properties) From 6926907528135f7b6c891540b1aa2fdbe7696014 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 11 Jun 2022 09:36:08 -0500 Subject: [PATCH 20/33] Clean code a little --- azalea-block/src/blocks.rs | 78 +++++++++++++++++++------------------- codegen/lib/code/blocks.py | 22 +++++++---- 2 files changed, 54 insertions(+), 46 deletions(-) diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index ea58c062..71d04f99 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -8,6 +8,11 @@ pub trait Block { make_block_states! { Properties => { + Face { + Floor, + Wall, + Ceiling, + }, Facing { North, South, @@ -18,24 +23,15 @@ make_block_states! { True, False, }, - Face { - Floor, - Wall, - Ceiling, - }, Half { Top, Bottom, }, - Open { - True, - False, - }, Hinge { Left, Right, }, - North { + Open { True, False, }, @@ -43,7 +39,7 @@ make_block_states! { True, False, }, - West { + North { True, False, }, @@ -55,6 +51,10 @@ make_block_states! { True, False, }, + West { + True, + False, + }, InWall { True, False, @@ -111,30 +111,30 @@ make_block_states! { OuterLeft, OuterRight, }, - Up { - True, - False, + EastWall { + None, + Low, + Tall, }, NorthWall { None, Low, Tall, }, - EastWall { + SouthWall { None, Low, Tall, }, + Up { + True, + False, + }, WestWall { None, Low, Tall, }, - SouthWall { - None, - Low, - Tall, - }, Age { _0, _1, @@ -170,14 +170,14 @@ make_block_states! { Partial, Full, }, - Part { - Head, - Foot, - }, Occupied { True, False, }, + Part { + Head, + Foot, + }, Candles { _1, _2, @@ -228,6 +228,10 @@ make_block_states! { _2, _3, }, + Inverted { + True, + False, + }, Power { _0, _1, @@ -246,10 +250,6 @@ make_block_states! { _14, _15, }, - Inverted { - True, - False, - }, Triggered { True, False, @@ -355,10 +355,6 @@ make_block_states! { True, False, }, - TipDirection { - Up, - Down, - }, Thickness { TipMerge, Tip, @@ -366,6 +362,10 @@ make_block_states! { Middle, Base, }, + TipDirection { + Up, + Down, + }, Delay { _1, _2, @@ -396,11 +396,11 @@ make_block_states! { Active, Cooldown, }, - Shrieking { + CanSummon { True, False, }, - CanSummon { + Shrieking { True, False, }, @@ -450,17 +450,17 @@ make_block_states! { True, False, }, - Hatch { - _0, - _1, - _2, - }, Eggs { _1, _2, _3, _4, }, + Hatch { + _0, + _1, + _2, + }, }, Blocks => { acacia_button => BlockBehavior::default(), { diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index 0737270b..a5c9e2c6 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -18,7 +18,7 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings new_make_block_states_macro_code = [] new_make_block_states_macro_code.append('make_block_states! {') - def get_property_name(property: dict, block_data_burger: dict) -> str: + def get_property_struct_name(property: dict, block_data_burger: dict) -> str: property_name = None for class_name in [block_data_burger['class']] + block_data_burger['super']: property_name = mappings.get_field(class_name, property['field_name']) @@ -34,11 +34,20 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings block_data_report = blocks_report[f'minecraft:{block_id}'] block_properties = {} - for property in block_data_burger.get('states', []): - property_variants = block_data_report['properties'][property['name']] - property_name = get_property_name(property, block_data_burger) + for property_name in list(block_data_report.get('properties', {}).keys()): + property_burger = None + for property in block_data_burger['states']: + if property['name'] == property_name: + property_burger = property + break + if property_burger is None: + print('Error: The reports have states for a block, but Burger doesn\'t!', block_data_burger) + continue + # assert property_burger is not None + property_variants = block_data_report['properties'][property_name] + property_struct_name = get_property_struct_name(property_burger, block_data_burger) - block_properties[property_name] = property_variants + block_properties[property_struct_name] = property_variants properties.update(block_properties) # Property codegen @@ -70,10 +79,9 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings # TODO: use burger to generate the blockbehavior new_make_block_states_macro_code.append( f' {block_id} => BlockBehavior::default(), {{') - print('block data', block_data_burger) for property in block_properties_burger: property_default = default_property_variants.get(property['name']) - property_struct_name = get_property_name(property, block_data_burger) + property_struct_name = get_property_struct_name(property, block_data_burger) assert property_default is not None new_make_block_states_macro_code.append( f' {to_camel_case(property_struct_name)}={to_camel_case(property_default)},') From b852bdc48150c0c01f341f73dfb84084b50eda9c Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 11 Jun 2022 09:50:14 -0500 Subject: [PATCH 21/33] Separate int properties --- azalea-block/src/blocks.rs | 1376 ++++++++++++++++++++++++++++++++---- codegen/lib/code/blocks.py | 8 +- codegen/lib/utils.py | 4 +- 3 files changed, 1257 insertions(+), 131 deletions(-) diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index 71d04f99..faaafbb1 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -59,7 +59,7 @@ make_block_states! { True, False, }, - Distance { + AcaciaLeavesDistance { _1, _2, _3, @@ -77,11 +77,11 @@ make_block_states! { Y, Z, }, - Stage { + AcaciaSaplingStage { _0, _1, }, - Rotation { + AcaciaSignRotation { _0, _1, _2, @@ -135,8 +135,7 @@ make_block_states! { Low, Tall, }, - Age { - _0, + AzaleaLeavesDistance { _1, _2, _3, @@ -145,12 +144,20 @@ make_block_states! { _6, _7, }, + BambooAge { + _0, + _1, + }, Leaves { None, Small, Large, }, - HoneyLevel { + BambooStage { + _0, + _1, + }, + BeeNestHoneyLevel { _0, _1, _2, @@ -158,6 +165,20 @@ make_block_states! { _4, _5, }, + BeehiveHoneyLevel { + _0, + _1, + _2, + _3, + _4, + _5, + }, + BeetrootsAge { + _0, + _1, + _2, + _3, + }, Attachment { Floor, Ceiling, @@ -170,6 +191,55 @@ make_block_states! { Partial, Full, }, + BirchLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + BirchSaplingStage { + _0, + _1, + }, + BirchSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + BlackBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, Occupied { True, False, @@ -178,7 +248,7 @@ make_block_states! { Head, Foot, }, - Candles { + BlackCandleCandles { _1, _2, _3, @@ -188,10 +258,58 @@ make_block_states! { True, False, }, + BlueBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + BlueCandleCandles { + _1, + _2, + _3, + _4, + }, HasBottle { True, False, }, + BrownBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + BrownCandleCandles { + _1, + _2, + _3, + _4, + }, Down { True, False, @@ -200,7 +318,25 @@ make_block_states! { True, False, }, - Bites { + CactusAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + CakeBites { _0, _1, _2, @@ -213,26 +349,152 @@ make_block_states! { True, False, }, + CandleCandles { + _1, + _2, + _3, + _4, + }, + CarrotsAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, Conditional { True, False, }, + ChorusFlowerAge { + _0, + _1, + _2, + _3, + _4, + _5, + }, + CocoaAge { + _0, + _1, + _2, + }, Mode { Save, Load, Corner, Data, }, - Level { + ComposterLevel { + _0, _1, _2, _3, + _4, + _5, + _6, + _7, + _8, + }, + CreeperHeadRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + CrimsonSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + CyanBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + CyanCandleCandles { + _1, + _2, + _3, + _4, + }, + DarkOakLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + DarkOakSaplingStage { + _0, + _1, + }, + DarkOakSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, }, Inverted { True, False, }, - Power { + DaylightDetectorPower { _0, _1, _2, @@ -254,11 +516,29 @@ make_block_states! { True, False, }, + DragonHeadRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, HasEye { True, False, }, - Moisture { + FarmlandMoisture { _0, _1, _2, @@ -268,10 +548,109 @@ make_block_states! { _6, _7, }, + FireAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + FloweringAzaleaLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + FrostedIceAge { + _0, + _1, + _2, + _3, + }, Snowy { True, False, }, + GrayBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + GrayCandleCandles { + _1, + _2, + _3, + _4, + }, + GreenBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + GreenCandleCandles { + _1, + _2, + _3, + _4, + }, + HeavyWeightedPressurePlatePower { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, Enabled { True, False, @@ -294,14 +673,277 @@ make_block_states! { True, False, }, + JungleLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + JungleSaplingStage { + _0, + _1, + }, + JungleSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + KelpAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + _16, + _17, + _18, + _19, + _20, + _21, + _22, + _23, + _24, + _25, + }, Hanging { True, False, }, + LavaLevel { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, HasBook { True, False, }, + LightLevel { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + LightBlueBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + LightBlueCandleCandles { + _1, + _2, + _3, + _4, + }, + LightGrayBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + LightGrayCandleCandles { + _1, + _2, + _3, + _4, + }, + LightWeightedPressurePlatePower { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + LimeBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + LimeCandleCandles { + _1, + _2, + _3, + _4, + }, + MagentaBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + MagentaCandleCandles { + _1, + _2, + _3, + _4, + }, + MangroveLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + MangrovePropaguleAge { + _0, + _1, + _2, + _3, + _4, + }, + MangrovePropaguleStage { + _0, + _1, + }, + MangroveSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + MelonStemAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + NetherWartAge { + _0, + _1, + _2, + _3, + }, Instrument { Harp, Basedrum, @@ -320,7 +962,7 @@ make_block_states! { Banjo, Pling, }, - Note { + NoteBlockNote { _0, _1, _2, @@ -347,6 +989,85 @@ make_block_states! { _23, _24, }, + OakLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + OakSaplingStage { + _0, + _1, + }, + OakSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + OrangeBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + OrangeCandleCandles { + _1, + _2, + _3, + _4, + }, + PinkBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + PinkCandleCandles { + _1, + _2, + _3, + _4, + }, Extended { True, False, @@ -355,6 +1076,24 @@ make_block_states! { True, False, }, + PlayerHeadRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, Thickness { TipMerge, Tip, @@ -366,7 +1105,98 @@ make_block_states! { Up, Down, }, - Delay { + PotatoesAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + PowderSnowCauldronLevel { + _1, + _2, + _3, + }, + PumpkinStemAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + PurpleBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + PurpleCandleCandles { + _1, + _2, + _3, + _4, + }, + RedBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + RedCandleCandles { + _1, + _2, + _3, + _4, + }, + RedstoneWirePower { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + RepeaterDelay { _1, _2, _3, @@ -376,7 +1206,7 @@ make_block_states! { True, False, }, - Charge { + RespawnAnchorCharge { _0, _1, _2, @@ -387,10 +1217,38 @@ make_block_states! { True, False, }, + ScaffoldingDistance { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, Pulse { True, False, }, + SculkSensorPower { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, Phase { Inactive, Active, @@ -404,13 +1262,31 @@ make_block_states! { True, False, }, - Pickles { + SeaPicklePickles { _1, _2, _3, _4, }, - Layers { + SkeletonSkullRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + SnowLayers { _1, _2, _3, @@ -420,7 +1296,62 @@ make_block_states! { _7, _8, }, - OutputPower { + SpruceLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + SpruceSaplingStage { + _0, + _1, + }, + SpruceSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + SugarCaneAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + SweetBerryBushAge { + _0, + _1, + _2, + _3, + }, + TargetOutputPower { _0, _1, _2, @@ -450,17 +1381,208 @@ make_block_states! { True, False, }, - Eggs { + TurtleEggEggs { _1, _2, _3, _4, }, - Hatch { + TurtleEggHatch { _0, _1, _2, }, + TwistingVinesAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + _16, + _17, + _18, + _19, + _20, + _21, + _22, + _23, + _24, + _25, + }, + WarpedSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + WaterLevel { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + WaterCauldronLevel { + _1, + _2, + _3, + }, + WeepingVinesAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + _16, + _17, + _18, + _19, + _20, + _21, + _22, + _23, + _24, + _25, + }, + WheatAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + WhiteBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + WhiteCandleCandles { + _1, + _2, + _3, + _4, + }, + WitherSkeletonSkullRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + YellowBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + YellowCandleCandles { + _1, + _2, + _3, + _4, + }, + ZombieHeadRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, }, Blocks => { acacia_button => BlockBehavior::default(), { @@ -489,7 +1611,7 @@ make_block_states! { InWall=False, }, acacia_leaves => BlockBehavior::default(), { - Distance=_7, + AcaciaLeavesDistance=_7, Persistent=False, Waterlogged=False, }, @@ -502,10 +1624,10 @@ make_block_states! { Powered=False, }, acacia_sapling => BlockBehavior::default(), { - Stage=_0, + AcaciaSaplingStage=_0, }, acacia_sign => BlockBehavior::default(), { - Rotation=_0, + AcaciaSignRotation=_0, Waterlogged=False, }, acacia_slab => BlockBehavior::default(), { @@ -581,16 +1703,16 @@ make_block_states! { azalea => BlockBehavior::default(), { }, azalea_leaves => BlockBehavior::default(), { - Distance=_7, + AzaleaLeavesDistance=_7, Persistent=False, Waterlogged=False, }, azure_bluet => BlockBehavior::default(), { }, bamboo => BlockBehavior::default(), { - Age=_0, + BambooAge=_0, Leaves=None, - Stage=_0, + BambooStage=_0, }, bamboo_sapling => BlockBehavior::default(), { }, @@ -608,15 +1730,15 @@ make_block_states! { bedrock => BlockBehavior::default(), { }, bee_nest => BlockBehavior::default(), { - HoneyLevel=_0, + BeeNestHoneyLevel=_0, Facing=North, }, beehive => BlockBehavior::default(), { - HoneyLevel=_0, + BeehiveHoneyLevel=_0, Facing=North, }, beetroots => BlockBehavior::default(), { - Age=_0, + BeetrootsAge=_0, }, bell => BlockBehavior::default(), { Facing=North, @@ -658,7 +1780,7 @@ make_block_states! { InWall=False, }, birch_leaves => BlockBehavior::default(), { - Distance=_7, + BirchLeavesDistance=_7, Persistent=False, Waterlogged=False, }, @@ -671,10 +1793,10 @@ make_block_states! { Powered=False, }, birch_sapling => BlockBehavior::default(), { - Stage=_0, + BirchSaplingStage=_0, }, birch_sign => BlockBehavior::default(), { - Rotation=_0, + BirchSignRotation=_0, Waterlogged=False, }, birch_slab => BlockBehavior::default(), { @@ -702,7 +1824,7 @@ make_block_states! { Axis=Y, }, black_banner => BlockBehavior::default(), { - Rotation=_0, + BlackBannerRotation=_0, }, black_bed => BlockBehavior::default(), { Facing=North, @@ -710,7 +1832,7 @@ make_block_states! { Occupied=False, }, black_candle => BlockBehavior::default(), { - Candles=_1, + BlackCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -770,7 +1892,7 @@ make_block_states! { Lit=False, }, blue_banner => BlockBehavior::default(), { - Rotation=_0, + BlueBannerRotation=_0, }, blue_bed => BlockBehavior::default(), { Facing=North, @@ -778,7 +1900,7 @@ make_block_states! { Occupied=False, }, blue_candle => BlockBehavior::default(), { - Candles=_1, + BlueCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -860,7 +1982,7 @@ make_block_states! { bricks => BlockBehavior::default(), { }, brown_banner => BlockBehavior::default(), { - Rotation=_0, + BrownBannerRotation=_0, }, brown_bed => BlockBehavior::default(), { Facing=North, @@ -868,7 +1990,7 @@ make_block_states! { Occupied=False, }, brown_candle => BlockBehavior::default(), { - Candles=_1, + BrownCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -931,10 +2053,10 @@ make_block_states! { budding_amethyst => BlockBehavior::default(), { }, cactus => BlockBehavior::default(), { - Age=_0, + CactusAge=_0, }, cake => BlockBehavior::default(), { - Bites=_0, + CakeBites=_0, }, calcite => BlockBehavior::default(), { }, @@ -945,7 +2067,7 @@ make_block_states! { Facing=North, }, candle => BlockBehavior::default(), { - Candles=_1, + CandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -953,7 +2075,7 @@ make_block_states! { Lit=False, }, carrots => BlockBehavior::default(), { - Age=_0, + CarrotsAge=_0, }, cartography_table => BlockBehavior::default(), { }, @@ -999,7 +2121,7 @@ make_block_states! { chiseled_stone_bricks => BlockBehavior::default(), { }, chorus_flower => BlockBehavior::default(), { - Age=_0, + ChorusFlowerAge=_0, }, chorus_plant => BlockBehavior::default(), { North=False, @@ -1061,7 +2183,7 @@ make_block_states! { }, cocoa => BlockBehavior::default(), { Facing=North, - Age=_0, + CocoaAge=_0, }, command_block => BlockBehavior::default(), { Facing=North, @@ -1073,7 +2195,7 @@ make_block_states! { Powered=False, }, composter => BlockBehavior::default(), { - Level=_0, + ComposterLevel=_0, }, conduit => BlockBehavior::default(), { Waterlogged=True, @@ -1097,7 +2219,7 @@ make_block_states! { crafting_table => BlockBehavior::default(), { }, creeper_head => BlockBehavior::default(), { - Rotation=_0, + CreeperHeadRotation=_0, }, creeper_wall_head => BlockBehavior::default(), { Facing=North, @@ -1142,7 +2264,7 @@ make_block_states! { crimson_roots => BlockBehavior::default(), { }, crimson_sign => BlockBehavior::default(), { - Rotation=_0, + CrimsonSignRotation=_0, Waterlogged=False, }, crimson_slab => BlockBehavior::default(), { @@ -1196,7 +2318,7 @@ make_block_states! { Waterlogged=False, }, cyan_banner => BlockBehavior::default(), { - Rotation=_0, + CyanBannerRotation=_0, }, cyan_bed => BlockBehavior::default(), { Facing=North, @@ -1204,7 +2326,7 @@ make_block_states! { Occupied=False, }, cyan_candle => BlockBehavior::default(), { - Candles=_1, + CyanCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -1270,7 +2392,7 @@ make_block_states! { InWall=False, }, dark_oak_leaves => BlockBehavior::default(), { - Distance=_7, + DarkOakLeavesDistance=_7, Persistent=False, Waterlogged=False, }, @@ -1283,10 +2405,10 @@ make_block_states! { Powered=False, }, dark_oak_sapling => BlockBehavior::default(), { - Stage=_0, + DarkOakSaplingStage=_0, }, dark_oak_sign => BlockBehavior::default(), { - Rotation=_0, + DarkOakSignRotation=_0, Waterlogged=False, }, dark_oak_slab => BlockBehavior::default(), { @@ -1326,7 +2448,7 @@ make_block_states! { Waterlogged=False, }, daylight_detector => BlockBehavior::default(), { - Power=_0, + DaylightDetectorPower=_0, Inverted=False, }, dead_brain_coral => BlockBehavior::default(), { @@ -1491,7 +2613,7 @@ make_block_states! { dragon_egg => BlockBehavior::default(), { }, dragon_head => BlockBehavior::default(), { - Rotation=_0, + DragonHeadRotation=_0, }, dragon_wall_head => BlockBehavior::default(), { Facing=North, @@ -1562,12 +2684,12 @@ make_block_states! { Waterlogged=False, }, farmland => BlockBehavior::default(), { - Moisture=_0, + FarmlandMoisture=_0, }, fern => BlockBehavior::default(), { }, fire => BlockBehavior::default(), { - Age=_0, + FireAge=_0, North=False, East=False, South=False, @@ -1593,14 +2715,14 @@ make_block_states! { flowering_azalea => BlockBehavior::default(), { }, flowering_azalea_leaves => BlockBehavior::default(), { - Distance=_7, + FloweringAzaleaLeavesDistance=_7, Persistent=False, Waterlogged=False, }, frogspawn => BlockBehavior::default(), { }, frosted_ice => BlockBehavior::default(), { - Age=_0, + FrostedIceAge=_0, }, furnace => BlockBehavior::default(), { Facing=North, @@ -1653,7 +2775,7 @@ make_block_states! { gravel => BlockBehavior::default(), { }, gray_banner => BlockBehavior::default(), { - Rotation=_0, + GrayBannerRotation=_0, }, gray_bed => BlockBehavior::default(), { Facing=North, @@ -1661,7 +2783,7 @@ make_block_states! { Occupied=False, }, gray_candle => BlockBehavior::default(), { - Candles=_1, + GrayCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -1697,7 +2819,7 @@ make_block_states! { gray_wool => BlockBehavior::default(), { }, green_banner => BlockBehavior::default(), { - Rotation=_0, + GreenBannerRotation=_0, }, green_bed => BlockBehavior::default(), { Facing=North, @@ -1705,7 +2827,7 @@ make_block_states! { Occupied=False, }, green_candle => BlockBehavior::default(), { - Candles=_1, + GreenCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -1751,7 +2873,7 @@ make_block_states! { Axis=Y, }, heavy_weighted_pressure_plate => BlockBehavior::default(), { - Power=_0, + HeavyWeightedPressurePlatePower=_0, }, honey_block => BlockBehavior::default(), { }, @@ -1849,7 +2971,7 @@ make_block_states! { InWall=False, }, jungle_leaves => BlockBehavior::default(), { - Distance=_7, + JungleLeavesDistance=_7, Persistent=False, Waterlogged=False, }, @@ -1862,10 +2984,10 @@ make_block_states! { Powered=False, }, jungle_sapling => BlockBehavior::default(), { - Stage=_0, + JungleSaplingStage=_0, }, jungle_sign => BlockBehavior::default(), { - Rotation=_0, + JungleSignRotation=_0, Waterlogged=False, }, jungle_slab => BlockBehavior::default(), { @@ -1893,7 +3015,7 @@ make_block_states! { Axis=Y, }, kelp => BlockBehavior::default(), { - Age=_0, + KelpAge=_0, }, kelp_plant => BlockBehavior::default(), { }, @@ -1917,7 +3039,7 @@ make_block_states! { Half=Lower, }, lava => BlockBehavior::default(), { - Level=_0, + LavaLevel=_0, }, lava_cauldron => BlockBehavior::default(), { }, @@ -1932,11 +3054,11 @@ make_block_states! { Powered=False, }, light => BlockBehavior::default(), { - Level=_15, + LightLevel=_15, Waterlogged=False, }, light_blue_banner => BlockBehavior::default(), { - Rotation=_0, + LightBlueBannerRotation=_0, }, light_blue_bed => BlockBehavior::default(), { Facing=North, @@ -1944,7 +3066,7 @@ make_block_states! { Occupied=False, }, light_blue_candle => BlockBehavior::default(), { - Candles=_1, + LightBlueCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -1980,7 +3102,7 @@ make_block_states! { light_blue_wool => BlockBehavior::default(), { }, light_gray_banner => BlockBehavior::default(), { - Rotation=_0, + LightGrayBannerRotation=_0, }, light_gray_bed => BlockBehavior::default(), { Facing=North, @@ -1988,7 +3110,7 @@ make_block_states! { Occupied=False, }, light_gray_candle => BlockBehavior::default(), { - Candles=_1, + LightGrayCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -2024,7 +3146,7 @@ make_block_states! { light_gray_wool => BlockBehavior::default(), { }, light_weighted_pressure_plate => BlockBehavior::default(), { - Power=_0, + LightWeightedPressurePlatePower=_0, }, lightning_rod => BlockBehavior::default(), { Facing=Up, @@ -2039,7 +3161,7 @@ make_block_states! { lily_pad => BlockBehavior::default(), { }, lime_banner => BlockBehavior::default(), { - Rotation=_0, + LimeBannerRotation=_0, }, lime_bed => BlockBehavior::default(), { Facing=North, @@ -2047,7 +3169,7 @@ make_block_states! { Occupied=False, }, lime_candle => BlockBehavior::default(), { - Candles=_1, + LimeCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -2088,7 +3210,7 @@ make_block_states! { Facing=North, }, magenta_banner => BlockBehavior::default(), { - Rotation=_0, + MagentaBannerRotation=_0, }, magenta_bed => BlockBehavior::default(), { Facing=North, @@ -2096,7 +3218,7 @@ make_block_states! { Occupied=False, }, magenta_candle => BlockBehavior::default(), { - Candles=_1, + MagentaCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -2159,7 +3281,7 @@ make_block_states! { InWall=False, }, mangrove_leaves => BlockBehavior::default(), { - Distance=_7, + MangroveLeavesDistance=_7, Persistent=False, Waterlogged=False, }, @@ -2172,8 +3294,8 @@ make_block_states! { Powered=False, }, mangrove_propagule => BlockBehavior::default(), { - Stage=_0, - Age=_0, + MangrovePropaguleStage=_0, + MangrovePropaguleAge=_0, Waterlogged=False, Hanging=False, }, @@ -2181,7 +3303,7 @@ make_block_states! { Waterlogged=False, }, mangrove_sign => BlockBehavior::default(), { - Rotation=_0, + MangroveSignRotation=_0, Waterlogged=False, }, mangrove_slab => BlockBehavior::default(), { @@ -2215,7 +3337,7 @@ make_block_states! { melon => BlockBehavior::default(), { }, melon_stem => BlockBehavior::default(), { - Age=_0, + MelonStemAge=_0, }, moss_block => BlockBehavior::default(), { }, @@ -2338,7 +3460,7 @@ make_block_states! { nether_sprouts => BlockBehavior::default(), { }, nether_wart => BlockBehavior::default(), { - Age=_0, + NetherWartAge=_0, }, nether_wart_block => BlockBehavior::default(), { }, @@ -2349,7 +3471,7 @@ make_block_states! { note_block => BlockBehavior::default(), { Instrument=Harp, Powered=False, - Note=_0, + NoteBlockNote=_0, }, oak_button => BlockBehavior::default(), { Facing=North, @@ -2377,7 +3499,7 @@ make_block_states! { InWall=False, }, oak_leaves => BlockBehavior::default(), { - Distance=_7, + OakLeavesDistance=_7, Persistent=False, Waterlogged=False, }, @@ -2390,10 +3512,10 @@ make_block_states! { Powered=False, }, oak_sapling => BlockBehavior::default(), { - Stage=_0, + OakSaplingStage=_0, }, oak_sign => BlockBehavior::default(), { - Rotation=_0, + OakSignRotation=_0, Waterlogged=False, }, oak_slab => BlockBehavior::default(), { @@ -2430,7 +3552,7 @@ make_block_states! { Axis=Y, }, orange_banner => BlockBehavior::default(), { - Rotation=_0, + OrangeBannerRotation=_0, }, orange_bed => BlockBehavior::default(), { Facing=North, @@ -2438,7 +3560,7 @@ make_block_states! { Occupied=False, }, orange_candle => BlockBehavior::default(), { - Candles=_1, + OrangeCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -2506,7 +3628,7 @@ make_block_states! { Waterlogged=False, }, pink_banner => BlockBehavior::default(), { - Rotation=_0, + PinkBannerRotation=_0, }, pink_bed => BlockBehavior::default(), { Facing=North, @@ -2514,7 +3636,7 @@ make_block_states! { Occupied=False, }, pink_candle => BlockBehavior::default(), { - Candles=_1, + PinkCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -2561,7 +3683,7 @@ make_block_states! { Short=False, }, player_head => BlockBehavior::default(), { - Rotation=_0, + PlayerHeadRotation=_0, }, player_wall_head => BlockBehavior::default(), { Facing=North, @@ -2684,7 +3806,7 @@ make_block_states! { poppy => BlockBehavior::default(), { }, potatoes => BlockBehavior::default(), { - Age=_0, + PotatoesAge=_0, }, potted_acacia_sapling => BlockBehavior::default(), { }, @@ -2753,7 +3875,7 @@ make_block_states! { powder_snow => BlockBehavior::default(), { }, powder_snow_cauldron => BlockBehavior::default(), { - Level=_1, + PowderSnowCauldronLevel=_1, }, powered_rail => BlockBehavior::default(), { Shape=NorthSouth, @@ -2795,10 +3917,10 @@ make_block_states! { pumpkin => BlockBehavior::default(), { }, pumpkin_stem => BlockBehavior::default(), { - Age=_0, + PumpkinStemAge=_0, }, purple_banner => BlockBehavior::default(), { - Rotation=_0, + PurpleBannerRotation=_0, }, purple_bed => BlockBehavior::default(), { Facing=North, @@ -2806,7 +3928,7 @@ make_block_states! { Occupied=False, }, purple_candle => BlockBehavior::default(), { - Candles=_1, + PurpleCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -2884,7 +4006,7 @@ make_block_states! { raw_iron_block => BlockBehavior::default(), { }, red_banner => BlockBehavior::default(), { - Rotation=_0, + RedBannerRotation=_0, }, red_bed => BlockBehavior::default(), { Facing=North, @@ -2892,7 +4014,7 @@ make_block_states! { Occupied=False, }, red_candle => BlockBehavior::default(), { - Candles=_1, + RedCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -3001,13 +4123,13 @@ make_block_states! { East=None, South=None, West=None, - Power=_0, + RedstoneWirePower=_0, }, reinforced_deepslate => BlockBehavior::default(), { }, repeater => BlockBehavior::default(), { Facing=North, - Delay=_1, + RepeaterDelay=_1, Locked=False, Powered=False, }, @@ -3016,7 +4138,7 @@ make_block_states! { Conditional=False, }, respawn_anchor => BlockBehavior::default(), { - Charge=_0, + RespawnAnchorCharge=_0, }, rooted_dirt => BlockBehavior::default(), { }, @@ -3046,7 +4168,7 @@ make_block_states! { Waterlogged=False, }, scaffolding => BlockBehavior::default(), { - Distance=_7, + ScaffoldingDistance=_7, Waterlogged=False, Bottom=False, }, @@ -3057,7 +4179,7 @@ make_block_states! { }, sculk_sensor => BlockBehavior::default(), { Phase=Inactive, - Power=_0, + SculkSensorPower=_0, Waterlogged=False, }, sculk_shrieker => BlockBehavior::default(), { @@ -3070,7 +4192,7 @@ make_block_states! { sea_lantern => BlockBehavior::default(), { }, sea_pickle => BlockBehavior::default(), { - Pickles=_1, + SeaPicklePickles=_1, Waterlogged=True, }, seagrass => BlockBehavior::default(), { @@ -3081,7 +4203,7 @@ make_block_states! { Facing=Up, }, skeleton_skull => BlockBehavior::default(), { - Rotation=_0, + SkeletonSkullRotation=_0, }, skeleton_wall_skull => BlockBehavior::default(), { Facing=North, @@ -3148,7 +4270,7 @@ make_block_states! { Waterlogged=False, }, snow => BlockBehavior::default(), { - Layers=_1, + SnowLayers=_1, }, snow_block => BlockBehavior::default(), { }, @@ -3205,7 +4327,7 @@ make_block_states! { InWall=False, }, spruce_leaves => BlockBehavior::default(), { - Distance=_7, + SpruceLeavesDistance=_7, Persistent=False, Waterlogged=False, }, @@ -3218,10 +4340,10 @@ make_block_states! { Powered=False, }, spruce_sapling => BlockBehavior::default(), { - Stage=_0, + SpruceSaplingStage=_0, }, spruce_sign => BlockBehavior::default(), { - Rotation=_0, + SpruceSignRotation=_0, Waterlogged=False, }, spruce_slab => BlockBehavior::default(), { @@ -3355,13 +4477,13 @@ make_block_states! { structure_void => BlockBehavior::default(), { }, sugar_cane => BlockBehavior::default(), { - Age=_0, + SugarCaneAge=_0, }, sunflower => BlockBehavior::default(), { Half=Lower, }, sweet_berry_bush => BlockBehavior::default(), { - Age=_0, + SweetBerryBushAge=_0, }, tall_grass => BlockBehavior::default(), { Half=Lower, @@ -3370,7 +4492,7 @@ make_block_states! { Half=Lower, }, target => BlockBehavior::default(), { - OutputPower=_0, + TargetOutputPower=_0, }, terracotta => BlockBehavior::default(), { }, @@ -3415,11 +4537,11 @@ make_block_states! { tuff => BlockBehavior::default(), { }, turtle_egg => BlockBehavior::default(), { - Hatch=_0, - Eggs=_1, + TurtleEggHatch=_0, + TurtleEggEggs=_1, }, twisting_vines => BlockBehavior::default(), { - Age=_0, + TwistingVinesAge=_0, }, twisting_vines_plant => BlockBehavior::default(), { }, @@ -3478,7 +4600,7 @@ make_block_states! { warped_roots => BlockBehavior::default(), { }, warped_sign => BlockBehavior::default(), { - Rotation=_0, + WarpedSignRotation=_0, Waterlogged=False, }, warped_slab => BlockBehavior::default(), { @@ -3508,10 +4630,10 @@ make_block_states! { warped_wart_block => BlockBehavior::default(), { }, water => BlockBehavior::default(), { - Level=_0, + WaterLevel=_0, }, water_cauldron => BlockBehavior::default(), { - Level=_1, + WaterCauldronLevel=_1, }, waxed_copper_block => BlockBehavior::default(), { }, @@ -3584,17 +4706,17 @@ make_block_states! { Waterlogged=False, }, weeping_vines => BlockBehavior::default(), { - Age=_0, + WeepingVinesAge=_0, }, weeping_vines_plant => BlockBehavior::default(), { }, wet_sponge => BlockBehavior::default(), { }, wheat => BlockBehavior::default(), { - Age=_0, + WheatAge=_0, }, white_banner => BlockBehavior::default(), { - Rotation=_0, + WhiteBannerRotation=_0, }, white_bed => BlockBehavior::default(), { Facing=North, @@ -3602,7 +4724,7 @@ make_block_states! { Occupied=False, }, white_candle => BlockBehavior::default(), { - Candles=_1, + WhiteCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -3642,13 +4764,13 @@ make_block_states! { wither_rose => BlockBehavior::default(), { }, wither_skeleton_skull => BlockBehavior::default(), { - Rotation=_0, + WitherSkeletonSkullRotation=_0, }, wither_skeleton_wall_skull => BlockBehavior::default(), { Facing=North, }, yellow_banner => BlockBehavior::default(), { - Rotation=_0, + YellowBannerRotation=_0, }, yellow_bed => BlockBehavior::default(), { Facing=North, @@ -3656,7 +4778,7 @@ make_block_states! { Occupied=False, }, yellow_candle => BlockBehavior::default(), { - Candles=_1, + YellowCandleCandles=_1, Lit=False, Waterlogged=False, }, @@ -3692,7 +4814,7 @@ make_block_states! { yellow_wool => BlockBehavior::default(), { }, zombie_head => BlockBehavior::default(), { - Rotation=_0, + ZombieHeadRotation=_0, }, zombie_wall_head => BlockBehavior::default(), { Facing=North, diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index a5c9e2c6..d2fe6da2 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -1,7 +1,7 @@ +from lib.utils import upper_first_letter from lib.utils import get_dir_location from lib.utils import to_camel_case from ..mappings import Mappings -import json BLOCKS_RS_DIR = get_dir_location('../azalea-block/src/blocks.rs') @@ -25,7 +25,9 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings if property_name: break assert property_name - property_name = property_name.lower() + property_name = to_camel_case(property_name.lower()) + if property['type'] == 'int': + property_name = to_camel_case(block_data_burger['text_id']) + property_name return property_name # Find properties @@ -84,7 +86,7 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings property_struct_name = get_property_struct_name(property, block_data_burger) assert property_default is not None new_make_block_states_macro_code.append( - f' {to_camel_case(property_struct_name)}={to_camel_case(property_default)},') + f' {property_struct_name}={to_camel_case(property_default)},') # new_make_block_states_macro_code.append( # f' {to_camel_case(state)}=TODO,') new_make_block_states_macro_code.append(' },') diff --git a/codegen/lib/utils.py b/codegen/lib/utils.py index fb43af21..3887bb35 100644 --- a/codegen/lib/utils.py +++ b/codegen/lib/utils.py @@ -11,13 +11,15 @@ def to_snake_case(name: str): def to_camel_case(name: str): s = re.sub('_([a-z])', lambda m: m.group(1).upper(), name) - s = s[0].upper() + s[1:] + s = upper_first_letter(s) # if the first character is a number, we need to add an underscore # maybe we could convert it to the number name (like 2 would become "two")? if s[0].isdigit(): s = f'_{s}' return s +def upper_first_letter(name: str): + return name[0].upper() + name[1:] def padded_hex(n: int): return f'0x{n:02x}' From e79e58da3649803c58803329fc88ad5c7f6c3e9f Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 11 Jun 2022 15:29:42 -0500 Subject: [PATCH 22/33] Include property names in blocks --- azalea-block/src/blocks.rs | 328 ++++++++++++++++++------------------- codegen/lib/code/blocks.py | 32 +++- 2 files changed, 188 insertions(+), 172 deletions(-) diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index faaafbb1..dd297bcb 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -8,58 +8,58 @@ pub trait Block { make_block_states! { Properties => { - Face { + face => Face { Floor, Wall, Ceiling, }, - Facing { + facing => Facing { North, South, West, East, }, - Powered { + powered => Powered { True, False, }, - Half { + half => Half { Top, Bottom, }, - Hinge { + hinge => Hinge { Left, Right, }, - Open { + open => Open { True, False, }, - East { + east => East { True, False, }, - North { + north => North { True, False, }, - South { + south => South { True, False, }, - Waterlogged { + waterlogged => Waterlogged { True, False, }, - West { + west => West { True, False, }, - InWall { + in_wall => InWall { True, False, }, - AcaciaLeavesDistance { + distance => AcaciaLeavesDistance { _1, _2, _3, @@ -68,20 +68,20 @@ make_block_states! { _6, _7, }, - Persistent { + persistent => Persistent { True, False, }, - Axis { + axis => Axis { X, Y, Z, }, - AcaciaSaplingStage { + stage => AcaciaSaplingStage { _0, _1, }, - AcaciaSignRotation { + rotation => AcaciaSignRotation { _0, _1, _2, @@ -99,43 +99,43 @@ make_block_states! { _14, _15, }, - Type { + type => Type { Top, Bottom, Double, }, - Shape { + shape => Shape { Straight, InnerLeft, InnerRight, OuterLeft, OuterRight, }, - EastWall { + east => EastWall { None, Low, Tall, }, - NorthWall { + north => NorthWall { None, Low, Tall, }, - SouthWall { + south => SouthWall { None, Low, Tall, }, - Up { + up => Up { True, False, }, - WestWall { + west => WestWall { None, Low, Tall, }, - AzaleaLeavesDistance { + distance => AzaleaLeavesDistance { _1, _2, _3, @@ -144,20 +144,20 @@ make_block_states! { _6, _7, }, - BambooAge { + age => BambooAge { _0, _1, }, - Leaves { + leaves => Leaves { None, Small, Large, }, - BambooStage { + stage => BambooStage { _0, _1, }, - BeeNestHoneyLevel { + honey_level => BeeNestHoneyLevel { _0, _1, _2, @@ -165,7 +165,7 @@ make_block_states! { _4, _5, }, - BeehiveHoneyLevel { + honey_level => BeehiveHoneyLevel { _0, _1, _2, @@ -173,25 +173,25 @@ make_block_states! { _4, _5, }, - BeetrootsAge { + age => BeetrootsAge { _0, _1, _2, _3, }, - Attachment { + attachment => Attachment { Floor, Ceiling, SingleWall, DoubleWall, }, - Tilt { + tilt => Tilt { None, Unstable, Partial, Full, }, - BirchLeavesDistance { + distance => BirchLeavesDistance { _1, _2, _3, @@ -200,11 +200,11 @@ make_block_states! { _6, _7, }, - BirchSaplingStage { + stage => BirchSaplingStage { _0, _1, }, - BirchSignRotation { + rotation => BirchSignRotation { _0, _1, _2, @@ -222,7 +222,7 @@ make_block_states! { _14, _15, }, - BlackBannerRotation { + rotation => BlackBannerRotation { _0, _1, _2, @@ -240,25 +240,25 @@ make_block_states! { _14, _15, }, - Occupied { + occupied => Occupied { True, False, }, - Part { + part => Part { Head, Foot, }, - BlackCandleCandles { + candles => BlackCandleCandles { _1, _2, _3, _4, }, - Lit { + lit => Lit { True, False, }, - BlueBannerRotation { + rotation => BlueBannerRotation { _0, _1, _2, @@ -276,17 +276,17 @@ make_block_states! { _14, _15, }, - BlueCandleCandles { + candles => BlueCandleCandles { _1, _2, _3, _4, }, - HasBottle { + has_bottle => HasBottle { True, False, }, - BrownBannerRotation { + rotation => BrownBannerRotation { _0, _1, _2, @@ -304,21 +304,21 @@ make_block_states! { _14, _15, }, - BrownCandleCandles { + candles => BrownCandleCandles { _1, _2, _3, _4, }, - Down { + down => Down { True, False, }, - DragDown { + drag => DragDown { True, False, }, - CactusAge { + age => CactusAge { _0, _1, _2, @@ -336,7 +336,7 @@ make_block_states! { _14, _15, }, - CakeBites { + bites => CakeBites { _0, _1, _2, @@ -345,17 +345,17 @@ make_block_states! { _5, _6, }, - SignalFire { + signal_fire => SignalFire { True, False, }, - CandleCandles { + candles => CandleCandles { _1, _2, _3, _4, }, - CarrotsAge { + age => CarrotsAge { _0, _1, _2, @@ -365,11 +365,11 @@ make_block_states! { _6, _7, }, - Conditional { + conditional => Conditional { True, False, }, - ChorusFlowerAge { + age => ChorusFlowerAge { _0, _1, _2, @@ -377,18 +377,18 @@ make_block_states! { _4, _5, }, - CocoaAge { + age => CocoaAge { _0, _1, _2, }, - Mode { + mode => Mode { Save, Load, Corner, Data, }, - ComposterLevel { + level => ComposterLevel { _0, _1, _2, @@ -399,7 +399,7 @@ make_block_states! { _7, _8, }, - CreeperHeadRotation { + rotation => CreeperHeadRotation { _0, _1, _2, @@ -417,7 +417,7 @@ make_block_states! { _14, _15, }, - CrimsonSignRotation { + rotation => CrimsonSignRotation { _0, _1, _2, @@ -435,7 +435,7 @@ make_block_states! { _14, _15, }, - CyanBannerRotation { + rotation => CyanBannerRotation { _0, _1, _2, @@ -453,13 +453,13 @@ make_block_states! { _14, _15, }, - CyanCandleCandles { + candles => CyanCandleCandles { _1, _2, _3, _4, }, - DarkOakLeavesDistance { + distance => DarkOakLeavesDistance { _1, _2, _3, @@ -468,11 +468,11 @@ make_block_states! { _6, _7, }, - DarkOakSaplingStage { + stage => DarkOakSaplingStage { _0, _1, }, - DarkOakSignRotation { + rotation => DarkOakSignRotation { _0, _1, _2, @@ -490,11 +490,11 @@ make_block_states! { _14, _15, }, - Inverted { + inverted => Inverted { True, False, }, - DaylightDetectorPower { + power => DaylightDetectorPower { _0, _1, _2, @@ -512,11 +512,11 @@ make_block_states! { _14, _15, }, - Triggered { + triggered => Triggered { True, False, }, - DragonHeadRotation { + rotation => DragonHeadRotation { _0, _1, _2, @@ -534,11 +534,11 @@ make_block_states! { _14, _15, }, - HasEye { + eye => HasEye { True, False, }, - FarmlandMoisture { + moisture => FarmlandMoisture { _0, _1, _2, @@ -548,7 +548,7 @@ make_block_states! { _6, _7, }, - FireAge { + age => FireAge { _0, _1, _2, @@ -566,7 +566,7 @@ make_block_states! { _14, _15, }, - FloweringAzaleaLeavesDistance { + distance => FloweringAzaleaLeavesDistance { _1, _2, _3, @@ -575,17 +575,17 @@ make_block_states! { _6, _7, }, - FrostedIceAge { + age => FrostedIceAge { _0, _1, _2, _3, }, - Snowy { + snowy => Snowy { True, False, }, - GrayBannerRotation { + rotation => GrayBannerRotation { _0, _1, _2, @@ -603,13 +603,13 @@ make_block_states! { _14, _15, }, - GrayCandleCandles { + candles => GrayCandleCandles { _1, _2, _3, _4, }, - GreenBannerRotation { + rotation => GreenBannerRotation { _0, _1, _2, @@ -627,13 +627,13 @@ make_block_states! { _14, _15, }, - GreenCandleCandles { + candles => GreenCandleCandles { _1, _2, _3, _4, }, - HeavyWeightedPressurePlatePower { + power => HeavyWeightedPressurePlatePower { _0, _1, _2, @@ -651,11 +651,11 @@ make_block_states! { _14, _15, }, - Enabled { + enabled => Enabled { True, False, }, - Orientation { + orientation => Orientation { DownEast, DownNorth, DownSouth, @@ -669,11 +669,11 @@ make_block_states! { NorthUp, SouthUp, }, - HasRecord { + has_record => HasRecord { True, False, }, - JungleLeavesDistance { + distance => JungleLeavesDistance { _1, _2, _3, @@ -682,11 +682,11 @@ make_block_states! { _6, _7, }, - JungleSaplingStage { + stage => JungleSaplingStage { _0, _1, }, - JungleSignRotation { + rotation => JungleSignRotation { _0, _1, _2, @@ -704,7 +704,7 @@ make_block_states! { _14, _15, }, - KelpAge { + age => KelpAge { _0, _1, _2, @@ -732,11 +732,11 @@ make_block_states! { _24, _25, }, - Hanging { + hanging => Hanging { True, False, }, - LavaLevel { + level => LavaLevel { _0, _1, _2, @@ -754,11 +754,11 @@ make_block_states! { _14, _15, }, - HasBook { + has_book => HasBook { True, False, }, - LightLevel { + level => LightLevel { _0, _1, _2, @@ -776,7 +776,7 @@ make_block_states! { _14, _15, }, - LightBlueBannerRotation { + rotation => LightBlueBannerRotation { _0, _1, _2, @@ -794,13 +794,13 @@ make_block_states! { _14, _15, }, - LightBlueCandleCandles { + candles => LightBlueCandleCandles { _1, _2, _3, _4, }, - LightGrayBannerRotation { + rotation => LightGrayBannerRotation { _0, _1, _2, @@ -818,13 +818,13 @@ make_block_states! { _14, _15, }, - LightGrayCandleCandles { + candles => LightGrayCandleCandles { _1, _2, _3, _4, }, - LightWeightedPressurePlatePower { + power => LightWeightedPressurePlatePower { _0, _1, _2, @@ -842,7 +842,7 @@ make_block_states! { _14, _15, }, - LimeBannerRotation { + rotation => LimeBannerRotation { _0, _1, _2, @@ -860,13 +860,13 @@ make_block_states! { _14, _15, }, - LimeCandleCandles { + candles => LimeCandleCandles { _1, _2, _3, _4, }, - MagentaBannerRotation { + rotation => MagentaBannerRotation { _0, _1, _2, @@ -884,13 +884,13 @@ make_block_states! { _14, _15, }, - MagentaCandleCandles { + candles => MagentaCandleCandles { _1, _2, _3, _4, }, - MangroveLeavesDistance { + distance => MangroveLeavesDistance { _1, _2, _3, @@ -899,18 +899,18 @@ make_block_states! { _6, _7, }, - MangrovePropaguleAge { + age => MangrovePropaguleAge { _0, _1, _2, _3, _4, }, - MangrovePropaguleStage { + stage => MangrovePropaguleStage { _0, _1, }, - MangroveSignRotation { + rotation => MangroveSignRotation { _0, _1, _2, @@ -928,7 +928,7 @@ make_block_states! { _14, _15, }, - MelonStemAge { + age => MelonStemAge { _0, _1, _2, @@ -938,13 +938,13 @@ make_block_states! { _6, _7, }, - NetherWartAge { + age => NetherWartAge { _0, _1, _2, _3, }, - Instrument { + instrument => Instrument { Harp, Basedrum, Snare, @@ -962,7 +962,7 @@ make_block_states! { Banjo, Pling, }, - NoteBlockNote { + note => NoteBlockNote { _0, _1, _2, @@ -989,7 +989,7 @@ make_block_states! { _23, _24, }, - OakLeavesDistance { + distance => OakLeavesDistance { _1, _2, _3, @@ -998,11 +998,11 @@ make_block_states! { _6, _7, }, - OakSaplingStage { + stage => OakSaplingStage { _0, _1, }, - OakSignRotation { + rotation => OakSignRotation { _0, _1, _2, @@ -1020,7 +1020,7 @@ make_block_states! { _14, _15, }, - OrangeBannerRotation { + rotation => OrangeBannerRotation { _0, _1, _2, @@ -1038,13 +1038,13 @@ make_block_states! { _14, _15, }, - OrangeCandleCandles { + candles => OrangeCandleCandles { _1, _2, _3, _4, }, - PinkBannerRotation { + rotation => PinkBannerRotation { _0, _1, _2, @@ -1062,21 +1062,21 @@ make_block_states! { _14, _15, }, - PinkCandleCandles { + candles => PinkCandleCandles { _1, _2, _3, _4, }, - Extended { + extended => Extended { True, False, }, - Short { + short => Short { True, False, }, - PlayerHeadRotation { + rotation => PlayerHeadRotation { _0, _1, _2, @@ -1094,18 +1094,18 @@ make_block_states! { _14, _15, }, - Thickness { + thickness => Thickness { TipMerge, Tip, Frustum, Middle, Base, }, - TipDirection { + vertical_direction => TipDirection { Up, Down, }, - PotatoesAge { + age => PotatoesAge { _0, _1, _2, @@ -1115,12 +1115,12 @@ make_block_states! { _6, _7, }, - PowderSnowCauldronLevel { + level => PowderSnowCauldronLevel { _1, _2, _3, }, - PumpkinStemAge { + age => PumpkinStemAge { _0, _1, _2, @@ -1130,7 +1130,7 @@ make_block_states! { _6, _7, }, - PurpleBannerRotation { + rotation => PurpleBannerRotation { _0, _1, _2, @@ -1148,13 +1148,13 @@ make_block_states! { _14, _15, }, - PurpleCandleCandles { + candles => PurpleCandleCandles { _1, _2, _3, _4, }, - RedBannerRotation { + rotation => RedBannerRotation { _0, _1, _2, @@ -1172,13 +1172,13 @@ make_block_states! { _14, _15, }, - RedCandleCandles { + candles => RedCandleCandles { _1, _2, _3, _4, }, - RedstoneWirePower { + power => RedstoneWirePower { _0, _1, _2, @@ -1196,28 +1196,28 @@ make_block_states! { _14, _15, }, - RepeaterDelay { + delay => RepeaterDelay { _1, _2, _3, _4, }, - Locked { + locked => Locked { True, False, }, - RespawnAnchorCharge { + charges => RespawnAnchorCharge { _0, _1, _2, _3, _4, }, - Bottom { + bottom => Bottom { True, False, }, - ScaffoldingDistance { + distance => ScaffoldingDistance { _0, _1, _2, @@ -1227,11 +1227,11 @@ make_block_states! { _6, _7, }, - Pulse { + bloom => Pulse { True, False, }, - SculkSensorPower { + power => SculkSensorPower { _0, _1, _2, @@ -1249,26 +1249,26 @@ make_block_states! { _14, _15, }, - Phase { + sculk_sensor_phase => Phase { Inactive, Active, Cooldown, }, - CanSummon { + can_summon => CanSummon { True, False, }, - Shrieking { + shrieking => Shrieking { True, False, }, - SeaPicklePickles { + pickles => SeaPicklePickles { _1, _2, _3, _4, }, - SkeletonSkullRotation { + rotation => SkeletonSkullRotation { _0, _1, _2, @@ -1286,7 +1286,7 @@ make_block_states! { _14, _15, }, - SnowLayers { + layers => SnowLayers { _1, _2, _3, @@ -1296,7 +1296,7 @@ make_block_states! { _7, _8, }, - SpruceLeavesDistance { + distance => SpruceLeavesDistance { _1, _2, _3, @@ -1305,11 +1305,11 @@ make_block_states! { _6, _7, }, - SpruceSaplingStage { + stage => SpruceSaplingStage { _0, _1, }, - SpruceSignRotation { + rotation => SpruceSignRotation { _0, _1, _2, @@ -1327,7 +1327,7 @@ make_block_states! { _14, _15, }, - SugarCaneAge { + age => SugarCaneAge { _0, _1, _2, @@ -1345,13 +1345,13 @@ make_block_states! { _14, _15, }, - SweetBerryBushAge { + age => SweetBerryBushAge { _0, _1, _2, _3, }, - TargetOutputPower { + power => TargetOutputPower { _0, _1, _2, @@ -1369,30 +1369,30 @@ make_block_states! { _14, _15, }, - Unstable { + unstable => Unstable { True, False, }, - Attached { + attached => Attached { True, False, }, - Disarmed { + disarmed => Disarmed { True, False, }, - TurtleEggEggs { + eggs => TurtleEggEggs { _1, _2, _3, _4, }, - TurtleEggHatch { + hatch => TurtleEggHatch { _0, _1, _2, }, - TwistingVinesAge { + age => TwistingVinesAge { _0, _1, _2, @@ -1420,7 +1420,7 @@ make_block_states! { _24, _25, }, - WarpedSignRotation { + rotation => WarpedSignRotation { _0, _1, _2, @@ -1438,7 +1438,7 @@ make_block_states! { _14, _15, }, - WaterLevel { + level => WaterLevel { _0, _1, _2, @@ -1456,12 +1456,12 @@ make_block_states! { _14, _15, }, - WaterCauldronLevel { + level => WaterCauldronLevel { _1, _2, _3, }, - WeepingVinesAge { + age => WeepingVinesAge { _0, _1, _2, @@ -1489,7 +1489,7 @@ make_block_states! { _24, _25, }, - WheatAge { + age => WheatAge { _0, _1, _2, @@ -1499,7 +1499,7 @@ make_block_states! { _6, _7, }, - WhiteBannerRotation { + rotation => WhiteBannerRotation { _0, _1, _2, @@ -1517,13 +1517,13 @@ make_block_states! { _14, _15, }, - WhiteCandleCandles { + candles => WhiteCandleCandles { _1, _2, _3, _4, }, - WitherSkeletonSkullRotation { + rotation => WitherSkeletonSkullRotation { _0, _1, _2, @@ -1541,7 +1541,7 @@ make_block_states! { _14, _15, }, - YellowBannerRotation { + rotation => YellowBannerRotation { _0, _1, _2, @@ -1559,13 +1559,13 @@ make_block_states! { _14, _15, }, - YellowCandleCandles { + candles => YellowCandleCandles { _1, _2, _3, _4, }, - ZombieHeadRotation { + rotation => ZombieHeadRotation { _0, _1, _2, diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index d2fe6da2..09f4a85f 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -1,7 +1,6 @@ -from lib.utils import upper_first_letter -from lib.utils import get_dir_location -from lib.utils import to_camel_case +from lib.utils import to_snake_case, upper_first_letter, get_dir_location, to_camel_case from ..mappings import Mappings +import re BLOCKS_RS_DIR = get_dir_location('../azalea-block/src/blocks.rs') @@ -32,31 +31,48 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings # Find properties properties = {} + + # This dict looks like { 'FloweringAzaleaLeavesDistance': 'distance' } + property_struct_names_to_names = {} for block_id, block_data_burger in blocks_burger.items(): block_data_report = blocks_report[f'minecraft:{block_id}'] block_properties = {} - for property_name in list(block_data_report.get('properties', {}).keys()): + for property_struct_name in list(block_data_report.get('properties', {}).keys()): property_burger = None for property in block_data_burger['states']: - if property['name'] == property_name: + if property['name'] == property_struct_name: property_burger = property break if property_burger is None: print('Error: The reports have states for a block, but Burger doesn\'t!', block_data_burger) continue # assert property_burger is not None - property_variants = block_data_report['properties'][property_name] + property_variants = block_data_report['properties'][property_struct_name] property_struct_name = get_property_struct_name(property_burger, block_data_burger) block_properties[property_struct_name] = property_variants + + property_name = property_burger['name'] + # if the name ends with _, remove that part + ending = property_name.split('_')[-1] + if ending.isdigit(): + property_name = property_name[:-(len(ending) + 1)] + property_struct_names_to_names[property_struct_name] = property_name + properties.update(block_properties) # Property codegen new_make_block_states_macro_code.append(' Properties => {') - for property_name, property_variants in properties.items(): + for property_struct_name, property_variants in properties.items(): + # face => Face { + # Floor, + # Wall, + # Ceiling, + # }, + property_name = property_struct_names_to_names[property_struct_name] new_make_block_states_macro_code.append( - f' {to_camel_case(property_name)} {{') + f' {property_name} => {property_struct_name} {{') for variant in property_variants: new_make_block_states_macro_code.append( From e36095c2b1800e20bf0c47c6e7939071752759d6 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 11 Jun 2022 17:18:57 -0500 Subject: [PATCH 23/33] Fix all the errors --- .vscode/settings.json | 2 +- Cargo.lock | 40 +- azalea-block/block-macros/src/lib.rs | 153 +- azalea-block/src/blocks.rs | 4913 +------------------------- codegen/lib/code/blocks.py | 4 +- 5 files changed, 136 insertions(+), 4976 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index b0d07499..3b614348 100755 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "editor.formatOnSave": false + "editor.formatOnSave": true } \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index e86d73ed..1ef95311 100755 --- a/Cargo.lock +++ b/Cargo.lock @@ -45,9 +45,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" +checksum = "96cf8829f67d2eab0b2dfa42c5d0ef737e0724e4a82b01b3e292456202b19716" dependencies = [ "proc-macro2", "quote", @@ -236,9 +236,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.9.1" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" +checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" [[package]] name = "byteorder" @@ -474,13 +474,11 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39522e96686d38f4bc984b9198e3a0613264abaebaff2c5c918bfa6b6da09af" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ - "cfg-if", "crc32fast", - "libc", "miniz_oxide", ] @@ -745,9 +743,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082" +checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" dependencies = [ "adler", ] @@ -1120,9 +1118,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "semver" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cb243bdfdb5936c8dc3c45762a19d12ab4550cdc753bc247637d4ec35a040fd" +checksum = "a41d061efea015927ac527063765e73601444cdc344ba855bc7bd44578b25e1c" [[package]] name = "serde" @@ -1223,9 +1221,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.95" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942" +checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" dependencies = [ "proc-macro2", "quote", @@ -1288,9 +1286,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.18.2" +version = "1.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4903bf0427cf68dddd5aa6a93220756f8be0c34fcfa9f5e6191e103e15a31395" +checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439" dependencies = [ "bytes", "libc", @@ -1306,9 +1304,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" +checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" dependencies = [ "proc-macro2", "quote", @@ -1392,12 +1390,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" -[[package]] -name = "unicode-ident" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" - [[package]] name = "unicode-normalization" version = "0.1.19" diff --git a/azalea-block/block-macros/src/lib.rs b/azalea-block/block-macros/src/lib.rs index b5a7909f..d38062d4 100644 --- a/azalea-block/block-macros/src/lib.rs +++ b/azalea-block/block-macros/src/lib.rs @@ -8,12 +8,13 @@ use syn::{ parse::{Parse, ParseStream, Result}, parse_macro_input, punctuated::Punctuated, - Expr, Ident, Token, + Expr, Ident, LitStr, Token, }; use utils::{combinations_of, to_pascal_case}; struct PropertyDefinition { - name: Ident, + name: LitStr, + struct_name: Ident, variants: Punctuated, } struct PropertyDefinitions { @@ -21,7 +22,12 @@ struct PropertyDefinitions { } struct PropertyAndDefault { - name: Ident, + struct_name: Ident, + default: Ident, +} +struct PropertyWithNameAndDefault { + name: String, + struct_name: Ident, default: Ident, } struct BlockDefinition { @@ -29,6 +35,15 @@ struct BlockDefinition { behavior: Expr, properties_and_defaults: Vec, } +impl PropertyAndDefault { + fn into_property_with_name_and_default(&self, name: String) -> PropertyWithNameAndDefault { + PropertyWithNameAndDefault { + name, + struct_name: self.struct_name.clone(), + default: self.default.clone(), + } + } +} struct BlockDefinitions { blocks: Vec, } @@ -39,19 +54,29 @@ struct MakeBlockStates { impl Parse for PropertyDefinition { fn parse(input: ParseStream) -> Result { - // Face { + // "face" => Face { // Floor, // Wall, // Ceiling // }, + + // if you're wondering, the reason it's in quotes is because `type` is + // a keyword in rust so if we don't put it in quotes it results in a + // syntax error let name = input.parse()?; + input.parse::]>()?; + let struct_name = input.parse()?; let content; braced!(content in input); let variants = content.parse_terminated(Ident::parse)?; input.parse::()?; - Ok(PropertyDefinition { name, variants }) + Ok(PropertyDefinition { + name, + struct_name, + variants, + }) } } @@ -70,11 +95,11 @@ impl Parse for PropertyDefinitions { impl Parse for BlockDefinition { fn parse(input: ParseStream) -> Result { - // acacia_button => BlockBehavior::default().no_collision(), { - // Face, - // Facing, - // Powered - // }, + // acacia_button => BlockBehavior::default(), { + // Facing=North, + // Powered=False, + // Face=Wall, + // }, let name = input.parse()?; input.parse::]>()?; let behavior = input.parse()?; @@ -93,7 +118,7 @@ impl Parse for BlockDefinition { content.parse::()?; let property_default = content.parse()?; properties_and_defaults.push(PropertyAndDefault { - name: property, + struct_name: property, default: property_default, }); if content.parse::().is_err() { @@ -152,15 +177,21 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { let mut property_enums = quote! {}; let mut properties_map = HashMap::new(); + let mut property_struct_names_to_names = HashMap::new(); - let mut state_id = 0usize; + let mut state_id: usize = 0; for property in &input.property_definitions.properties { let mut property_enum_variants = quote! {}; let mut property_from_number_variants = quote! {}; let mut property_enum_variant_names = Vec::new(); - let property_name = &property.name; + let property_struct_name = &property.struct_name; + + property_struct_names_to_names.insert( + property_struct_name.to_string(), + property.name.clone().value(), + ); for i in 0..property.variants.len() { let variant = &property.variants[i]; @@ -177,7 +208,7 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { // i_lit is used here instead of i because otherwise it says 0size // in the expansion and that looks uglier property_from_number_variants.extend(quote! { - #i_lit => #property_name::#variant, + #i_lit => #property_struct_name::#variant, }); property_enum_variant_names.push(variant.to_string()); @@ -185,11 +216,11 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { property_enums.extend(quote! { #[derive(Debug, Clone, Copy)] - pub enum #property_name { + pub enum #property_struct_name { #property_enum_variants } - impl From for #property_name { + impl From for #property_struct_name { fn from(value: usize) -> Self { match value { #property_from_number_variants @@ -198,7 +229,10 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { } } }); - properties_map.insert(property_name.to_string(), property_enum_variant_names); + properties_map.insert( + property_struct_name.to_string(), + property_enum_variant_names, + ); } let mut block_state_enum_variants = quote! {}; @@ -208,7 +242,7 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { let block_property_names = &block .properties_and_defaults .iter() - .map(|p| p.name.to_string()) + .map(|p| p.struct_name.to_string()) .collect::>(); let mut block_properties_vec = Vec::new(); for property_name in block_property_names { @@ -219,17 +253,56 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { block_properties_vec.push(property_variants); } + let mut properties_with_name: Vec = + Vec::with_capacity(block.properties_and_defaults.len()); + for property in &block.properties_and_defaults { + let index: Option = if block + .properties_and_defaults + .iter() + .filter(|p| p.struct_name == property.struct_name) + .count() + > 1 + { + Some( + properties_with_name + .iter() + .filter(|p| p.struct_name == property.struct_name) + .count(), + ) + } else { + None + }; + let mut property_name = property_struct_names_to_names + .get(&property.struct_name.to_string()) + .expect(format!("Property '{}' is bad", property.struct_name).as_str()) + .clone(); + if let Some(index) = index { + property_name.push_str(&format!("_{}", &index.to_string())); + } + properties_with_name + .push(property.into_property_with_name_and_default(property_name.clone())); + } + // pub face: properties::Face, // pub facing: properties::Facing, // pub powered: properties::Powered, + // or + // pub has_bottle_0: HasBottle, + // pub has_bottle_1: HasBottle, + // pub has_bottle_2: HasBottle, let mut block_struct_fields = quote! {}; - for PropertyAndDefault { name: property, .. } in &block.properties_and_defaults { - let property_name_snake = - Ident::new(&property.to_string(), proc_macro2::Span::call_site()); + for PropertyWithNameAndDefault { + struct_name, name, .. + } in &properties_with_name + { + // let property_name_snake = + // Ident::new(&property.to_string(), proc_macro2::Span::call_site()); + let name_ident = Ident::new(&name, proc_macro2::Span::call_site()); block_struct_fields.extend(quote! { - pub #property_name_snake: #property, + pub #name_ident: #struct_name, }) } + let block_name_pascal_case = Ident::new( &to_pascal_case(&block.name.to_string()), proc_macro2::Span::call_site(), @@ -272,16 +345,16 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { // facing: properties::Facing::North, // powered: properties::Powered::True, let mut from_block_to_state_combination_match_inner = quote! {}; - for i in 0..block_property_names.len() { - let property_name = &block_property_names[i]; + for i in 0..properties_with_name.len() { + let property = &properties_with_name[i]; + let property_name = &property.name; let property_name_ident = Ident::new(property_name, proc_macro2::Span::call_site()); - let property_name_snake = - Ident::new(&property_name.to_string(), proc_macro2::Span::call_site()); + let property_struct_name_ident = &property.struct_name; let variant = Ident::new(&combination[i].to_string(), proc_macro2::Span::call_site()); from_block_to_state_combination_match_inner.extend(quote! { - #property_name_ident: #property_name_snake::#variant, + #property_name_ident: #property_struct_name_ident::#variant, }); } @@ -295,23 +368,25 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { // 7035..=7058 => { // let b = b - 7035; // &AcaciaButtonBlock { - // Powered: Powered::from((b / 1) % 2), - // Facing: Facing::from((b / 2) % 4), - // Face: Face::from((b / 8) % 3), + // powered: Powered::from((b / 1) % 2), + // facing: Facing::from((b / 2) % 4), + // face: Face::from((b / 8) % 3), // } // } let mut from_state_to_block_inner = quote! {}; let mut division = 1usize; - for i in (0..block.properties_and_defaults.len()).rev() { - let PropertyAndDefault { + for i in (0..properties_with_name.len()).rev() { + let PropertyWithNameAndDefault { + struct_name: property_struct_name_ident, name: property_name, .. - } = &block.properties_and_defaults[i]; + } = &properties_with_name[i]; let property_variants = &block_properties_vec[i]; let property_variants_count = property_variants.len(); + let property_name_ident = Ident::new(property_name, proc_macro2::Span::call_site()); from_state_to_block_inner.extend(quote! { - #property_name: #property_name::from((b / #division) % #property_variants_count), + #property_name_ident: #property_struct_name_ident::from((b / #division) % #property_variants_count), }); division *= property_variants_count; @@ -328,13 +403,15 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { }); let mut block_default_fields = quote! {}; - for PropertyAndDefault { - name: property, + for PropertyWithNameAndDefault { + struct_name: struct_name_ident, + name, default: property_default, - } in &block.properties_and_defaults + } in properties_with_name { + let name_ident = Ident::new(&name, proc_macro2::Span::call_site()); block_default_fields.extend(quote! { - #property: #property::#property_default, + #name_ident: #struct_name_ident::#property_default, }) } diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index dd297bcb..8d330b8c 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -8,4934 +8,25 @@ pub trait Block { make_block_states! { Properties => { - face => Face { - Floor, - Wall, - Ceiling, - }, - facing => Facing { + "facing" => Facing { North, South, West, East, }, - powered => Powered { + "has_bottle" => HasBottle { True, False, }, - half => Half { - Top, - Bottom, - }, - hinge => Hinge { - Left, - Right, - }, - open => Open { - True, - False, - }, - east => East { - True, - False, - }, - north => North { - True, - False, - }, - south => South { - True, - False, - }, - waterlogged => Waterlogged { - True, - False, - }, - west => West { - True, - False, - }, - in_wall => InWall { - True, - False, - }, - distance => AcaciaLeavesDistance { - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - persistent => Persistent { - True, - False, - }, - axis => Axis { - X, - Y, - Z, - }, - stage => AcaciaSaplingStage { - _0, - _1, - }, - rotation => AcaciaSignRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - type => Type { - Top, - Bottom, - Double, - }, - shape => Shape { - Straight, - InnerLeft, - InnerRight, - OuterLeft, - OuterRight, - }, - east => EastWall { - None, - Low, - Tall, - }, - north => NorthWall { - None, - Low, - Tall, - }, - south => SouthWall { - None, - Low, - Tall, - }, - up => Up { - True, - False, - }, - west => WestWall { - None, - Low, - Tall, - }, - distance => AzaleaLeavesDistance { - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - age => BambooAge { - _0, - _1, - }, - leaves => Leaves { - None, - Small, - Large, - }, - stage => BambooStage { - _0, - _1, - }, - honey_level => BeeNestHoneyLevel { - _0, - _1, - _2, - _3, - _4, - _5, - }, - honey_level => BeehiveHoneyLevel { - _0, - _1, - _2, - _3, - _4, - _5, - }, - age => BeetrootsAge { - _0, - _1, - _2, - _3, - }, - attachment => Attachment { - Floor, - Ceiling, - SingleWall, - DoubleWall, - }, - tilt => Tilt { - None, - Unstable, - Partial, - Full, - }, - distance => BirchLeavesDistance { - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - stage => BirchSaplingStage { - _0, - _1, - }, - rotation => BirchSignRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - rotation => BlackBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - occupied => Occupied { - True, - False, - }, - part => Part { - Head, - Foot, - }, - candles => BlackCandleCandles { - _1, - _2, - _3, - _4, - }, - lit => Lit { - True, - False, - }, - rotation => BlueBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => BlueCandleCandles { - _1, - _2, - _3, - _4, - }, - has_bottle => HasBottle { - True, - False, - }, - rotation => BrownBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => BrownCandleCandles { - _1, - _2, - _3, - _4, - }, - down => Down { - True, - False, - }, - drag => DragDown { - True, - False, - }, - age => CactusAge { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - bites => CakeBites { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - }, - signal_fire => SignalFire { - True, - False, - }, - candles => CandleCandles { - _1, - _2, - _3, - _4, - }, - age => CarrotsAge { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - conditional => Conditional { - True, - False, - }, - age => ChorusFlowerAge { - _0, - _1, - _2, - _3, - _4, - _5, - }, - age => CocoaAge { - _0, - _1, - _2, - }, - mode => Mode { - Save, - Load, - Corner, - Data, - }, - level => ComposterLevel { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - }, - rotation => CreeperHeadRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - rotation => CrimsonSignRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - rotation => CyanBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => CyanCandleCandles { - _1, - _2, - _3, - _4, - }, - distance => DarkOakLeavesDistance { - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - stage => DarkOakSaplingStage { - _0, - _1, - }, - rotation => DarkOakSignRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - inverted => Inverted { - True, - False, - }, - power => DaylightDetectorPower { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - triggered => Triggered { - True, - False, - }, - rotation => DragonHeadRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - eye => HasEye { - True, - False, - }, - moisture => FarmlandMoisture { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - age => FireAge { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - distance => FloweringAzaleaLeavesDistance { - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - age => FrostedIceAge { - _0, - _1, - _2, - _3, - }, - snowy => Snowy { - True, - False, - }, - rotation => GrayBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => GrayCandleCandles { - _1, - _2, - _3, - _4, - }, - rotation => GreenBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => GreenCandleCandles { - _1, - _2, - _3, - _4, - }, - power => HeavyWeightedPressurePlatePower { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - enabled => Enabled { - True, - False, - }, - orientation => Orientation { - DownEast, - DownNorth, - DownSouth, - DownWest, - UpEast, - UpNorth, - UpSouth, - UpWest, - WestUp, - EastUp, - NorthUp, - SouthUp, - }, - has_record => HasRecord { - True, - False, - }, - distance => JungleLeavesDistance { - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - stage => JungleSaplingStage { - _0, - _1, - }, - rotation => JungleSignRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - age => KelpAge { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - _16, - _17, - _18, - _19, - _20, - _21, - _22, - _23, - _24, - _25, - }, - hanging => Hanging { - True, - False, - }, - level => LavaLevel { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - has_book => HasBook { - True, - False, - }, - level => LightLevel { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - rotation => LightBlueBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => LightBlueCandleCandles { - _1, - _2, - _3, - _4, - }, - rotation => LightGrayBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => LightGrayCandleCandles { - _1, - _2, - _3, - _4, - }, - power => LightWeightedPressurePlatePower { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - rotation => LimeBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => LimeCandleCandles { - _1, - _2, - _3, - _4, - }, - rotation => MagentaBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => MagentaCandleCandles { - _1, - _2, - _3, - _4, - }, - distance => MangroveLeavesDistance { - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - age => MangrovePropaguleAge { - _0, - _1, - _2, - _3, - _4, - }, - stage => MangrovePropaguleStage { - _0, - _1, - }, - rotation => MangroveSignRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - age => MelonStemAge { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - age => NetherWartAge { - _0, - _1, - _2, - _3, - }, - instrument => Instrument { - Harp, - Basedrum, - Snare, - Hat, - Bass, - Flute, - Bell, - Guitar, - Chime, - Xylophone, - IronXylophone, - CowBell, - Didgeridoo, - Bit, - Banjo, - Pling, - }, - note => NoteBlockNote { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - _16, - _17, - _18, - _19, - _20, - _21, - _22, - _23, - _24, - }, - distance => OakLeavesDistance { - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - stage => OakSaplingStage { - _0, - _1, - }, - rotation => OakSignRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - rotation => OrangeBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => OrangeCandleCandles { - _1, - _2, - _3, - _4, - }, - rotation => PinkBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => PinkCandleCandles { - _1, - _2, - _3, - _4, - }, - extended => Extended { - True, - False, - }, - short => Short { - True, - False, - }, - rotation => PlayerHeadRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - thickness => Thickness { - TipMerge, - Tip, - Frustum, - Middle, - Base, - }, - vertical_direction => TipDirection { - Up, - Down, - }, - age => PotatoesAge { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - level => PowderSnowCauldronLevel { - _1, - _2, - _3, - }, - age => PumpkinStemAge { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - rotation => PurpleBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => PurpleCandleCandles { - _1, - _2, - _3, - _4, - }, - rotation => RedBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => RedCandleCandles { - _1, - _2, - _3, - _4, - }, - power => RedstoneWirePower { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - delay => RepeaterDelay { - _1, - _2, - _3, - _4, - }, - locked => Locked { - True, - False, - }, - charges => RespawnAnchorCharge { - _0, - _1, - _2, - _3, - _4, - }, - bottom => Bottom { - True, - False, - }, - distance => ScaffoldingDistance { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - bloom => Pulse { - True, - False, - }, - power => SculkSensorPower { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - sculk_sensor_phase => Phase { - Inactive, - Active, - Cooldown, - }, - can_summon => CanSummon { - True, - False, - }, - shrieking => Shrieking { - True, - False, - }, - pickles => SeaPicklePickles { - _1, - _2, - _3, - _4, - }, - rotation => SkeletonSkullRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - layers => SnowLayers { - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - }, - distance => SpruceLeavesDistance { - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - stage => SpruceSaplingStage { - _0, - _1, - }, - rotation => SpruceSignRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - age => SugarCaneAge { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - age => SweetBerryBushAge { - _0, - _1, - _2, - _3, - }, - power => TargetOutputPower { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - unstable => Unstable { - True, - False, - }, - attached => Attached { - True, - False, - }, - disarmed => Disarmed { - True, - False, - }, - eggs => TurtleEggEggs { - _1, - _2, - _3, - _4, - }, - hatch => TurtleEggHatch { - _0, - _1, - _2, - }, - age => TwistingVinesAge { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - _16, - _17, - _18, - _19, - _20, - _21, - _22, - _23, - _24, - _25, - }, - rotation => WarpedSignRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - level => WaterLevel { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - level => WaterCauldronLevel { - _1, - _2, - _3, - }, - age => WeepingVinesAge { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - _16, - _17, - _18, - _19, - _20, - _21, - _22, - _23, - _24, - _25, - }, - age => WheatAge { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - }, - rotation => WhiteBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => WhiteCandleCandles { - _1, - _2, - _3, - _4, - }, - rotation => WitherSkeletonSkullRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - rotation => YellowBannerRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, - candles => YellowCandleCandles { - _1, - _2, - _3, - _4, - }, - rotation => ZombieHeadRotation { - _0, - _1, - _2, - _3, - _4, - _5, - _6, - _7, - _8, - _9, - _10, - _11, - _12, - _13, - _14, - _15, - }, }, Blocks => { - acacia_button => BlockBehavior::default(), { - Facing=North, - Powered=False, - Face=Wall, - }, - acacia_door => BlockBehavior::default(), { - Half=Lower, - Facing=North, - Open=False, - Hinge=Left, - Powered=False, - }, - acacia_fence => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - acacia_fence_gate => BlockBehavior::default(), { - Facing=North, - Open=False, - Powered=False, - InWall=False, - }, - acacia_leaves => BlockBehavior::default(), { - AcaciaLeavesDistance=_7, - Persistent=False, - Waterlogged=False, - }, - acacia_log => BlockBehavior::default(), { - Axis=Y, - }, - acacia_planks => BlockBehavior::default(), { - }, - acacia_pressure_plate => BlockBehavior::default(), { - Powered=False, - }, - acacia_sapling => BlockBehavior::default(), { - AcaciaSaplingStage=_0, - }, - acacia_sign => BlockBehavior::default(), { - AcaciaSignRotation=_0, - Waterlogged=False, - }, - acacia_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - acacia_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - acacia_trapdoor => BlockBehavior::default(), { - Facing=North, - Open=False, - Half=Bottom, - Powered=False, - Waterlogged=False, - }, - acacia_wall_sign => BlockBehavior::default(), { - Facing=North, - Waterlogged=False, - }, - acacia_wood => BlockBehavior::default(), { - Axis=Y, - }, - activator_rail => BlockBehavior::default(), { - Shape=NorthSouth, - Powered=False, - Waterlogged=False, - }, - air => BlockBehavior::default(), { - }, - allium => BlockBehavior::default(), { - }, - amethyst_block => BlockBehavior::default(), { - }, - amethyst_cluster => BlockBehavior::default(), { - Waterlogged=False, - Facing=Up, - }, - ancient_debris => BlockBehavior::default(), { - }, - andesite => BlockBehavior::default(), { - }, - andesite_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - andesite_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - andesite_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - anvil => BlockBehavior::default(), { - Facing=North, - }, - attached_melon_stem => BlockBehavior::default(), { - Facing=North, - }, - attached_pumpkin_stem => BlockBehavior::default(), { - Facing=North, - }, - azalea => BlockBehavior::default(), { - }, - azalea_leaves => BlockBehavior::default(), { - AzaleaLeavesDistance=_7, - Persistent=False, - Waterlogged=False, - }, - azure_bluet => BlockBehavior::default(), { - }, - bamboo => BlockBehavior::default(), { - BambooAge=_0, - Leaves=None, - BambooStage=_0, - }, - bamboo_sapling => BlockBehavior::default(), { - }, - barrel => BlockBehavior::default(), { - Facing=North, - Open=False, - }, - barrier => BlockBehavior::default(), { - }, - basalt => BlockBehavior::default(), { - Axis=Y, - }, - beacon => BlockBehavior::default(), { - }, - bedrock => BlockBehavior::default(), { - }, - bee_nest => BlockBehavior::default(), { - BeeNestHoneyLevel=_0, - Facing=North, - }, - beehive => BlockBehavior::default(), { - BeehiveHoneyLevel=_0, - Facing=North, - }, - beetroots => BlockBehavior::default(), { - BeetrootsAge=_0, - }, - bell => BlockBehavior::default(), { - Facing=North, - Attachment=Floor, - Powered=False, - }, - big_dripleaf => BlockBehavior::default(), { - Waterlogged=False, - Facing=North, - Tilt=None, - }, - big_dripleaf_stem => BlockBehavior::default(), { - Waterlogged=False, - Facing=North, - }, - birch_button => BlockBehavior::default(), { - Facing=North, - Powered=False, - Face=Wall, - }, - birch_door => BlockBehavior::default(), { - Half=Lower, - Facing=North, - Open=False, - Hinge=Left, - Powered=False, - }, - birch_fence => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - birch_fence_gate => BlockBehavior::default(), { - Facing=North, - Open=False, - Powered=False, - InWall=False, - }, - birch_leaves => BlockBehavior::default(), { - BirchLeavesDistance=_7, - Persistent=False, - Waterlogged=False, - }, - birch_log => BlockBehavior::default(), { - Axis=Y, - }, - birch_planks => BlockBehavior::default(), { - }, - birch_pressure_plate => BlockBehavior::default(), { - Powered=False, - }, - birch_sapling => BlockBehavior::default(), { - BirchSaplingStage=_0, - }, - birch_sign => BlockBehavior::default(), { - BirchSignRotation=_0, - Waterlogged=False, - }, - birch_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - birch_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - birch_trapdoor => BlockBehavior::default(), { - Facing=North, - Open=False, - Half=Bottom, - Powered=False, - Waterlogged=False, - }, - birch_wall_sign => BlockBehavior::default(), { - Facing=North, - Waterlogged=False, - }, - birch_wood => BlockBehavior::default(), { - Axis=Y, - }, - black_banner => BlockBehavior::default(), { - BlackBannerRotation=_0, - }, - black_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - black_candle => BlockBehavior::default(), { - BlackCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - black_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - black_carpet => BlockBehavior::default(), { - }, - black_concrete => BlockBehavior::default(), { - }, - black_concrete_powder => BlockBehavior::default(), { - }, - black_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - black_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - black_stained_glass => BlockBehavior::default(), { - }, - black_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - black_terracotta => BlockBehavior::default(), { - }, - black_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - black_wool => BlockBehavior::default(), { - }, - blackstone => BlockBehavior::default(), { - }, - blackstone_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - blackstone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - blackstone_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - blast_furnace => BlockBehavior::default(), { - Facing=North, - Lit=False, - }, - blue_banner => BlockBehavior::default(), { - BlueBannerRotation=_0, - }, - blue_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - blue_candle => BlockBehavior::default(), { - BlueCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - blue_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - blue_carpet => BlockBehavior::default(), { - }, - blue_concrete => BlockBehavior::default(), { - }, - blue_concrete_powder => BlockBehavior::default(), { - }, - blue_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - blue_ice => BlockBehavior::default(), { - }, - blue_orchid => BlockBehavior::default(), { - }, - blue_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - blue_stained_glass => BlockBehavior::default(), { - }, - blue_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - blue_terracotta => BlockBehavior::default(), { - }, - blue_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - blue_wool => BlockBehavior::default(), { - }, - bone_block => BlockBehavior::default(), { - Axis=Y, - }, - bookshelf => BlockBehavior::default(), { - }, - brain_coral => BlockBehavior::default(), { - Waterlogged=True, - }, - brain_coral_block => BlockBehavior::default(), { - }, - brain_coral_fan => BlockBehavior::default(), { - Waterlogged=True, - }, brain_coral_wall_fan => BlockBehavior::default(), { Facing=North, - Waterlogged=True, }, brewing_stand => BlockBehavior::default(), { HasBottle=False, HasBottle=False, HasBottle=False, }, - brick_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - bricks => BlockBehavior::default(), { - }, - brown_banner => BlockBehavior::default(), { - BrownBannerRotation=_0, - }, - brown_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - brown_candle => BlockBehavior::default(), { - BrownCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - brown_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - brown_carpet => BlockBehavior::default(), { - }, - brown_concrete => BlockBehavior::default(), { - }, - brown_concrete_powder => BlockBehavior::default(), { - }, - brown_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - brown_mushroom => BlockBehavior::default(), { - }, - brown_mushroom_block => BlockBehavior::default(), { - Up=True, - Down=True, - North=True, - East=True, - South=True, - West=True, - }, - brown_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - brown_stained_glass => BlockBehavior::default(), { - }, - brown_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - brown_terracotta => BlockBehavior::default(), { - }, - brown_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - brown_wool => BlockBehavior::default(), { - }, - bubble_column => BlockBehavior::default(), { - DragDown=True, - }, - bubble_coral => BlockBehavior::default(), { - Waterlogged=True, - }, - bubble_coral_block => BlockBehavior::default(), { - }, - bubble_coral_fan => BlockBehavior::default(), { - Waterlogged=True, - }, - bubble_coral_wall_fan => BlockBehavior::default(), { - Facing=North, - Waterlogged=True, - }, - budding_amethyst => BlockBehavior::default(), { - }, - cactus => BlockBehavior::default(), { - CactusAge=_0, - }, - cake => BlockBehavior::default(), { - CakeBites=_0, - }, - calcite => BlockBehavior::default(), { - }, - campfire => BlockBehavior::default(), { - Lit=True, - SignalFire=False, - Waterlogged=False, - Facing=North, - }, - candle => BlockBehavior::default(), { - CandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - candle_cake => BlockBehavior::default(), { - Lit=False, - }, - carrots => BlockBehavior::default(), { - CarrotsAge=_0, - }, - cartography_table => BlockBehavior::default(), { - }, - carved_pumpkin => BlockBehavior::default(), { - Facing=North, - }, - cauldron => BlockBehavior::default(), { - }, - cave_air => BlockBehavior::default(), { - }, - cave_vines => BlockBehavior::default(), { - }, - cave_vines_plant => BlockBehavior::default(), { - }, - chain => BlockBehavior::default(), { - Waterlogged=False, - Axis=Y, - }, - chain_command_block => BlockBehavior::default(), { - Facing=North, - Conditional=False, - }, - chest => BlockBehavior::default(), { - Facing=North, - Type=Single, - Waterlogged=False, - }, - chipped_anvil => BlockBehavior::default(), { - Facing=North, - }, - chiseled_deepslate => BlockBehavior::default(), { - }, - chiseled_nether_bricks => BlockBehavior::default(), { - }, - chiseled_polished_blackstone => BlockBehavior::default(), { - }, - chiseled_quartz_block => BlockBehavior::default(), { - }, - chiseled_red_sandstone => BlockBehavior::default(), { - }, - chiseled_sandstone => BlockBehavior::default(), { - }, - chiseled_stone_bricks => BlockBehavior::default(), { - }, - chorus_flower => BlockBehavior::default(), { - ChorusFlowerAge=_0, - }, - chorus_plant => BlockBehavior::default(), { - North=False, - East=False, - South=False, - West=False, - Up=False, - Down=False, - }, - clay => BlockBehavior::default(), { - }, - coal_block => BlockBehavior::default(), { - }, - coal_ore => BlockBehavior::default(), { - }, - coarse_dirt => BlockBehavior::default(), { - }, - cobbled_deepslate => BlockBehavior::default(), { - }, - cobbled_deepslate_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - cobbled_deepslate_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - cobbled_deepslate_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - cobblestone => BlockBehavior::default(), { - }, - cobblestone_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - cobblestone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - cobblestone_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - cobweb => BlockBehavior::default(), { - }, - cocoa => BlockBehavior::default(), { - Facing=North, - CocoaAge=_0, - }, - command_block => BlockBehavior::default(), { - Facing=North, - Conditional=False, - }, - comparator => BlockBehavior::default(), { - Facing=North, - Mode=Compare, - Powered=False, - }, - composter => BlockBehavior::default(), { - ComposterLevel=_0, - }, - conduit => BlockBehavior::default(), { - Waterlogged=True, - }, - copper_block => BlockBehavior::default(), { - }, - copper_ore => BlockBehavior::default(), { - }, - cornflower => BlockBehavior::default(), { - }, - cracked_deepslate_bricks => BlockBehavior::default(), { - }, - cracked_deepslate_tiles => BlockBehavior::default(), { - }, - cracked_nether_bricks => BlockBehavior::default(), { - }, - cracked_polished_blackstone_bricks => BlockBehavior::default(), { - }, - cracked_stone_bricks => BlockBehavior::default(), { - }, - crafting_table => BlockBehavior::default(), { - }, - creeper_head => BlockBehavior::default(), { - CreeperHeadRotation=_0, - }, - creeper_wall_head => BlockBehavior::default(), { - Facing=North, - }, - crimson_button => BlockBehavior::default(), { - Facing=North, - Powered=False, - Face=Wall, - }, - crimson_door => BlockBehavior::default(), { - Half=Lower, - Facing=North, - Open=False, - Hinge=Left, - Powered=False, - }, - crimson_fence => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - crimson_fence_gate => BlockBehavior::default(), { - Facing=North, - Open=False, - Powered=False, - InWall=False, - }, - crimson_fungus => BlockBehavior::default(), { - }, - crimson_hyphae => BlockBehavior::default(), { - Axis=Y, - }, - crimson_nylium => BlockBehavior::default(), { - }, - crimson_planks => BlockBehavior::default(), { - }, - crimson_pressure_plate => BlockBehavior::default(), { - Powered=False, - }, - crimson_roots => BlockBehavior::default(), { - }, - crimson_sign => BlockBehavior::default(), { - CrimsonSignRotation=_0, - Waterlogged=False, - }, - crimson_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - crimson_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - crimson_stem => BlockBehavior::default(), { - Axis=Y, - }, - crimson_trapdoor => BlockBehavior::default(), { - Facing=North, - Open=False, - Half=Bottom, - Powered=False, - Waterlogged=False, - }, - crimson_wall_sign => BlockBehavior::default(), { - Facing=North, - Waterlogged=False, - }, - crying_obsidian => BlockBehavior::default(), { - }, - cut_copper => BlockBehavior::default(), { - }, - cut_copper_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - cut_red_sandstone => BlockBehavior::default(), { - }, - cut_red_sandstone_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - cut_sandstone => BlockBehavior::default(), { - }, - cut_sandstone_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - cyan_banner => BlockBehavior::default(), { - CyanBannerRotation=_0, - }, - cyan_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - cyan_candle => BlockBehavior::default(), { - CyanCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - cyan_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - cyan_carpet => BlockBehavior::default(), { - }, - cyan_concrete => BlockBehavior::default(), { - }, - cyan_concrete_powder => BlockBehavior::default(), { - }, - cyan_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - cyan_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - cyan_stained_glass => BlockBehavior::default(), { - }, - cyan_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - cyan_terracotta => BlockBehavior::default(), { - }, - cyan_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - cyan_wool => BlockBehavior::default(), { - }, - damaged_anvil => BlockBehavior::default(), { - Facing=North, - }, - dandelion => BlockBehavior::default(), { - }, - dark_oak_button => BlockBehavior::default(), { - Facing=North, - Powered=False, - Face=Wall, - }, - dark_oak_door => BlockBehavior::default(), { - Half=Lower, - Facing=North, - Open=False, - Hinge=Left, - Powered=False, - }, - dark_oak_fence => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - dark_oak_fence_gate => BlockBehavior::default(), { - Facing=North, - Open=False, - Powered=False, - InWall=False, - }, - dark_oak_leaves => BlockBehavior::default(), { - DarkOakLeavesDistance=_7, - Persistent=False, - Waterlogged=False, - }, - dark_oak_log => BlockBehavior::default(), { - Axis=Y, - }, - dark_oak_planks => BlockBehavior::default(), { - }, - dark_oak_pressure_plate => BlockBehavior::default(), { - Powered=False, - }, - dark_oak_sapling => BlockBehavior::default(), { - DarkOakSaplingStage=_0, - }, - dark_oak_sign => BlockBehavior::default(), { - DarkOakSignRotation=_0, - Waterlogged=False, - }, - dark_oak_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - dark_oak_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - dark_oak_trapdoor => BlockBehavior::default(), { - Facing=North, - Open=False, - Half=Bottom, - Powered=False, - Waterlogged=False, - }, - dark_oak_wall_sign => BlockBehavior::default(), { - Facing=North, - Waterlogged=False, - }, - dark_oak_wood => BlockBehavior::default(), { - Axis=Y, - }, - dark_prismarine => BlockBehavior::default(), { - }, - dark_prismarine_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - dark_prismarine_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - daylight_detector => BlockBehavior::default(), { - DaylightDetectorPower=_0, - Inverted=False, - }, - dead_brain_coral => BlockBehavior::default(), { - Waterlogged=True, - }, - dead_brain_coral_block => BlockBehavior::default(), { - }, - dead_brain_coral_fan => BlockBehavior::default(), { - Waterlogged=True, - }, - dead_brain_coral_wall_fan => BlockBehavior::default(), { - Facing=North, - Waterlogged=True, - }, - dead_bubble_coral => BlockBehavior::default(), { - Waterlogged=True, - }, - dead_bubble_coral_block => BlockBehavior::default(), { - }, - dead_bubble_coral_fan => BlockBehavior::default(), { - Waterlogged=True, - }, - dead_bubble_coral_wall_fan => BlockBehavior::default(), { - Facing=North, - Waterlogged=True, - }, - dead_bush => BlockBehavior::default(), { - }, - dead_fire_coral => BlockBehavior::default(), { - Waterlogged=True, - }, - dead_fire_coral_block => BlockBehavior::default(), { - }, - dead_fire_coral_fan => BlockBehavior::default(), { - Waterlogged=True, - }, - dead_fire_coral_wall_fan => BlockBehavior::default(), { - Facing=North, - Waterlogged=True, - }, - dead_horn_coral => BlockBehavior::default(), { - Waterlogged=True, - }, - dead_horn_coral_block => BlockBehavior::default(), { - }, - dead_horn_coral_fan => BlockBehavior::default(), { - Waterlogged=True, - }, - dead_horn_coral_wall_fan => BlockBehavior::default(), { - Facing=North, - Waterlogged=True, - }, - dead_tube_coral => BlockBehavior::default(), { - Waterlogged=True, - }, - dead_tube_coral_block => BlockBehavior::default(), { - }, - dead_tube_coral_fan => BlockBehavior::default(), { - Waterlogged=True, - }, - dead_tube_coral_wall_fan => BlockBehavior::default(), { - Facing=North, - Waterlogged=True, - }, - deepslate => BlockBehavior::default(), { - Axis=Y, - }, - deepslate_brick_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - deepslate_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - deepslate_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - deepslate_bricks => BlockBehavior::default(), { - }, - deepslate_coal_ore => BlockBehavior::default(), { - }, - deepslate_copper_ore => BlockBehavior::default(), { - }, - deepslate_diamond_ore => BlockBehavior::default(), { - }, - deepslate_emerald_ore => BlockBehavior::default(), { - }, - deepslate_gold_ore => BlockBehavior::default(), { - }, - deepslate_iron_ore => BlockBehavior::default(), { - }, - deepslate_lapis_ore => BlockBehavior::default(), { - }, - deepslate_redstone_ore => BlockBehavior::default(), { - Lit=False, - }, - deepslate_tile_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - deepslate_tile_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - deepslate_tile_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - deepslate_tiles => BlockBehavior::default(), { - }, - detector_rail => BlockBehavior::default(), { - Shape=NorthSouth, - Powered=False, - Waterlogged=False, - }, - diamond_block => BlockBehavior::default(), { - }, - diamond_ore => BlockBehavior::default(), { - }, - diorite => BlockBehavior::default(), { - }, - diorite_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - diorite_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - diorite_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - dirt => BlockBehavior::default(), { - }, - dirt_path => BlockBehavior::default(), { - }, - dispenser => BlockBehavior::default(), { - Facing=North, - Triggered=False, - }, - dragon_egg => BlockBehavior::default(), { - }, - dragon_head => BlockBehavior::default(), { - DragonHeadRotation=_0, - }, - dragon_wall_head => BlockBehavior::default(), { - Facing=North, - }, - dried_kelp_block => BlockBehavior::default(), { - }, - dripstone_block => BlockBehavior::default(), { - }, - dropper => BlockBehavior::default(), { - Facing=North, - Triggered=False, - }, - emerald_block => BlockBehavior::default(), { - }, - emerald_ore => BlockBehavior::default(), { - }, - enchanting_table => BlockBehavior::default(), { - }, - end_gateway => BlockBehavior::default(), { - }, - end_portal => BlockBehavior::default(), { - }, - end_portal_frame => BlockBehavior::default(), { - Facing=North, - HasEye=False, - }, - end_rod => BlockBehavior::default(), { - Facing=Up, - }, - end_stone => BlockBehavior::default(), { - }, - end_stone_brick_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - end_stone_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - end_stone_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - end_stone_bricks => BlockBehavior::default(), { - }, - ender_chest => BlockBehavior::default(), { - Facing=North, - Waterlogged=False, - }, - exposed_copper => BlockBehavior::default(), { - }, - exposed_cut_copper => BlockBehavior::default(), { - }, - exposed_cut_copper_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - exposed_cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - farmland => BlockBehavior::default(), { - FarmlandMoisture=_0, - }, - fern => BlockBehavior::default(), { - }, - fire => BlockBehavior::default(), { - FireAge=_0, - North=False, - East=False, - South=False, - West=False, - Up=False, - }, - fire_coral => BlockBehavior::default(), { - Waterlogged=True, - }, - fire_coral_block => BlockBehavior::default(), { - }, - fire_coral_fan => BlockBehavior::default(), { - Waterlogged=True, - }, - fire_coral_wall_fan => BlockBehavior::default(), { - Facing=North, - Waterlogged=True, - }, - fletching_table => BlockBehavior::default(), { - }, - flower_pot => BlockBehavior::default(), { - }, - flowering_azalea => BlockBehavior::default(), { - }, - flowering_azalea_leaves => BlockBehavior::default(), { - FloweringAzaleaLeavesDistance=_7, - Persistent=False, - Waterlogged=False, - }, - frogspawn => BlockBehavior::default(), { - }, - frosted_ice => BlockBehavior::default(), { - FrostedIceAge=_0, - }, - furnace => BlockBehavior::default(), { - Facing=North, - Lit=False, - }, - gilded_blackstone => BlockBehavior::default(), { - }, - glass => BlockBehavior::default(), { - }, - glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - glow_lichen => BlockBehavior::default(), { - }, - glowstone => BlockBehavior::default(), { - }, - gold_block => BlockBehavior::default(), { - }, - gold_ore => BlockBehavior::default(), { - }, - granite => BlockBehavior::default(), { - }, - granite_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - granite_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - granite_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - grass => BlockBehavior::default(), { - }, - grass_block => BlockBehavior::default(), { - Snowy=False, - }, - gravel => BlockBehavior::default(), { - }, - gray_banner => BlockBehavior::default(), { - GrayBannerRotation=_0, - }, - gray_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - gray_candle => BlockBehavior::default(), { - GrayCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - gray_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - gray_carpet => BlockBehavior::default(), { - }, - gray_concrete => BlockBehavior::default(), { - }, - gray_concrete_powder => BlockBehavior::default(), { - }, - gray_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - gray_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - gray_stained_glass => BlockBehavior::default(), { - }, - gray_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - gray_terracotta => BlockBehavior::default(), { - }, - gray_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - gray_wool => BlockBehavior::default(), { - }, - green_banner => BlockBehavior::default(), { - GreenBannerRotation=_0, - }, - green_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - green_candle => BlockBehavior::default(), { - GreenCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - green_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - green_carpet => BlockBehavior::default(), { - }, - green_concrete => BlockBehavior::default(), { - }, - green_concrete_powder => BlockBehavior::default(), { - }, - green_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - green_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - green_stained_glass => BlockBehavior::default(), { - }, - green_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - green_terracotta => BlockBehavior::default(), { - }, - green_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - green_wool => BlockBehavior::default(), { - }, - grindstone => BlockBehavior::default(), { - Facing=North, - Face=Wall, - }, - hanging_roots => BlockBehavior::default(), { - Waterlogged=False, - }, - hay_block => BlockBehavior::default(), { - Axis=Y, - }, - heavy_weighted_pressure_plate => BlockBehavior::default(), { - HeavyWeightedPressurePlatePower=_0, - }, - honey_block => BlockBehavior::default(), { - }, - honeycomb_block => BlockBehavior::default(), { - }, - hopper => BlockBehavior::default(), { - Facing=Down, - Enabled=True, - }, - horn_coral => BlockBehavior::default(), { - Waterlogged=True, - }, - horn_coral_block => BlockBehavior::default(), { - }, - horn_coral_fan => BlockBehavior::default(), { - Waterlogged=True, - }, - horn_coral_wall_fan => BlockBehavior::default(), { - Facing=North, - Waterlogged=True, - }, - ice => BlockBehavior::default(), { - }, - infested_chiseled_stone_bricks => BlockBehavior::default(), { - }, - infested_cobblestone => BlockBehavior::default(), { - }, - infested_cracked_stone_bricks => BlockBehavior::default(), { - }, - infested_deepslate => BlockBehavior::default(), { - }, - infested_mossy_stone_bricks => BlockBehavior::default(), { - }, - infested_stone => BlockBehavior::default(), { - }, - infested_stone_bricks => BlockBehavior::default(), { - }, - iron_bars => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - iron_block => BlockBehavior::default(), { - }, - iron_door => BlockBehavior::default(), { - Half=Lower, - Facing=North, - Open=False, - Hinge=Left, - Powered=False, - }, - iron_ore => BlockBehavior::default(), { - }, - iron_trapdoor => BlockBehavior::default(), { - Facing=North, - Open=False, - Half=Bottom, - Powered=False, - Waterlogged=False, - }, - jack_o_lantern => BlockBehavior::default(), { - Facing=North, - }, - jigsaw => BlockBehavior::default(), { - Orientation=NorthUp, - }, - jukebox => BlockBehavior::default(), { - HasRecord=False, - }, - jungle_button => BlockBehavior::default(), { - Facing=North, - Powered=False, - Face=Wall, - }, - jungle_door => BlockBehavior::default(), { - Half=Lower, - Facing=North, - Open=False, - Hinge=Left, - Powered=False, - }, - jungle_fence => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - jungle_fence_gate => BlockBehavior::default(), { - Facing=North, - Open=False, - Powered=False, - InWall=False, - }, - jungle_leaves => BlockBehavior::default(), { - JungleLeavesDistance=_7, - Persistent=False, - Waterlogged=False, - }, - jungle_log => BlockBehavior::default(), { - Axis=Y, - }, - jungle_planks => BlockBehavior::default(), { - }, - jungle_pressure_plate => BlockBehavior::default(), { - Powered=False, - }, - jungle_sapling => BlockBehavior::default(), { - JungleSaplingStage=_0, - }, - jungle_sign => BlockBehavior::default(), { - JungleSignRotation=_0, - Waterlogged=False, - }, - jungle_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - jungle_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - jungle_trapdoor => BlockBehavior::default(), { - Facing=North, - Open=False, - Half=Bottom, - Powered=False, - Waterlogged=False, - }, - jungle_wall_sign => BlockBehavior::default(), { - Facing=North, - Waterlogged=False, - }, - jungle_wood => BlockBehavior::default(), { - Axis=Y, - }, - kelp => BlockBehavior::default(), { - KelpAge=_0, - }, - kelp_plant => BlockBehavior::default(), { - }, - ladder => BlockBehavior::default(), { - Facing=North, - Waterlogged=False, - }, - lantern => BlockBehavior::default(), { - Hanging=False, - Waterlogged=False, - }, - lapis_block => BlockBehavior::default(), { - }, - lapis_ore => BlockBehavior::default(), { - }, - large_amethyst_bud => BlockBehavior::default(), { - Waterlogged=False, - Facing=Up, - }, - large_fern => BlockBehavior::default(), { - Half=Lower, - }, - lava => BlockBehavior::default(), { - LavaLevel=_0, - }, - lava_cauldron => BlockBehavior::default(), { - }, - lectern => BlockBehavior::default(), { - Facing=North, - Powered=False, - HasBook=False, - }, - lever => BlockBehavior::default(), { - Face=Wall, - Facing=North, - Powered=False, - }, - light => BlockBehavior::default(), { - LightLevel=_15, - Waterlogged=False, - }, - light_blue_banner => BlockBehavior::default(), { - LightBlueBannerRotation=_0, - }, - light_blue_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - light_blue_candle => BlockBehavior::default(), { - LightBlueCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - light_blue_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - light_blue_carpet => BlockBehavior::default(), { - }, - light_blue_concrete => BlockBehavior::default(), { - }, - light_blue_concrete_powder => BlockBehavior::default(), { - }, - light_blue_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - light_blue_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - light_blue_stained_glass => BlockBehavior::default(), { - }, - light_blue_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - light_blue_terracotta => BlockBehavior::default(), { - }, - light_blue_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - light_blue_wool => BlockBehavior::default(), { - }, - light_gray_banner => BlockBehavior::default(), { - LightGrayBannerRotation=_0, - }, - light_gray_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - light_gray_candle => BlockBehavior::default(), { - LightGrayCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - light_gray_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - light_gray_carpet => BlockBehavior::default(), { - }, - light_gray_concrete => BlockBehavior::default(), { - }, - light_gray_concrete_powder => BlockBehavior::default(), { - }, - light_gray_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - light_gray_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - light_gray_stained_glass => BlockBehavior::default(), { - }, - light_gray_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - light_gray_terracotta => BlockBehavior::default(), { - }, - light_gray_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - light_gray_wool => BlockBehavior::default(), { - }, - light_weighted_pressure_plate => BlockBehavior::default(), { - LightWeightedPressurePlatePower=_0, - }, - lightning_rod => BlockBehavior::default(), { - Facing=Up, - Powered=False, - Waterlogged=False, - }, - lilac => BlockBehavior::default(), { - Half=Lower, - }, - lily_of_the_valley => BlockBehavior::default(), { - }, - lily_pad => BlockBehavior::default(), { - }, - lime_banner => BlockBehavior::default(), { - LimeBannerRotation=_0, - }, - lime_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - lime_candle => BlockBehavior::default(), { - LimeCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - lime_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - lime_carpet => BlockBehavior::default(), { - }, - lime_concrete => BlockBehavior::default(), { - }, - lime_concrete_powder => BlockBehavior::default(), { - }, - lime_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - lime_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - lime_stained_glass => BlockBehavior::default(), { - }, - lime_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - lime_terracotta => BlockBehavior::default(), { - }, - lime_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - lime_wool => BlockBehavior::default(), { - }, - lodestone => BlockBehavior::default(), { - }, - loom => BlockBehavior::default(), { - Facing=North, - }, - magenta_banner => BlockBehavior::default(), { - MagentaBannerRotation=_0, - }, - magenta_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - magenta_candle => BlockBehavior::default(), { - MagentaCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - magenta_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - magenta_carpet => BlockBehavior::default(), { - }, - magenta_concrete => BlockBehavior::default(), { - }, - magenta_concrete_powder => BlockBehavior::default(), { - }, - magenta_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - magenta_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - magenta_stained_glass => BlockBehavior::default(), { - }, - magenta_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - magenta_terracotta => BlockBehavior::default(), { - }, - magenta_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - magenta_wool => BlockBehavior::default(), { - }, - magma_block => BlockBehavior::default(), { - }, - mangrove_button => BlockBehavior::default(), { - Facing=North, - Powered=False, - Face=Wall, - }, - mangrove_door => BlockBehavior::default(), { - Half=Lower, - Facing=North, - Open=False, - Hinge=Left, - Powered=False, - }, - mangrove_fence => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - mangrove_fence_gate => BlockBehavior::default(), { - Facing=North, - Open=False, - Powered=False, - InWall=False, - }, - mangrove_leaves => BlockBehavior::default(), { - MangroveLeavesDistance=_7, - Persistent=False, - Waterlogged=False, - }, - mangrove_log => BlockBehavior::default(), { - Axis=Y, - }, - mangrove_planks => BlockBehavior::default(), { - }, - mangrove_pressure_plate => BlockBehavior::default(), { - Powered=False, - }, - mangrove_propagule => BlockBehavior::default(), { - MangrovePropaguleStage=_0, - MangrovePropaguleAge=_0, - Waterlogged=False, - Hanging=False, - }, - mangrove_roots => BlockBehavior::default(), { - Waterlogged=False, - }, - mangrove_sign => BlockBehavior::default(), { - MangroveSignRotation=_0, - Waterlogged=False, - }, - mangrove_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - mangrove_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - mangrove_trapdoor => BlockBehavior::default(), { - Facing=North, - Open=False, - Half=Bottom, - Powered=False, - Waterlogged=False, - }, - mangrove_wall_sign => BlockBehavior::default(), { - Facing=North, - Waterlogged=False, - }, - mangrove_wood => BlockBehavior::default(), { - Axis=Y, - }, - medium_amethyst_bud => BlockBehavior::default(), { - Waterlogged=False, - Facing=Up, - }, - melon => BlockBehavior::default(), { - }, - melon_stem => BlockBehavior::default(), { - MelonStemAge=_0, - }, - moss_block => BlockBehavior::default(), { - }, - moss_carpet => BlockBehavior::default(), { - }, - mossy_cobblestone => BlockBehavior::default(), { - }, - mossy_cobblestone_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - mossy_cobblestone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - mossy_cobblestone_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - mossy_stone_brick_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - mossy_stone_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - mossy_stone_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - mossy_stone_bricks => BlockBehavior::default(), { - }, - moving_piston => BlockBehavior::default(), { - Facing=North, - Type=Normal, - }, - mud => BlockBehavior::default(), { - }, - mud_brick_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - mud_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - mud_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - mud_bricks => BlockBehavior::default(), { - }, - muddy_mangrove_roots => BlockBehavior::default(), { - Axis=Y, - }, - mushroom_stem => BlockBehavior::default(), { - Up=True, - Down=True, - North=True, - East=True, - South=True, - West=True, - }, - mycelium => BlockBehavior::default(), { - Snowy=False, - }, - nether_brick_fence => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - nether_brick_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - nether_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - nether_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - nether_bricks => BlockBehavior::default(), { - }, - nether_gold_ore => BlockBehavior::default(), { - }, - nether_portal => BlockBehavior::default(), { - Axis=X, - }, - nether_quartz_ore => BlockBehavior::default(), { - }, - nether_sprouts => BlockBehavior::default(), { - }, - nether_wart => BlockBehavior::default(), { - NetherWartAge=_0, - }, - nether_wart_block => BlockBehavior::default(), { - }, - netherite_block => BlockBehavior::default(), { - }, - netherrack => BlockBehavior::default(), { - }, - note_block => BlockBehavior::default(), { - Instrument=Harp, - Powered=False, - NoteBlockNote=_0, - }, - oak_button => BlockBehavior::default(), { - Facing=North, - Powered=False, - Face=Wall, - }, - oak_door => BlockBehavior::default(), { - Half=Lower, - Facing=North, - Open=False, - Hinge=Left, - Powered=False, - }, - oak_fence => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - oak_fence_gate => BlockBehavior::default(), { - Facing=North, - Open=False, - Powered=False, - InWall=False, - }, - oak_leaves => BlockBehavior::default(), { - OakLeavesDistance=_7, - Persistent=False, - Waterlogged=False, - }, - oak_log => BlockBehavior::default(), { - Axis=Y, - }, - oak_planks => BlockBehavior::default(), { - }, - oak_pressure_plate => BlockBehavior::default(), { - Powered=False, - }, - oak_sapling => BlockBehavior::default(), { - OakSaplingStage=_0, - }, - oak_sign => BlockBehavior::default(), { - OakSignRotation=_0, - Waterlogged=False, - }, - oak_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - oak_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - oak_trapdoor => BlockBehavior::default(), { - Facing=North, - Open=False, - Half=Bottom, - Powered=False, - Waterlogged=False, - }, - oak_wall_sign => BlockBehavior::default(), { - Facing=North, - Waterlogged=False, - }, - oak_wood => BlockBehavior::default(), { - Axis=Y, - }, - observer => BlockBehavior::default(), { - Facing=South, - Powered=False, - }, - obsidian => BlockBehavior::default(), { - }, - ochre_froglight => BlockBehavior::default(), { - Axis=Y, - }, - orange_banner => BlockBehavior::default(), { - OrangeBannerRotation=_0, - }, - orange_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - orange_candle => BlockBehavior::default(), { - OrangeCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - orange_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - orange_carpet => BlockBehavior::default(), { - }, - orange_concrete => BlockBehavior::default(), { - }, - orange_concrete_powder => BlockBehavior::default(), { - }, - orange_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - orange_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - orange_stained_glass => BlockBehavior::default(), { - }, - orange_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - orange_terracotta => BlockBehavior::default(), { - }, - orange_tulip => BlockBehavior::default(), { - }, - orange_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - orange_wool => BlockBehavior::default(), { - }, - oxeye_daisy => BlockBehavior::default(), { - }, - oxidized_copper => BlockBehavior::default(), { - }, - oxidized_cut_copper => BlockBehavior::default(), { - }, - oxidized_cut_copper_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - oxidized_cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - packed_ice => BlockBehavior::default(), { - }, - packed_mud => BlockBehavior::default(), { - }, - pearlescent_froglight => BlockBehavior::default(), { - Axis=Y, - }, - peony => BlockBehavior::default(), { - Half=Lower, - }, - petrified_oak_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - pink_banner => BlockBehavior::default(), { - PinkBannerRotation=_0, - }, - pink_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - pink_candle => BlockBehavior::default(), { - PinkCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - pink_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - pink_carpet => BlockBehavior::default(), { - }, - pink_concrete => BlockBehavior::default(), { - }, - pink_concrete_powder => BlockBehavior::default(), { - }, - pink_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - pink_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - pink_stained_glass => BlockBehavior::default(), { - }, - pink_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - pink_terracotta => BlockBehavior::default(), { - }, - pink_tulip => BlockBehavior::default(), { - }, - pink_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - pink_wool => BlockBehavior::default(), { - }, - piston => BlockBehavior::default(), { - Facing=North, - Extended=False, - }, - piston_head => BlockBehavior::default(), { - Facing=North, - Type=Normal, - Short=False, - }, - player_head => BlockBehavior::default(), { - PlayerHeadRotation=_0, - }, - player_wall_head => BlockBehavior::default(), { - Facing=North, - }, - podzol => BlockBehavior::default(), { - Snowy=False, - }, - pointed_dripstone => BlockBehavior::default(), { - TipDirection=Up, - Thickness=Tip, - Waterlogged=False, - }, - polished_andesite => BlockBehavior::default(), { - }, - polished_andesite_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - polished_andesite_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - polished_basalt => BlockBehavior::default(), { - Axis=Y, - }, - polished_blackstone => BlockBehavior::default(), { - }, - polished_blackstone_brick_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - polished_blackstone_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - polished_blackstone_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - polished_blackstone_bricks => BlockBehavior::default(), { - }, - polished_blackstone_button => BlockBehavior::default(), { - Facing=North, - Powered=False, - Face=Wall, - }, - polished_blackstone_pressure_plate => BlockBehavior::default(), { - Powered=False, - }, - polished_blackstone_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - polished_blackstone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - polished_blackstone_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - polished_deepslate => BlockBehavior::default(), { - }, - polished_deepslate_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - polished_deepslate_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - polished_deepslate_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - polished_diorite => BlockBehavior::default(), { - }, - polished_diorite_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - polished_diorite_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - polished_granite => BlockBehavior::default(), { - }, - polished_granite_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - polished_granite_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - poppy => BlockBehavior::default(), { - }, - potatoes => BlockBehavior::default(), { - PotatoesAge=_0, - }, - potted_acacia_sapling => BlockBehavior::default(), { - }, - potted_allium => BlockBehavior::default(), { - }, - potted_azalea_bush => BlockBehavior::default(), { - }, - potted_azure_bluet => BlockBehavior::default(), { - }, - potted_bamboo => BlockBehavior::default(), { - }, - potted_birch_sapling => BlockBehavior::default(), { - }, - potted_blue_orchid => BlockBehavior::default(), { - }, - potted_brown_mushroom => BlockBehavior::default(), { - }, - potted_cactus => BlockBehavior::default(), { - }, - potted_cornflower => BlockBehavior::default(), { - }, - potted_crimson_fungus => BlockBehavior::default(), { - }, - potted_crimson_roots => BlockBehavior::default(), { - }, - potted_dandelion => BlockBehavior::default(), { - }, - potted_dark_oak_sapling => BlockBehavior::default(), { - }, - potted_dead_bush => BlockBehavior::default(), { - }, - potted_fern => BlockBehavior::default(), { - }, - potted_flowering_azalea_bush => BlockBehavior::default(), { - }, - potted_jungle_sapling => BlockBehavior::default(), { - }, - potted_lily_of_the_valley => BlockBehavior::default(), { - }, - potted_mangrove_propagule => BlockBehavior::default(), { - }, - potted_oak_sapling => BlockBehavior::default(), { - }, - potted_orange_tulip => BlockBehavior::default(), { - }, - potted_oxeye_daisy => BlockBehavior::default(), { - }, - potted_pink_tulip => BlockBehavior::default(), { - }, - potted_poppy => BlockBehavior::default(), { - }, - potted_red_mushroom => BlockBehavior::default(), { - }, - potted_red_tulip => BlockBehavior::default(), { - }, - potted_spruce_sapling => BlockBehavior::default(), { - }, - potted_warped_fungus => BlockBehavior::default(), { - }, - potted_warped_roots => BlockBehavior::default(), { - }, - potted_white_tulip => BlockBehavior::default(), { - }, - potted_wither_rose => BlockBehavior::default(), { - }, - powder_snow => BlockBehavior::default(), { - }, - powder_snow_cauldron => BlockBehavior::default(), { - PowderSnowCauldronLevel=_1, - }, - powered_rail => BlockBehavior::default(), { - Shape=NorthSouth, - Powered=False, - Waterlogged=False, - }, - prismarine => BlockBehavior::default(), { - }, - prismarine_brick_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - prismarine_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - prismarine_bricks => BlockBehavior::default(), { - }, - prismarine_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - prismarine_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - prismarine_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - pumpkin => BlockBehavior::default(), { - }, - pumpkin_stem => BlockBehavior::default(), { - PumpkinStemAge=_0, - }, - purple_banner => BlockBehavior::default(), { - PurpleBannerRotation=_0, - }, - purple_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - purple_candle => BlockBehavior::default(), { - PurpleCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - purple_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - purple_carpet => BlockBehavior::default(), { - }, - purple_concrete => BlockBehavior::default(), { - }, - purple_concrete_powder => BlockBehavior::default(), { - }, - purple_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - purple_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - purple_stained_glass => BlockBehavior::default(), { - }, - purple_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - purple_terracotta => BlockBehavior::default(), { - }, - purple_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - purple_wool => BlockBehavior::default(), { - }, - purpur_block => BlockBehavior::default(), { - }, - purpur_pillar => BlockBehavior::default(), { - Axis=Y, - }, - purpur_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - purpur_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - quartz_block => BlockBehavior::default(), { - }, - quartz_bricks => BlockBehavior::default(), { - }, - quartz_pillar => BlockBehavior::default(), { - Axis=Y, - }, - quartz_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - quartz_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - rail => BlockBehavior::default(), { - Shape=NorthSouth, - Waterlogged=False, - }, - raw_copper_block => BlockBehavior::default(), { - }, - raw_gold_block => BlockBehavior::default(), { - }, - raw_iron_block => BlockBehavior::default(), { - }, - red_banner => BlockBehavior::default(), { - RedBannerRotation=_0, - }, - red_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - red_candle => BlockBehavior::default(), { - RedCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - red_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - red_carpet => BlockBehavior::default(), { - }, - red_concrete => BlockBehavior::default(), { - }, - red_concrete_powder => BlockBehavior::default(), { - }, - red_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - red_mushroom => BlockBehavior::default(), { - }, - red_mushroom_block => BlockBehavior::default(), { - Up=True, - Down=True, - North=True, - East=True, - South=True, - West=True, - }, - red_nether_brick_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - red_nether_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - red_nether_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - red_nether_bricks => BlockBehavior::default(), { - }, - red_sand => BlockBehavior::default(), { - }, - red_sandstone => BlockBehavior::default(), { - }, - red_sandstone_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - red_sandstone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - red_sandstone_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - red_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - red_stained_glass => BlockBehavior::default(), { - }, - red_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - red_terracotta => BlockBehavior::default(), { - }, - red_tulip => BlockBehavior::default(), { - }, - red_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - red_wool => BlockBehavior::default(), { - }, - redstone_block => BlockBehavior::default(), { - }, - redstone_lamp => BlockBehavior::default(), { - Lit=False, - }, - redstone_ore => BlockBehavior::default(), { - Lit=False, - }, - redstone_torch => BlockBehavior::default(), { - Lit=True, - }, - redstone_wall_torch => BlockBehavior::default(), { - Facing=North, - Lit=True, - }, - redstone_wire => BlockBehavior::default(), { - North=None, - East=None, - South=None, - West=None, - RedstoneWirePower=_0, - }, - reinforced_deepslate => BlockBehavior::default(), { - }, - repeater => BlockBehavior::default(), { - Facing=North, - RepeaterDelay=_1, - Locked=False, - Powered=False, - }, - repeating_command_block => BlockBehavior::default(), { - Facing=North, - Conditional=False, - }, - respawn_anchor => BlockBehavior::default(), { - RespawnAnchorCharge=_0, - }, - rooted_dirt => BlockBehavior::default(), { - }, - rose_bush => BlockBehavior::default(), { - Half=Lower, - }, - sand => BlockBehavior::default(), { - }, - sandstone => BlockBehavior::default(), { - }, - sandstone_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - sandstone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - sandstone_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - scaffolding => BlockBehavior::default(), { - ScaffoldingDistance=_7, - Waterlogged=False, - Bottom=False, - }, - sculk => BlockBehavior::default(), { - }, - sculk_catalyst => BlockBehavior::default(), { - Pulse=False, - }, - sculk_sensor => BlockBehavior::default(), { - Phase=Inactive, - SculkSensorPower=_0, - Waterlogged=False, - }, - sculk_shrieker => BlockBehavior::default(), { - Shrieking=False, - Waterlogged=False, - CanSummon=False, - }, - sculk_vein => BlockBehavior::default(), { - }, - sea_lantern => BlockBehavior::default(), { - }, - sea_pickle => BlockBehavior::default(), { - SeaPicklePickles=_1, - Waterlogged=True, - }, - seagrass => BlockBehavior::default(), { - }, - shroomlight => BlockBehavior::default(), { - }, - shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - skeleton_skull => BlockBehavior::default(), { - SkeletonSkullRotation=_0, - }, - skeleton_wall_skull => BlockBehavior::default(), { - Facing=North, - }, - slime_block => BlockBehavior::default(), { - }, - small_amethyst_bud => BlockBehavior::default(), { - Waterlogged=False, - Facing=Up, - }, - small_dripleaf => BlockBehavior::default(), { - Half=Lower, - Waterlogged=False, - Facing=North, - }, - smithing_table => BlockBehavior::default(), { - }, - smoker => BlockBehavior::default(), { - Facing=North, - Lit=False, - }, - smooth_basalt => BlockBehavior::default(), { - }, - smooth_quartz => BlockBehavior::default(), { - }, - smooth_quartz_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - smooth_quartz_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - smooth_red_sandstone => BlockBehavior::default(), { - }, - smooth_red_sandstone_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - smooth_red_sandstone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - smooth_sandstone => BlockBehavior::default(), { - }, - smooth_sandstone_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - smooth_sandstone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - smooth_stone => BlockBehavior::default(), { - }, - smooth_stone_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - snow => BlockBehavior::default(), { - SnowLayers=_1, - }, - snow_block => BlockBehavior::default(), { - }, - soul_campfire => BlockBehavior::default(), { - Lit=True, - SignalFire=False, - Waterlogged=False, - Facing=North, - }, - soul_fire => BlockBehavior::default(), { - }, - soul_lantern => BlockBehavior::default(), { - Hanging=False, - Waterlogged=False, - }, - soul_sand => BlockBehavior::default(), { - }, - soul_soil => BlockBehavior::default(), { - }, - soul_torch => BlockBehavior::default(), { - }, - soul_wall_torch => BlockBehavior::default(), { - Facing=North, - }, - spawner => BlockBehavior::default(), { - }, - sponge => BlockBehavior::default(), { - }, - spore_blossom => BlockBehavior::default(), { - }, - spruce_button => BlockBehavior::default(), { - Facing=North, - Powered=False, - Face=Wall, - }, - spruce_door => BlockBehavior::default(), { - Half=Lower, - Facing=North, - Open=False, - Hinge=Left, - Powered=False, - }, - spruce_fence => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - spruce_fence_gate => BlockBehavior::default(), { - Facing=North, - Open=False, - Powered=False, - InWall=False, - }, - spruce_leaves => BlockBehavior::default(), { - SpruceLeavesDistance=_7, - Persistent=False, - Waterlogged=False, - }, - spruce_log => BlockBehavior::default(), { - Axis=Y, - }, - spruce_planks => BlockBehavior::default(), { - }, - spruce_pressure_plate => BlockBehavior::default(), { - Powered=False, - }, - spruce_sapling => BlockBehavior::default(), { - SpruceSaplingStage=_0, - }, - spruce_sign => BlockBehavior::default(), { - SpruceSignRotation=_0, - Waterlogged=False, - }, - spruce_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - spruce_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - spruce_trapdoor => BlockBehavior::default(), { - Facing=North, - Open=False, - Half=Bottom, - Powered=False, - Waterlogged=False, - }, - spruce_wall_sign => BlockBehavior::default(), { - Facing=North, - Waterlogged=False, - }, - spruce_wood => BlockBehavior::default(), { - Axis=Y, - }, - sticky_piston => BlockBehavior::default(), { - Facing=North, - Extended=False, - }, - stone => BlockBehavior::default(), { - }, - stone_brick_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - stone_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - stone_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, - EastWall=None, - WestWall=None, - SouthWall=None, - Waterlogged=False, - }, - stone_bricks => BlockBehavior::default(), { - }, - stone_button => BlockBehavior::default(), { - Facing=North, - Powered=False, - Face=Wall, - }, - stone_pressure_plate => BlockBehavior::default(), { - Powered=False, - }, - stone_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - stone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - stonecutter => BlockBehavior::default(), { - Facing=North, - }, - stripped_acacia_log => BlockBehavior::default(), { - Axis=Y, - }, - stripped_acacia_wood => BlockBehavior::default(), { - Axis=Y, - }, - stripped_birch_log => BlockBehavior::default(), { - Axis=Y, - }, - stripped_birch_wood => BlockBehavior::default(), { - Axis=Y, - }, - stripped_crimson_hyphae => BlockBehavior::default(), { - Axis=Y, - }, - stripped_crimson_stem => BlockBehavior::default(), { - Axis=Y, - }, - stripped_dark_oak_log => BlockBehavior::default(), { - Axis=Y, - }, - stripped_dark_oak_wood => BlockBehavior::default(), { - Axis=Y, - }, - stripped_jungle_log => BlockBehavior::default(), { - Axis=Y, - }, - stripped_jungle_wood => BlockBehavior::default(), { - Axis=Y, - }, - stripped_mangrove_log => BlockBehavior::default(), { - Axis=Y, - }, - stripped_mangrove_wood => BlockBehavior::default(), { - Axis=Y, - }, - stripped_oak_log => BlockBehavior::default(), { - Axis=Y, - }, - stripped_oak_wood => BlockBehavior::default(), { - Axis=Y, - }, - stripped_spruce_log => BlockBehavior::default(), { - Axis=Y, - }, - stripped_spruce_wood => BlockBehavior::default(), { - Axis=Y, - }, - stripped_warped_hyphae => BlockBehavior::default(), { - Axis=Y, - }, - stripped_warped_stem => BlockBehavior::default(), { - Axis=Y, - }, - structure_block => BlockBehavior::default(), { - Mode=Load, - }, - structure_void => BlockBehavior::default(), { - }, - sugar_cane => BlockBehavior::default(), { - SugarCaneAge=_0, - }, - sunflower => BlockBehavior::default(), { - Half=Lower, - }, - sweet_berry_bush => BlockBehavior::default(), { - SweetBerryBushAge=_0, - }, - tall_grass => BlockBehavior::default(), { - Half=Lower, - }, - tall_seagrass => BlockBehavior::default(), { - Half=Lower, - }, - target => BlockBehavior::default(), { - TargetOutputPower=_0, - }, - terracotta => BlockBehavior::default(), { - }, - tinted_glass => BlockBehavior::default(), { - }, - tnt => BlockBehavior::default(), { - Unstable=False, - }, - torch => BlockBehavior::default(), { - }, - trapped_chest => BlockBehavior::default(), { - Facing=North, - Type=Single, - Waterlogged=False, - }, - tripwire => BlockBehavior::default(), { - Powered=False, - Attached=False, - Disarmed=False, - North=False, - East=False, - West=False, - South=False, - }, - tripwire_hook => BlockBehavior::default(), { - Facing=North, - Powered=False, - Attached=False, - }, - tube_coral => BlockBehavior::default(), { - Waterlogged=True, - }, - tube_coral_block => BlockBehavior::default(), { - }, - tube_coral_fan => BlockBehavior::default(), { - Waterlogged=True, - }, - tube_coral_wall_fan => BlockBehavior::default(), { - Facing=North, - Waterlogged=True, - }, - tuff => BlockBehavior::default(), { - }, - turtle_egg => BlockBehavior::default(), { - TurtleEggHatch=_0, - TurtleEggEggs=_1, - }, - twisting_vines => BlockBehavior::default(), { - TwistingVinesAge=_0, - }, - twisting_vines_plant => BlockBehavior::default(), { - }, - verdant_froglight => BlockBehavior::default(), { - Axis=Y, - }, - vine => BlockBehavior::default(), { - Up=False, - North=False, - East=False, - South=False, - West=False, - }, - void_air => BlockBehavior::default(), { - }, - wall_torch => BlockBehavior::default(), { - Facing=North, - }, - warped_button => BlockBehavior::default(), { - Facing=North, - Powered=False, - Face=Wall, - }, - warped_door => BlockBehavior::default(), { - Half=Lower, - Facing=North, - Open=False, - Hinge=Left, - Powered=False, - }, - warped_fence => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - warped_fence_gate => BlockBehavior::default(), { - Facing=North, - Open=False, - Powered=False, - InWall=False, - }, - warped_fungus => BlockBehavior::default(), { - }, - warped_hyphae => BlockBehavior::default(), { - Axis=Y, - }, - warped_nylium => BlockBehavior::default(), { - }, - warped_planks => BlockBehavior::default(), { - }, - warped_pressure_plate => BlockBehavior::default(), { - Powered=False, - }, - warped_roots => BlockBehavior::default(), { - }, - warped_sign => BlockBehavior::default(), { - WarpedSignRotation=_0, - Waterlogged=False, - }, - warped_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - warped_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - warped_stem => BlockBehavior::default(), { - Axis=Y, - }, - warped_trapdoor => BlockBehavior::default(), { - Facing=North, - Open=False, - Half=Bottom, - Powered=False, - Waterlogged=False, - }, - warped_wall_sign => BlockBehavior::default(), { - Facing=North, - Waterlogged=False, - }, - warped_wart_block => BlockBehavior::default(), { - }, - water => BlockBehavior::default(), { - WaterLevel=_0, - }, - water_cauldron => BlockBehavior::default(), { - WaterCauldronLevel=_1, - }, - waxed_copper_block => BlockBehavior::default(), { - }, - waxed_cut_copper => BlockBehavior::default(), { - }, - waxed_cut_copper_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - waxed_cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - waxed_exposed_copper => BlockBehavior::default(), { - }, - waxed_exposed_cut_copper => BlockBehavior::default(), { - }, - waxed_exposed_cut_copper_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - waxed_exposed_cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - waxed_oxidized_copper => BlockBehavior::default(), { - }, - waxed_oxidized_cut_copper => BlockBehavior::default(), { - }, - waxed_oxidized_cut_copper_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - waxed_oxidized_cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - waxed_weathered_copper => BlockBehavior::default(), { - }, - waxed_weathered_cut_copper => BlockBehavior::default(), { - }, - waxed_weathered_cut_copper_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - waxed_weathered_cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - weathered_copper => BlockBehavior::default(), { - }, - weathered_cut_copper => BlockBehavior::default(), { - }, - weathered_cut_copper_slab => BlockBehavior::default(), { - Type=Bottom, - Waterlogged=False, - }, - weathered_cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, - Waterlogged=False, - }, - weeping_vines => BlockBehavior::default(), { - WeepingVinesAge=_0, - }, - weeping_vines_plant => BlockBehavior::default(), { - }, - wet_sponge => BlockBehavior::default(), { - }, - wheat => BlockBehavior::default(), { - WheatAge=_0, - }, - white_banner => BlockBehavior::default(), { - WhiteBannerRotation=_0, - }, - white_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - white_candle => BlockBehavior::default(), { - WhiteCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - white_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - white_carpet => BlockBehavior::default(), { - }, - white_concrete => BlockBehavior::default(), { - }, - white_concrete_powder => BlockBehavior::default(), { - }, - white_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - white_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - white_stained_glass => BlockBehavior::default(), { - }, - white_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - white_terracotta => BlockBehavior::default(), { - }, - white_tulip => BlockBehavior::default(), { - }, - white_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - white_wool => BlockBehavior::default(), { - }, - wither_rose => BlockBehavior::default(), { - }, - wither_skeleton_skull => BlockBehavior::default(), { - WitherSkeletonSkullRotation=_0, - }, - wither_skeleton_wall_skull => BlockBehavior::default(), { - Facing=North, - }, - yellow_banner => BlockBehavior::default(), { - YellowBannerRotation=_0, - }, - yellow_bed => BlockBehavior::default(), { - Facing=North, - Part=Foot, - Occupied=False, - }, - yellow_candle => BlockBehavior::default(), { - YellowCandleCandles=_1, - Lit=False, - Waterlogged=False, - }, - yellow_candle_cake => BlockBehavior::default(), { - Lit=False, - }, - yellow_carpet => BlockBehavior::default(), { - }, - yellow_concrete => BlockBehavior::default(), { - }, - yellow_concrete_powder => BlockBehavior::default(), { - }, - yellow_glazed_terracotta => BlockBehavior::default(), { - Facing=North, - }, - yellow_shulker_box => BlockBehavior::default(), { - Facing=Up, - }, - yellow_stained_glass => BlockBehavior::default(), { - }, - yellow_stained_glass_pane => BlockBehavior::default(), { - North=False, - East=False, - West=False, - South=False, - Waterlogged=False, - }, - yellow_terracotta => BlockBehavior::default(), { - }, - yellow_wall_banner => BlockBehavior::default(), { - Facing=North, - }, - yellow_wool => BlockBehavior::default(), { - }, - zombie_head => BlockBehavior::default(), { - ZombieHeadRotation=_0, - }, - zombie_wall_head => BlockBehavior::default(), { - Facing=North, - }, } } - -// #[derive(Debug, Clone, Copy)] -// pub enum Face { -// Floor, -// Wall, -// Ceiling, -// } - -// #[derive(Debug, Clone, Copy)] -// pub enum Facing { -// North, -// South, -// West, -// East, -// } - -// #[derive(Debug, Clone, Copy)] -// pub enum Powered { -// True, -// False, -// } - -// // the underscore makes it more readable, so i think it's fine to allow it -// #[allow(non_camel_case_types)] -// pub enum BlockState { -// AcaciaButton_FloorNorthTrue, -// AcaciaButton_WallNorthTrue, -// AcaciaButton_CeilingNorthTrue, -// } - -// pub trait Block { -// fn behavior(&self) -> BlockBehavior; -// } - -// #[derive(Debug)] -// pub struct AcaciaButtonBlock { -// pub face: properties::Face, -// pub facing: properties::Facing, -// pub powered: properties::Powered, -// } - -// impl Block for AcaciaButtonBlock { -// fn behavior(&self) -> BlockBehavior { -// BlockBehavior { -// has_collision: false, -// } -// } -// } - -// pub struct AcaciaDoorBlock { -// pub facing: properties::Facing, -// // pub half: properties::Half, -// // pub hinge: properties::Hinge, -// // pub open: properties::Open, -// pub powered: properties::Powered, -// } - -// impl From for &dyn Block { -// fn from(b: BlockState) -> Self { -// match b { -// BlockState::AcaciaButton_FloorNorthTrue => &AcaciaButtonBlock { -// face: properties::Face::Floor, -// facing: properties::Facing::North, -// powered: properties::Powered::True, -// }, -// // BlockState::AcaciaButton_WallNorthTrue => todo!(), -// // BlockState::AcaciaButton_CeilingNorthTrue => todo!(), -// _ => todo!(), -// } -// } -// } -// impl From for BlockState { -// fn from(b: AcaciaButtonBlock) -> Self { -// match b { -// AcaciaButtonBlock { -// face: properties::Face::Floor, -// facing: properties::Facing::North, -// powered: properties::Powered::True, -// } => BlockState::AcaciaButton_FloorNorthTrue, -// // AcaciaButtonBlock { -// // face: properties::Face::Wall, -// // facing: properties::Facing::North, -// // powered: properties::Powered::True, -// // } => todo!(), -// // AcaciaButtonBlock { -// // face: properties::Face::Ceiling, -// // facing: properties::Facing::North, -// // powered: properties::Powered::True, -// // } => todo!(), -// _ => todo!(), -// } -// } -// } - -// #[cfg(test)] -// mod tests { -// use super::*; - -// fn test_from_state_to_block() { -// let state = BlockState::AcaciaButton_CeilingSouthFalse; -// let block_state = BlockState::from(state); -// let block: Box = block_state.into(); -// assert_eq!(block.id(), "acacia_button"); -// // downcast block to AcaciaButtonBlock -// // let acacia_button_block = block.try_into::().unwrap(); -// // assert_eq!(acacia_button_block.face, Face::Ceiling); -// // assert_eq!(acacia_button_block.facing, Facing::South); -// // assert_eq!(acacia_button_block.powered, Powered::False); -// } - -// fn test_from_state_to_block_bottom_edge() { -// let state = BlockState::AcaciaButton_FloorNorthTrue; -// let block_state = BlockState::from(state); -// let block: Box = block_state.into(); -// assert_eq!(block.id(), "acacia_button"); -// } -// } -// } \ No newline at end of file diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index 09f4a85f..5ed16e8e 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -65,14 +65,14 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings # Property codegen new_make_block_states_macro_code.append(' Properties => {') for property_struct_name, property_variants in properties.items(): - # face => Face { + # "face" => Face { # Floor, # Wall, # Ceiling, # }, property_name = property_struct_names_to_names[property_struct_name] new_make_block_states_macro_code.append( - f' {property_name} => {property_struct_name} {{') + f' "{property_name}" => {property_struct_name} {{') for variant in property_variants: new_make_block_states_macro_code.append( From 8aa8baa20d47676b56f633260229d08dfb5ac856 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 11 Jun 2022 17:33:58 -0500 Subject: [PATCH 24/33] Fix ordering of blocks --- azalea-block/src/blocks.rs | 4795 +++++++++++++++++++++++++++++++++++- codegen/genblocks.py | 4 +- codegen/lib/code/blocks.py | 26 +- codegen/lib/extract.py | 6 + 4 files changed, 4819 insertions(+), 12 deletions(-) diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index 8d330b8c..f2ce03dd 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -8,25 +8,4816 @@ pub trait Block { make_block_states! { Properties => { + "snowy" => Snowy { + True, + False, + }, + "stage" => OakSaplingStage { + _0, + _1, + }, + "stage" => SpruceSaplingStage { + _0, + _1, + }, + "stage" => BirchSaplingStage { + _0, + _1, + }, + "stage" => JungleSaplingStage { + _0, + _1, + }, + "stage" => AcaciaSaplingStage { + _0, + _1, + }, + "stage" => DarkOakSaplingStage { + _0, + _1, + }, + "age" => MangrovePropaguleAge { + _0, + _1, + _2, + _3, + _4, + }, + "hanging" => Hanging { + True, + False, + }, + "stage" => MangrovePropaguleStage { + _0, + _1, + }, + "waterlogged" => Waterlogged { + True, + False, + }, + "level" => WaterLevel { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "level" => LavaLevel { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "axis" => Axis { + X, + Y, + Z, + }, + "distance" => OakLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "persistent" => Persistent { + True, + False, + }, + "distance" => SpruceLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "distance" => BirchLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "distance" => JungleLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "distance" => AcaciaLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "distance" => DarkOakLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "distance" => MangroveLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "distance" => AzaleaLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "distance" => FloweringAzaleaLeavesDistance { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, "facing" => Facing { North, South, West, East, }, + "triggered" => Triggered { + True, + False, + }, + "instrument" => Instrument { + Harp, + Basedrum, + Snare, + Hat, + Bass, + Flute, + Bell, + Guitar, + Chime, + Xylophone, + IronXylophone, + CowBell, + Didgeridoo, + Bit, + Banjo, + Pling, + }, + "note" => NoteBlockNote { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + _16, + _17, + _18, + _19, + _20, + _21, + _22, + _23, + _24, + }, + "powered" => Powered { + True, + False, + }, + "occupied" => Occupied { + True, + False, + }, + "part" => Part { + Head, + Foot, + }, + "shape" => Shape { + Straight, + InnerLeft, + InnerRight, + OuterLeft, + OuterRight, + }, + "extended" => Extended { + True, + False, + }, + "half" => Half { + Top, + Bottom, + }, + "type" => Type { + Top, + Bottom, + Double, + }, + "short" => Short { + True, + False, + }, + "unstable" => Unstable { + True, + False, + }, + "age" => FireAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "east" => East { + True, + False, + }, + "north" => North { + True, + False, + }, + "south" => South { + True, + False, + }, + "up" => Up { + True, + False, + }, + "west" => West { + True, + False, + }, + "power" => RedstoneWirePower { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "age" => WheatAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "moisture" => FarmlandMoisture { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "lit" => Lit { + True, + False, + }, + "rotation" => OakSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => SpruceSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => BirchSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => AcaciaSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => JungleSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => DarkOakSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => MangroveSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "hinge" => Hinge { + Left, + Right, + }, + "open" => Open { + True, + False, + }, + "face" => Face { + Floor, + Wall, + Ceiling, + }, + "layers" => SnowLayers { + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + }, + "age" => CactusAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "age" => SugarCaneAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "has_record" => HasRecord { + True, + False, + }, + "bites" => CakeBites { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + }, + "delay" => RepeaterDelay { + _1, + _2, + _3, + _4, + }, + "locked" => Locked { + True, + False, + }, + "down" => Down { + True, + False, + }, + "age" => PumpkinStemAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "age" => MelonStemAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "in_wall" => InWall { + True, + False, + }, + "age" => NetherWartAge { + _0, + _1, + _2, + _3, + }, "has_bottle" => HasBottle { True, False, }, + "level" => WaterCauldronLevel { + _1, + _2, + _3, + }, + "level" => PowderSnowCauldronLevel { + _1, + _2, + _3, + }, + "eye" => HasEye { + True, + False, + }, + "age" => CocoaAge { + _0, + _1, + _2, + }, + "attached" => Attached { + True, + False, + }, + "disarmed" => Disarmed { + True, + False, + }, + "conditional" => Conditional { + True, + False, + }, + "east" => EastWall { + None, + Low, + Tall, + }, + "north" => NorthWall { + None, + Low, + Tall, + }, + "south" => SouthWall { + None, + Low, + Tall, + }, + "west" => WestWall { + None, + Low, + Tall, + }, + "age" => CarrotsAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "age" => PotatoesAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "rotation" => SkeletonSkullRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => WitherSkeletonSkullRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => ZombieHeadRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => PlayerHeadRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => CreeperHeadRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => DragonHeadRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "power" => LightWeightedPressurePlatePower { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "power" => HeavyWeightedPressurePlatePower { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "mode" => Mode { + Save, + Load, + Corner, + Data, + }, + "inverted" => Inverted { + True, + False, + }, + "power" => DaylightDetectorPower { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "enabled" => Enabled { + True, + False, + }, + "level" => LightLevel { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => WhiteBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => OrangeBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => MagentaBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => LightBlueBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => YellowBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => LimeBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => PinkBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => GrayBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => LightGrayBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => CyanBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => PurpleBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => BlueBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => BrownBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => GreenBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => RedBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => BlackBannerRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "age" => ChorusFlowerAge { + _0, + _1, + _2, + _3, + _4, + _5, + }, + "age" => BeetrootsAge { + _0, + _1, + _2, + _3, + }, + "age" => FrostedIceAge { + _0, + _1, + _2, + _3, + }, + "age" => KelpAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + _16, + _17, + _18, + _19, + _20, + _21, + _22, + _23, + _24, + _25, + }, + "eggs" => TurtleEggEggs { + _1, + _2, + _3, + _4, + }, + "hatch" => TurtleEggHatch { + _0, + _1, + _2, + }, + "pickles" => SeaPicklePickles { + _1, + _2, + _3, + _4, + }, + "age" => BambooAge { + _0, + _1, + }, + "leaves" => Leaves { + None, + Small, + Large, + }, + "stage" => BambooStage { + _0, + _1, + }, + "drag" => DragDown { + True, + False, + }, + "bottom" => Bottom { + True, + False, + }, + "distance" => ScaffoldingDistance { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + }, + "has_book" => HasBook { + True, + False, + }, + "attachment" => Attachment { + Floor, + Ceiling, + SingleWall, + DoubleWall, + }, + "signal_fire" => SignalFire { + True, + False, + }, + "age" => SweetBerryBushAge { + _0, + _1, + _2, + _3, + }, + "age" => WeepingVinesAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + _16, + _17, + _18, + _19, + _20, + _21, + _22, + _23, + _24, + _25, + }, + "age" => TwistingVinesAge { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + _16, + _17, + _18, + _19, + _20, + _21, + _22, + _23, + _24, + _25, + }, + "rotation" => CrimsonSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "rotation" => WarpedSignRotation { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "orientation" => Orientation { + DownEast, + DownNorth, + DownSouth, + DownWest, + UpEast, + UpNorth, + UpSouth, + UpWest, + WestUp, + EastUp, + NorthUp, + SouthUp, + }, + "level" => ComposterLevel { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + }, + "power" => TargetOutputPower { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "honey_level" => BeeNestHoneyLevel { + _0, + _1, + _2, + _3, + _4, + _5, + }, + "honey_level" => BeehiveHoneyLevel { + _0, + _1, + _2, + _3, + _4, + _5, + }, + "charges" => RespawnAnchorCharge { + _0, + _1, + _2, + _3, + _4, + }, + "candles" => CandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => WhiteCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => OrangeCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => MagentaCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => LightBlueCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => YellowCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => LimeCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => PinkCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => GrayCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => LightGrayCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => CyanCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => PurpleCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => BlueCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => BrownCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => GreenCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => RedCandleCandles { + _1, + _2, + _3, + _4, + }, + "candles" => BlackCandleCandles { + _1, + _2, + _3, + _4, + }, + "power" => SculkSensorPower { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + }, + "sculk_sensor_phase" => Phase { + Inactive, + Active, + Cooldown, + }, + "bloom" => Pulse { + True, + False, + }, + "can_summon" => CanSummon { + True, + False, + }, + "shrieking" => Shrieking { + True, + False, + }, + "thickness" => Thickness { + TipMerge, + Tip, + Frustum, + Middle, + Base, + }, + "vertical_direction" => TipDirection { + Up, + Down, + }, + "tilt" => Tilt { + None, + Unstable, + Partial, + Full, + }, }, Blocks => { - brain_coral_wall_fan => BlockBehavior::default(), { + air => BlockBehavior::default(), { + }, + stone => BlockBehavior::default(), { + }, + granite => BlockBehavior::default(), { + }, + polished_granite => BlockBehavior::default(), { + }, + diorite => BlockBehavior::default(), { + }, + polished_diorite => BlockBehavior::default(), { + }, + andesite => BlockBehavior::default(), { + }, + polished_andesite => BlockBehavior::default(), { + }, + grass_block => BlockBehavior::default(), { + Snowy=False, + }, + dirt => BlockBehavior::default(), { + }, + coarse_dirt => BlockBehavior::default(), { + }, + podzol => BlockBehavior::default(), { + Snowy=False, + }, + cobblestone => BlockBehavior::default(), { + }, + oak_planks => BlockBehavior::default(), { + }, + spruce_planks => BlockBehavior::default(), { + }, + birch_planks => BlockBehavior::default(), { + }, + jungle_planks => BlockBehavior::default(), { + }, + acacia_planks => BlockBehavior::default(), { + }, + dark_oak_planks => BlockBehavior::default(), { + }, + mangrove_planks => BlockBehavior::default(), { + }, + oak_sapling => BlockBehavior::default(), { + OakSaplingStage=_0, + }, + spruce_sapling => BlockBehavior::default(), { + SpruceSaplingStage=_0, + }, + birch_sapling => BlockBehavior::default(), { + BirchSaplingStage=_0, + }, + jungle_sapling => BlockBehavior::default(), { + JungleSaplingStage=_0, + }, + acacia_sapling => BlockBehavior::default(), { + AcaciaSaplingStage=_0, + }, + dark_oak_sapling => BlockBehavior::default(), { + DarkOakSaplingStage=_0, + }, + mangrove_propagule => BlockBehavior::default(), { + MangrovePropaguleStage=_0, + MangrovePropaguleAge=_0, + Waterlogged=False, + Hanging=False, + }, + bedrock => BlockBehavior::default(), { + }, + water => BlockBehavior::default(), { + WaterLevel=_0, + }, + lava => BlockBehavior::default(), { + LavaLevel=_0, + }, + sand => BlockBehavior::default(), { + }, + red_sand => BlockBehavior::default(), { + }, + gravel => BlockBehavior::default(), { + }, + gold_ore => BlockBehavior::default(), { + }, + deepslate_gold_ore => BlockBehavior::default(), { + }, + iron_ore => BlockBehavior::default(), { + }, + deepslate_iron_ore => BlockBehavior::default(), { + }, + coal_ore => BlockBehavior::default(), { + }, + deepslate_coal_ore => BlockBehavior::default(), { + }, + nether_gold_ore => BlockBehavior::default(), { + }, + oak_log => BlockBehavior::default(), { + Axis=Y, + }, + spruce_log => BlockBehavior::default(), { + Axis=Y, + }, + birch_log => BlockBehavior::default(), { + Axis=Y, + }, + jungle_log => BlockBehavior::default(), { + Axis=Y, + }, + acacia_log => BlockBehavior::default(), { + Axis=Y, + }, + dark_oak_log => BlockBehavior::default(), { + Axis=Y, + }, + mangrove_log => BlockBehavior::default(), { + Axis=Y, + }, + mangrove_roots => BlockBehavior::default(), { + Waterlogged=False, + }, + muddy_mangrove_roots => BlockBehavior::default(), { + Axis=Y, + }, + stripped_spruce_log => BlockBehavior::default(), { + Axis=Y, + }, + stripped_birch_log => BlockBehavior::default(), { + Axis=Y, + }, + stripped_jungle_log => BlockBehavior::default(), { + Axis=Y, + }, + stripped_acacia_log => BlockBehavior::default(), { + Axis=Y, + }, + stripped_dark_oak_log => BlockBehavior::default(), { + Axis=Y, + }, + stripped_oak_log => BlockBehavior::default(), { + Axis=Y, + }, + stripped_mangrove_log => BlockBehavior::default(), { + Axis=Y, + }, + oak_wood => BlockBehavior::default(), { + Axis=Y, + }, + spruce_wood => BlockBehavior::default(), { + Axis=Y, + }, + birch_wood => BlockBehavior::default(), { + Axis=Y, + }, + jungle_wood => BlockBehavior::default(), { + Axis=Y, + }, + acacia_wood => BlockBehavior::default(), { + Axis=Y, + }, + dark_oak_wood => BlockBehavior::default(), { + Axis=Y, + }, + mangrove_wood => BlockBehavior::default(), { + Axis=Y, + }, + stripped_oak_wood => BlockBehavior::default(), { + Axis=Y, + }, + stripped_spruce_wood => BlockBehavior::default(), { + Axis=Y, + }, + stripped_birch_wood => BlockBehavior::default(), { + Axis=Y, + }, + stripped_jungle_wood => BlockBehavior::default(), { + Axis=Y, + }, + stripped_acacia_wood => BlockBehavior::default(), { + Axis=Y, + }, + stripped_dark_oak_wood => BlockBehavior::default(), { + Axis=Y, + }, + stripped_mangrove_wood => BlockBehavior::default(), { + Axis=Y, + }, + oak_leaves => BlockBehavior::default(), { + OakLeavesDistance=_7, + Persistent=False, + Waterlogged=False, + }, + spruce_leaves => BlockBehavior::default(), { + SpruceLeavesDistance=_7, + Persistent=False, + Waterlogged=False, + }, + birch_leaves => BlockBehavior::default(), { + BirchLeavesDistance=_7, + Persistent=False, + Waterlogged=False, + }, + jungle_leaves => BlockBehavior::default(), { + JungleLeavesDistance=_7, + Persistent=False, + Waterlogged=False, + }, + acacia_leaves => BlockBehavior::default(), { + AcaciaLeavesDistance=_7, + Persistent=False, + Waterlogged=False, + }, + dark_oak_leaves => BlockBehavior::default(), { + DarkOakLeavesDistance=_7, + Persistent=False, + Waterlogged=False, + }, + mangrove_leaves => BlockBehavior::default(), { + MangroveLeavesDistance=_7, + Persistent=False, + Waterlogged=False, + }, + azalea_leaves => BlockBehavior::default(), { + AzaleaLeavesDistance=_7, + Persistent=False, + Waterlogged=False, + }, + flowering_azalea_leaves => BlockBehavior::default(), { + FloweringAzaleaLeavesDistance=_7, + Persistent=False, + Waterlogged=False, + }, + sponge => BlockBehavior::default(), { + }, + wet_sponge => BlockBehavior::default(), { + }, + glass => BlockBehavior::default(), { + }, + lapis_ore => BlockBehavior::default(), { + }, + deepslate_lapis_ore => BlockBehavior::default(), { + }, + lapis_block => BlockBehavior::default(), { + }, + dispenser => BlockBehavior::default(), { Facing=North, + Triggered=False, + }, + sandstone => BlockBehavior::default(), { + }, + chiseled_sandstone => BlockBehavior::default(), { + }, + cut_sandstone => BlockBehavior::default(), { + }, + note_block => BlockBehavior::default(), { + Instrument=Harp, + Powered=False, + NoteBlockNote=_0, + }, + white_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + orange_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + magenta_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + light_blue_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + yellow_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + lime_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + pink_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + gray_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + light_gray_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + cyan_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + purple_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + blue_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + brown_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + green_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + red_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + black_bed => BlockBehavior::default(), { + Facing=North, + Part=Foot, + Occupied=False, + }, + powered_rail => BlockBehavior::default(), { + Shape=NorthSouth, + Powered=False, + Waterlogged=False, + }, + detector_rail => BlockBehavior::default(), { + Shape=NorthSouth, + Powered=False, + Waterlogged=False, + }, + sticky_piston => BlockBehavior::default(), { + Facing=North, + Extended=False, + }, + cobweb => BlockBehavior::default(), { + }, + grass => BlockBehavior::default(), { + }, + fern => BlockBehavior::default(), { + }, + dead_bush => BlockBehavior::default(), { + }, + seagrass => BlockBehavior::default(), { + }, + tall_seagrass => BlockBehavior::default(), { + Half=Lower, + }, + piston => BlockBehavior::default(), { + Facing=North, + Extended=False, + }, + piston_head => BlockBehavior::default(), { + Facing=North, + Type=Normal, + Short=False, + }, + white_wool => BlockBehavior::default(), { + }, + orange_wool => BlockBehavior::default(), { + }, + magenta_wool => BlockBehavior::default(), { + }, + light_blue_wool => BlockBehavior::default(), { + }, + yellow_wool => BlockBehavior::default(), { + }, + lime_wool => BlockBehavior::default(), { + }, + pink_wool => BlockBehavior::default(), { + }, + gray_wool => BlockBehavior::default(), { + }, + light_gray_wool => BlockBehavior::default(), { + }, + cyan_wool => BlockBehavior::default(), { + }, + purple_wool => BlockBehavior::default(), { + }, + blue_wool => BlockBehavior::default(), { + }, + brown_wool => BlockBehavior::default(), { + }, + green_wool => BlockBehavior::default(), { + }, + red_wool => BlockBehavior::default(), { + }, + black_wool => BlockBehavior::default(), { + }, + moving_piston => BlockBehavior::default(), { + Facing=North, + Type=Normal, + }, + dandelion => BlockBehavior::default(), { + }, + poppy => BlockBehavior::default(), { + }, + blue_orchid => BlockBehavior::default(), { + }, + allium => BlockBehavior::default(), { + }, + azure_bluet => BlockBehavior::default(), { + }, + red_tulip => BlockBehavior::default(), { + }, + orange_tulip => BlockBehavior::default(), { + }, + white_tulip => BlockBehavior::default(), { + }, + pink_tulip => BlockBehavior::default(), { + }, + oxeye_daisy => BlockBehavior::default(), { + }, + cornflower => BlockBehavior::default(), { + }, + wither_rose => BlockBehavior::default(), { + }, + lily_of_the_valley => BlockBehavior::default(), { + }, + brown_mushroom => BlockBehavior::default(), { + }, + red_mushroom => BlockBehavior::default(), { + }, + gold_block => BlockBehavior::default(), { + }, + iron_block => BlockBehavior::default(), { + }, + bricks => BlockBehavior::default(), { + }, + tnt => BlockBehavior::default(), { + Unstable=False, + }, + bookshelf => BlockBehavior::default(), { + }, + mossy_cobblestone => BlockBehavior::default(), { + }, + obsidian => BlockBehavior::default(), { + }, + torch => BlockBehavior::default(), { + }, + wall_torch => BlockBehavior::default(), { + Facing=North, + }, + fire => BlockBehavior::default(), { + FireAge=_0, + North=False, + East=False, + South=False, + West=False, + Up=False, + }, + soul_fire => BlockBehavior::default(), { + }, + spawner => BlockBehavior::default(), { + }, + oak_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + chest => BlockBehavior::default(), { + Facing=North, + Type=Single, + Waterlogged=False, + }, + redstone_wire => BlockBehavior::default(), { + North=None, + East=None, + South=None, + West=None, + RedstoneWirePower=_0, + }, + diamond_ore => BlockBehavior::default(), { + }, + deepslate_diamond_ore => BlockBehavior::default(), { + }, + diamond_block => BlockBehavior::default(), { + }, + crafting_table => BlockBehavior::default(), { + }, + wheat => BlockBehavior::default(), { + WheatAge=_0, + }, + farmland => BlockBehavior::default(), { + FarmlandMoisture=_0, + }, + furnace => BlockBehavior::default(), { + Facing=North, + Lit=False, + }, + oak_sign => BlockBehavior::default(), { + OakSignRotation=_0, + Waterlogged=False, + }, + spruce_sign => BlockBehavior::default(), { + SpruceSignRotation=_0, + Waterlogged=False, + }, + birch_sign => BlockBehavior::default(), { + BirchSignRotation=_0, + Waterlogged=False, + }, + acacia_sign => BlockBehavior::default(), { + AcaciaSignRotation=_0, + Waterlogged=False, + }, + jungle_sign => BlockBehavior::default(), { + JungleSignRotation=_0, + Waterlogged=False, + }, + dark_oak_sign => BlockBehavior::default(), { + DarkOakSignRotation=_0, + Waterlogged=False, + }, + mangrove_sign => BlockBehavior::default(), { + MangroveSignRotation=_0, + Waterlogged=False, + }, + oak_door => BlockBehavior::default(), { + Half=Lower, + Facing=North, + Open=False, + Hinge=Left, + Powered=False, + }, + ladder => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + rail => BlockBehavior::default(), { + Shape=NorthSouth, + Waterlogged=False, + }, + cobblestone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + oak_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + spruce_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + birch_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + acacia_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + jungle_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + dark_oak_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + mangrove_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + lever => BlockBehavior::default(), { + Face=Wall, + Facing=North, + Powered=False, + }, + stone_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + iron_door => BlockBehavior::default(), { + Half=Lower, + Facing=North, + Open=False, + Hinge=Left, + Powered=False, + }, + oak_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + spruce_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + birch_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + jungle_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + acacia_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + dark_oak_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + mangrove_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + redstone_ore => BlockBehavior::default(), { + Lit=False, + }, + deepslate_redstone_ore => BlockBehavior::default(), { + Lit=False, + }, + redstone_torch => BlockBehavior::default(), { + Lit=True, + }, + redstone_wall_torch => BlockBehavior::default(), { + Facing=North, + Lit=True, + }, + stone_button => BlockBehavior::default(), { + Facing=North, + Powered=False, + Face=Wall, + }, + snow => BlockBehavior::default(), { + SnowLayers=_1, + }, + ice => BlockBehavior::default(), { + }, + snow_block => BlockBehavior::default(), { + }, + cactus => BlockBehavior::default(), { + CactusAge=_0, + }, + clay => BlockBehavior::default(), { + }, + sugar_cane => BlockBehavior::default(), { + SugarCaneAge=_0, + }, + jukebox => BlockBehavior::default(), { + HasRecord=False, + }, + oak_fence => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + pumpkin => BlockBehavior::default(), { + }, + netherrack => BlockBehavior::default(), { + }, + soul_sand => BlockBehavior::default(), { + }, + soul_soil => BlockBehavior::default(), { + }, + basalt => BlockBehavior::default(), { + Axis=Y, + }, + polished_basalt => BlockBehavior::default(), { + Axis=Y, + }, + soul_torch => BlockBehavior::default(), { + }, + soul_wall_torch => BlockBehavior::default(), { + Facing=North, + }, + glowstone => BlockBehavior::default(), { + }, + nether_portal => BlockBehavior::default(), { + Axis=X, + }, + carved_pumpkin => BlockBehavior::default(), { + Facing=North, + }, + jack_o_lantern => BlockBehavior::default(), { + Facing=North, + }, + cake => BlockBehavior::default(), { + CakeBites=_0, + }, + repeater => BlockBehavior::default(), { + Facing=North, + RepeaterDelay=_1, + Locked=False, + Powered=False, + }, + white_stained_glass => BlockBehavior::default(), { + }, + orange_stained_glass => BlockBehavior::default(), { + }, + magenta_stained_glass => BlockBehavior::default(), { + }, + light_blue_stained_glass => BlockBehavior::default(), { + }, + yellow_stained_glass => BlockBehavior::default(), { + }, + lime_stained_glass => BlockBehavior::default(), { + }, + pink_stained_glass => BlockBehavior::default(), { + }, + gray_stained_glass => BlockBehavior::default(), { + }, + light_gray_stained_glass => BlockBehavior::default(), { + }, + cyan_stained_glass => BlockBehavior::default(), { + }, + purple_stained_glass => BlockBehavior::default(), { + }, + blue_stained_glass => BlockBehavior::default(), { + }, + brown_stained_glass => BlockBehavior::default(), { + }, + green_stained_glass => BlockBehavior::default(), { + }, + red_stained_glass => BlockBehavior::default(), { + }, + black_stained_glass => BlockBehavior::default(), { + }, + oak_trapdoor => BlockBehavior::default(), { + Facing=North, + Open=False, + Half=Bottom, + Powered=False, + Waterlogged=False, + }, + spruce_trapdoor => BlockBehavior::default(), { + Facing=North, + Open=False, + Half=Bottom, + Powered=False, + Waterlogged=False, + }, + birch_trapdoor => BlockBehavior::default(), { + Facing=North, + Open=False, + Half=Bottom, + Powered=False, + Waterlogged=False, + }, + jungle_trapdoor => BlockBehavior::default(), { + Facing=North, + Open=False, + Half=Bottom, + Powered=False, + Waterlogged=False, + }, + acacia_trapdoor => BlockBehavior::default(), { + Facing=North, + Open=False, + Half=Bottom, + Powered=False, + Waterlogged=False, + }, + dark_oak_trapdoor => BlockBehavior::default(), { + Facing=North, + Open=False, + Half=Bottom, + Powered=False, + Waterlogged=False, + }, + mangrove_trapdoor => BlockBehavior::default(), { + Facing=North, + Open=False, + Half=Bottom, + Powered=False, + Waterlogged=False, + }, + stone_bricks => BlockBehavior::default(), { + }, + mossy_stone_bricks => BlockBehavior::default(), { + }, + cracked_stone_bricks => BlockBehavior::default(), { + }, + chiseled_stone_bricks => BlockBehavior::default(), { + }, + packed_mud => BlockBehavior::default(), { + }, + mud_bricks => BlockBehavior::default(), { + }, + infested_stone => BlockBehavior::default(), { + }, + infested_cobblestone => BlockBehavior::default(), { + }, + infested_stone_bricks => BlockBehavior::default(), { + }, + infested_mossy_stone_bricks => BlockBehavior::default(), { + }, + infested_cracked_stone_bricks => BlockBehavior::default(), { + }, + infested_chiseled_stone_bricks => BlockBehavior::default(), { + }, + brown_mushroom_block => BlockBehavior::default(), { + Up=True, + Down=True, + North=True, + East=True, + South=True, + West=True, + }, + red_mushroom_block => BlockBehavior::default(), { + Up=True, + Down=True, + North=True, + East=True, + South=True, + West=True, + }, + mushroom_stem => BlockBehavior::default(), { + Up=True, + Down=True, + North=True, + East=True, + South=True, + West=True, + }, + iron_bars => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + chain => BlockBehavior::default(), { + Waterlogged=False, + Axis=Y, + }, + glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + melon => BlockBehavior::default(), { + }, + attached_pumpkin_stem => BlockBehavior::default(), { + Facing=North, + }, + attached_melon_stem => BlockBehavior::default(), { + Facing=North, + }, + pumpkin_stem => BlockBehavior::default(), { + PumpkinStemAge=_0, + }, + melon_stem => BlockBehavior::default(), { + MelonStemAge=_0, + }, + vine => BlockBehavior::default(), { + Up=False, + North=False, + East=False, + South=False, + West=False, + }, + glow_lichen => BlockBehavior::default(), { + }, + oak_fence_gate => BlockBehavior::default(), { + Facing=North, + Open=False, + Powered=False, + InWall=False, + }, + brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + stone_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + mud_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + mycelium => BlockBehavior::default(), { + Snowy=False, + }, + lily_pad => BlockBehavior::default(), { + }, + nether_bricks => BlockBehavior::default(), { + }, + nether_brick_fence => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + nether_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + nether_wart => BlockBehavior::default(), { + NetherWartAge=_0, + }, + enchanting_table => BlockBehavior::default(), { }, brewing_stand => BlockBehavior::default(), { HasBottle=False, HasBottle=False, HasBottle=False, }, + cauldron => BlockBehavior::default(), { + }, + water_cauldron => BlockBehavior::default(), { + WaterCauldronLevel=_1, + }, + lava_cauldron => BlockBehavior::default(), { + }, + powder_snow_cauldron => BlockBehavior::default(), { + PowderSnowCauldronLevel=_1, + }, + end_portal => BlockBehavior::default(), { + }, + end_portal_frame => BlockBehavior::default(), { + Facing=North, + HasEye=False, + }, + end_stone => BlockBehavior::default(), { + }, + dragon_egg => BlockBehavior::default(), { + }, + redstone_lamp => BlockBehavior::default(), { + Lit=False, + }, + cocoa => BlockBehavior::default(), { + Facing=North, + CocoaAge=_0, + }, + sandstone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + emerald_ore => BlockBehavior::default(), { + }, + deepslate_emerald_ore => BlockBehavior::default(), { + }, + ender_chest => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + tripwire_hook => BlockBehavior::default(), { + Facing=North, + Powered=False, + Attached=False, + }, + tripwire => BlockBehavior::default(), { + Powered=False, + Attached=False, + Disarmed=False, + North=False, + East=False, + West=False, + South=False, + }, + emerald_block => BlockBehavior::default(), { + }, + spruce_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + birch_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + jungle_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + command_block => BlockBehavior::default(), { + Facing=North, + Conditional=False, + }, + beacon => BlockBehavior::default(), { + }, + cobblestone_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + mossy_cobblestone_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + flower_pot => BlockBehavior::default(), { + }, + potted_oak_sapling => BlockBehavior::default(), { + }, + potted_spruce_sapling => BlockBehavior::default(), { + }, + potted_birch_sapling => BlockBehavior::default(), { + }, + potted_jungle_sapling => BlockBehavior::default(), { + }, + potted_acacia_sapling => BlockBehavior::default(), { + }, + potted_dark_oak_sapling => BlockBehavior::default(), { + }, + potted_mangrove_propagule => BlockBehavior::default(), { + }, + potted_fern => BlockBehavior::default(), { + }, + potted_dandelion => BlockBehavior::default(), { + }, + potted_poppy => BlockBehavior::default(), { + }, + potted_blue_orchid => BlockBehavior::default(), { + }, + potted_allium => BlockBehavior::default(), { + }, + potted_azure_bluet => BlockBehavior::default(), { + }, + potted_red_tulip => BlockBehavior::default(), { + }, + potted_orange_tulip => BlockBehavior::default(), { + }, + potted_white_tulip => BlockBehavior::default(), { + }, + potted_pink_tulip => BlockBehavior::default(), { + }, + potted_oxeye_daisy => BlockBehavior::default(), { + }, + potted_cornflower => BlockBehavior::default(), { + }, + potted_lily_of_the_valley => BlockBehavior::default(), { + }, + potted_wither_rose => BlockBehavior::default(), { + }, + potted_red_mushroom => BlockBehavior::default(), { + }, + potted_brown_mushroom => BlockBehavior::default(), { + }, + potted_dead_bush => BlockBehavior::default(), { + }, + potted_cactus => BlockBehavior::default(), { + }, + carrots => BlockBehavior::default(), { + CarrotsAge=_0, + }, + potatoes => BlockBehavior::default(), { + PotatoesAge=_0, + }, + oak_button => BlockBehavior::default(), { + Facing=North, + Powered=False, + Face=Wall, + }, + spruce_button => BlockBehavior::default(), { + Facing=North, + Powered=False, + Face=Wall, + }, + birch_button => BlockBehavior::default(), { + Facing=North, + Powered=False, + Face=Wall, + }, + jungle_button => BlockBehavior::default(), { + Facing=North, + Powered=False, + Face=Wall, + }, + acacia_button => BlockBehavior::default(), { + Facing=North, + Powered=False, + Face=Wall, + }, + dark_oak_button => BlockBehavior::default(), { + Facing=North, + Powered=False, + Face=Wall, + }, + mangrove_button => BlockBehavior::default(), { + Facing=North, + Powered=False, + Face=Wall, + }, + skeleton_skull => BlockBehavior::default(), { + SkeletonSkullRotation=_0, + }, + skeleton_wall_skull => BlockBehavior::default(), { + Facing=North, + }, + wither_skeleton_skull => BlockBehavior::default(), { + WitherSkeletonSkullRotation=_0, + }, + wither_skeleton_wall_skull => BlockBehavior::default(), { + Facing=North, + }, + zombie_head => BlockBehavior::default(), { + ZombieHeadRotation=_0, + }, + zombie_wall_head => BlockBehavior::default(), { + Facing=North, + }, + player_head => BlockBehavior::default(), { + PlayerHeadRotation=_0, + }, + player_wall_head => BlockBehavior::default(), { + Facing=North, + }, + creeper_head => BlockBehavior::default(), { + CreeperHeadRotation=_0, + }, + creeper_wall_head => BlockBehavior::default(), { + Facing=North, + }, + dragon_head => BlockBehavior::default(), { + DragonHeadRotation=_0, + }, + dragon_wall_head => BlockBehavior::default(), { + Facing=North, + }, + anvil => BlockBehavior::default(), { + Facing=North, + }, + chipped_anvil => BlockBehavior::default(), { + Facing=North, + }, + damaged_anvil => BlockBehavior::default(), { + Facing=North, + }, + trapped_chest => BlockBehavior::default(), { + Facing=North, + Type=Single, + Waterlogged=False, + }, + light_weighted_pressure_plate => BlockBehavior::default(), { + LightWeightedPressurePlatePower=_0, + }, + heavy_weighted_pressure_plate => BlockBehavior::default(), { + HeavyWeightedPressurePlatePower=_0, + }, + comparator => BlockBehavior::default(), { + Facing=North, + Mode=Compare, + Powered=False, + }, + daylight_detector => BlockBehavior::default(), { + DaylightDetectorPower=_0, + Inverted=False, + }, + redstone_block => BlockBehavior::default(), { + }, + nether_quartz_ore => BlockBehavior::default(), { + }, + hopper => BlockBehavior::default(), { + Facing=Down, + Enabled=True, + }, + quartz_block => BlockBehavior::default(), { + }, + chiseled_quartz_block => BlockBehavior::default(), { + }, + quartz_pillar => BlockBehavior::default(), { + Axis=Y, + }, + quartz_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + activator_rail => BlockBehavior::default(), { + Shape=NorthSouth, + Powered=False, + Waterlogged=False, + }, + dropper => BlockBehavior::default(), { + Facing=North, + Triggered=False, + }, + white_terracotta => BlockBehavior::default(), { + }, + orange_terracotta => BlockBehavior::default(), { + }, + magenta_terracotta => BlockBehavior::default(), { + }, + light_blue_terracotta => BlockBehavior::default(), { + }, + yellow_terracotta => BlockBehavior::default(), { + }, + lime_terracotta => BlockBehavior::default(), { + }, + pink_terracotta => BlockBehavior::default(), { + }, + gray_terracotta => BlockBehavior::default(), { + }, + light_gray_terracotta => BlockBehavior::default(), { + }, + cyan_terracotta => BlockBehavior::default(), { + }, + purple_terracotta => BlockBehavior::default(), { + }, + blue_terracotta => BlockBehavior::default(), { + }, + brown_terracotta => BlockBehavior::default(), { + }, + green_terracotta => BlockBehavior::default(), { + }, + red_terracotta => BlockBehavior::default(), { + }, + black_terracotta => BlockBehavior::default(), { + }, + white_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + orange_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + magenta_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + light_blue_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + yellow_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + lime_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + pink_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + gray_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + light_gray_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + cyan_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + purple_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + blue_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + brown_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + green_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + red_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + black_stained_glass_pane => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + acacia_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + dark_oak_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + mangrove_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + slime_block => BlockBehavior::default(), { + }, + barrier => BlockBehavior::default(), { + }, + light => BlockBehavior::default(), { + LightLevel=_15, + Waterlogged=False, + }, + iron_trapdoor => BlockBehavior::default(), { + Facing=North, + Open=False, + Half=Bottom, + Powered=False, + Waterlogged=False, + }, + prismarine => BlockBehavior::default(), { + }, + prismarine_bricks => BlockBehavior::default(), { + }, + dark_prismarine => BlockBehavior::default(), { + }, + prismarine_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + prismarine_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + dark_prismarine_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + prismarine_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + prismarine_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + dark_prismarine_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + sea_lantern => BlockBehavior::default(), { + }, + hay_block => BlockBehavior::default(), { + Axis=Y, + }, + white_carpet => BlockBehavior::default(), { + }, + orange_carpet => BlockBehavior::default(), { + }, + magenta_carpet => BlockBehavior::default(), { + }, + light_blue_carpet => BlockBehavior::default(), { + }, + yellow_carpet => BlockBehavior::default(), { + }, + lime_carpet => BlockBehavior::default(), { + }, + pink_carpet => BlockBehavior::default(), { + }, + gray_carpet => BlockBehavior::default(), { + }, + light_gray_carpet => BlockBehavior::default(), { + }, + cyan_carpet => BlockBehavior::default(), { + }, + purple_carpet => BlockBehavior::default(), { + }, + blue_carpet => BlockBehavior::default(), { + }, + brown_carpet => BlockBehavior::default(), { + }, + green_carpet => BlockBehavior::default(), { + }, + red_carpet => BlockBehavior::default(), { + }, + black_carpet => BlockBehavior::default(), { + }, + terracotta => BlockBehavior::default(), { + }, + coal_block => BlockBehavior::default(), { + }, + packed_ice => BlockBehavior::default(), { + }, + sunflower => BlockBehavior::default(), { + Half=Lower, + }, + lilac => BlockBehavior::default(), { + Half=Lower, + }, + rose_bush => BlockBehavior::default(), { + Half=Lower, + }, + peony => BlockBehavior::default(), { + Half=Lower, + }, + tall_grass => BlockBehavior::default(), { + Half=Lower, + }, + large_fern => BlockBehavior::default(), { + Half=Lower, + }, + white_banner => BlockBehavior::default(), { + WhiteBannerRotation=_0, + }, + orange_banner => BlockBehavior::default(), { + OrangeBannerRotation=_0, + }, + magenta_banner => BlockBehavior::default(), { + MagentaBannerRotation=_0, + }, + light_blue_banner => BlockBehavior::default(), { + LightBlueBannerRotation=_0, + }, + yellow_banner => BlockBehavior::default(), { + YellowBannerRotation=_0, + }, + lime_banner => BlockBehavior::default(), { + LimeBannerRotation=_0, + }, + pink_banner => BlockBehavior::default(), { + PinkBannerRotation=_0, + }, + gray_banner => BlockBehavior::default(), { + GrayBannerRotation=_0, + }, + light_gray_banner => BlockBehavior::default(), { + LightGrayBannerRotation=_0, + }, + cyan_banner => BlockBehavior::default(), { + CyanBannerRotation=_0, + }, + purple_banner => BlockBehavior::default(), { + PurpleBannerRotation=_0, + }, + blue_banner => BlockBehavior::default(), { + BlueBannerRotation=_0, + }, + brown_banner => BlockBehavior::default(), { + BrownBannerRotation=_0, + }, + green_banner => BlockBehavior::default(), { + GreenBannerRotation=_0, + }, + red_banner => BlockBehavior::default(), { + RedBannerRotation=_0, + }, + black_banner => BlockBehavior::default(), { + BlackBannerRotation=_0, + }, + white_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + orange_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + magenta_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + light_blue_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + yellow_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + lime_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + pink_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + gray_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + light_gray_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + cyan_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + purple_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + blue_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + brown_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + green_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + red_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + black_wall_banner => BlockBehavior::default(), { + Facing=North, + }, + red_sandstone => BlockBehavior::default(), { + }, + chiseled_red_sandstone => BlockBehavior::default(), { + }, + cut_red_sandstone => BlockBehavior::default(), { + }, + red_sandstone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + oak_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + spruce_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + birch_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + jungle_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + acacia_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + dark_oak_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + mangrove_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + stone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + smooth_stone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + sandstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + cut_sandstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + petrified_oak_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + cobblestone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + stone_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + mud_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + nether_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + quartz_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + red_sandstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + cut_red_sandstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + purpur_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + smooth_stone => BlockBehavior::default(), { + }, + smooth_sandstone => BlockBehavior::default(), { + }, + smooth_quartz => BlockBehavior::default(), { + }, + smooth_red_sandstone => BlockBehavior::default(), { + }, + spruce_fence_gate => BlockBehavior::default(), { + Facing=North, + Open=False, + Powered=False, + InWall=False, + }, + birch_fence_gate => BlockBehavior::default(), { + Facing=North, + Open=False, + Powered=False, + InWall=False, + }, + jungle_fence_gate => BlockBehavior::default(), { + Facing=North, + Open=False, + Powered=False, + InWall=False, + }, + acacia_fence_gate => BlockBehavior::default(), { + Facing=North, + Open=False, + Powered=False, + InWall=False, + }, + dark_oak_fence_gate => BlockBehavior::default(), { + Facing=North, + Open=False, + Powered=False, + InWall=False, + }, + mangrove_fence_gate => BlockBehavior::default(), { + Facing=North, + Open=False, + Powered=False, + InWall=False, + }, + spruce_fence => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + birch_fence => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + jungle_fence => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + acacia_fence => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + dark_oak_fence => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + mangrove_fence => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + spruce_door => BlockBehavior::default(), { + Half=Lower, + Facing=North, + Open=False, + Hinge=Left, + Powered=False, + }, + birch_door => BlockBehavior::default(), { + Half=Lower, + Facing=North, + Open=False, + Hinge=Left, + Powered=False, + }, + jungle_door => BlockBehavior::default(), { + Half=Lower, + Facing=North, + Open=False, + Hinge=Left, + Powered=False, + }, + acacia_door => BlockBehavior::default(), { + Half=Lower, + Facing=North, + Open=False, + Hinge=Left, + Powered=False, + }, + dark_oak_door => BlockBehavior::default(), { + Half=Lower, + Facing=North, + Open=False, + Hinge=Left, + Powered=False, + }, + mangrove_door => BlockBehavior::default(), { + Half=Lower, + Facing=North, + Open=False, + Hinge=Left, + Powered=False, + }, + end_rod => BlockBehavior::default(), { + Facing=Up, + }, + chorus_plant => BlockBehavior::default(), { + North=False, + East=False, + South=False, + West=False, + Up=False, + Down=False, + }, + chorus_flower => BlockBehavior::default(), { + ChorusFlowerAge=_0, + }, + purpur_block => BlockBehavior::default(), { + }, + purpur_pillar => BlockBehavior::default(), { + Axis=Y, + }, + purpur_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + end_stone_bricks => BlockBehavior::default(), { + }, + beetroots => BlockBehavior::default(), { + BeetrootsAge=_0, + }, + dirt_path => BlockBehavior::default(), { + }, + end_gateway => BlockBehavior::default(), { + }, + repeating_command_block => BlockBehavior::default(), { + Facing=North, + Conditional=False, + }, + chain_command_block => BlockBehavior::default(), { + Facing=North, + Conditional=False, + }, + frosted_ice => BlockBehavior::default(), { + FrostedIceAge=_0, + }, + magma_block => BlockBehavior::default(), { + }, + nether_wart_block => BlockBehavior::default(), { + }, + red_nether_bricks => BlockBehavior::default(), { + }, + bone_block => BlockBehavior::default(), { + Axis=Y, + }, + structure_void => BlockBehavior::default(), { + }, + observer => BlockBehavior::default(), { + Facing=South, + Powered=False, + }, + shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + white_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + orange_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + magenta_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + light_blue_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + yellow_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + lime_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + pink_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + gray_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + light_gray_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + cyan_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + purple_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + blue_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + brown_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + green_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + red_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + black_shulker_box => BlockBehavior::default(), { + Facing=Up, + }, + white_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + orange_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + magenta_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + light_blue_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + yellow_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + lime_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + pink_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + gray_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + light_gray_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + cyan_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + purple_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + blue_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + brown_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + green_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + red_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + black_glazed_terracotta => BlockBehavior::default(), { + Facing=North, + }, + white_concrete => BlockBehavior::default(), { + }, + orange_concrete => BlockBehavior::default(), { + }, + magenta_concrete => BlockBehavior::default(), { + }, + light_blue_concrete => BlockBehavior::default(), { + }, + yellow_concrete => BlockBehavior::default(), { + }, + lime_concrete => BlockBehavior::default(), { + }, + pink_concrete => BlockBehavior::default(), { + }, + gray_concrete => BlockBehavior::default(), { + }, + light_gray_concrete => BlockBehavior::default(), { + }, + cyan_concrete => BlockBehavior::default(), { + }, + purple_concrete => BlockBehavior::default(), { + }, + blue_concrete => BlockBehavior::default(), { + }, + brown_concrete => BlockBehavior::default(), { + }, + green_concrete => BlockBehavior::default(), { + }, + red_concrete => BlockBehavior::default(), { + }, + black_concrete => BlockBehavior::default(), { + }, + white_concrete_powder => BlockBehavior::default(), { + }, + orange_concrete_powder => BlockBehavior::default(), { + }, + magenta_concrete_powder => BlockBehavior::default(), { + }, + light_blue_concrete_powder => BlockBehavior::default(), { + }, + yellow_concrete_powder => BlockBehavior::default(), { + }, + lime_concrete_powder => BlockBehavior::default(), { + }, + pink_concrete_powder => BlockBehavior::default(), { + }, + gray_concrete_powder => BlockBehavior::default(), { + }, + light_gray_concrete_powder => BlockBehavior::default(), { + }, + cyan_concrete_powder => BlockBehavior::default(), { + }, + purple_concrete_powder => BlockBehavior::default(), { + }, + blue_concrete_powder => BlockBehavior::default(), { + }, + brown_concrete_powder => BlockBehavior::default(), { + }, + green_concrete_powder => BlockBehavior::default(), { + }, + red_concrete_powder => BlockBehavior::default(), { + }, + black_concrete_powder => BlockBehavior::default(), { + }, + kelp => BlockBehavior::default(), { + KelpAge=_0, + }, + kelp_plant => BlockBehavior::default(), { + }, + dried_kelp_block => BlockBehavior::default(), { + }, + turtle_egg => BlockBehavior::default(), { + TurtleEggHatch=_0, + TurtleEggEggs=_1, + }, + dead_tube_coral_block => BlockBehavior::default(), { + }, + dead_brain_coral_block => BlockBehavior::default(), { + }, + dead_bubble_coral_block => BlockBehavior::default(), { + }, + dead_fire_coral_block => BlockBehavior::default(), { + }, + dead_horn_coral_block => BlockBehavior::default(), { + }, + tube_coral_block => BlockBehavior::default(), { + }, + brain_coral_block => BlockBehavior::default(), { + }, + bubble_coral_block => BlockBehavior::default(), { + }, + fire_coral_block => BlockBehavior::default(), { + }, + horn_coral_block => BlockBehavior::default(), { + }, + dead_tube_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_brain_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_bubble_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_fire_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_horn_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + tube_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + brain_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + bubble_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + fire_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + horn_coral => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_tube_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_brain_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_bubble_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_fire_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_horn_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + tube_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + brain_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + bubble_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + fire_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + horn_coral_fan => BlockBehavior::default(), { + Waterlogged=True, + }, + dead_tube_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + dead_brain_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + dead_bubble_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + dead_fire_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + dead_horn_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + tube_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + brain_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + bubble_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + fire_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + horn_coral_wall_fan => BlockBehavior::default(), { + Facing=North, + Waterlogged=True, + }, + sea_pickle => BlockBehavior::default(), { + SeaPicklePickles=_1, + Waterlogged=True, + }, + blue_ice => BlockBehavior::default(), { + }, + conduit => BlockBehavior::default(), { + Waterlogged=True, + }, + bamboo_sapling => BlockBehavior::default(), { + }, + bamboo => BlockBehavior::default(), { + BambooAge=_0, + Leaves=None, + BambooStage=_0, + }, + potted_bamboo => BlockBehavior::default(), { + }, + void_air => BlockBehavior::default(), { + }, + cave_air => BlockBehavior::default(), { + }, + bubble_column => BlockBehavior::default(), { + DragDown=True, + }, + polished_granite_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + smooth_red_sandstone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + mossy_stone_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + polished_diorite_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + mossy_cobblestone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + end_stone_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + stone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + smooth_sandstone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + smooth_quartz_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + granite_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + andesite_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + red_nether_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + polished_andesite_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + diorite_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + polished_granite_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + smooth_red_sandstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + mossy_stone_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + polished_diorite_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + mossy_cobblestone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + end_stone_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + smooth_sandstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + smooth_quartz_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + granite_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + andesite_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + red_nether_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + polished_andesite_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + diorite_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + brick_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + prismarine_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + red_sandstone_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + mossy_stone_brick_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + granite_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + stone_brick_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + mud_brick_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + nether_brick_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + andesite_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + red_nether_brick_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + sandstone_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + end_stone_brick_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + diorite_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + scaffolding => BlockBehavior::default(), { + ScaffoldingDistance=_7, + Waterlogged=False, + Bottom=False, + }, + loom => BlockBehavior::default(), { + Facing=North, + }, + barrel => BlockBehavior::default(), { + Facing=North, + Open=False, + }, + smoker => BlockBehavior::default(), { + Facing=North, + Lit=False, + }, + blast_furnace => BlockBehavior::default(), { + Facing=North, + Lit=False, + }, + cartography_table => BlockBehavior::default(), { + }, + fletching_table => BlockBehavior::default(), { + }, + grindstone => BlockBehavior::default(), { + Facing=North, + Face=Wall, + }, + lectern => BlockBehavior::default(), { + Facing=North, + Powered=False, + HasBook=False, + }, + smithing_table => BlockBehavior::default(), { + }, + stonecutter => BlockBehavior::default(), { + Facing=North, + }, + bell => BlockBehavior::default(), { + Facing=North, + Attachment=Floor, + Powered=False, + }, + lantern => BlockBehavior::default(), { + Hanging=False, + Waterlogged=False, + }, + soul_lantern => BlockBehavior::default(), { + Hanging=False, + Waterlogged=False, + }, + campfire => BlockBehavior::default(), { + Lit=True, + SignalFire=False, + Waterlogged=False, + Facing=North, + }, + soul_campfire => BlockBehavior::default(), { + Lit=True, + SignalFire=False, + Waterlogged=False, + Facing=North, + }, + sweet_berry_bush => BlockBehavior::default(), { + SweetBerryBushAge=_0, + }, + warped_stem => BlockBehavior::default(), { + Axis=Y, + }, + stripped_warped_stem => BlockBehavior::default(), { + Axis=Y, + }, + warped_hyphae => BlockBehavior::default(), { + Axis=Y, + }, + stripped_warped_hyphae => BlockBehavior::default(), { + Axis=Y, + }, + warped_nylium => BlockBehavior::default(), { + }, + warped_fungus => BlockBehavior::default(), { + }, + warped_wart_block => BlockBehavior::default(), { + }, + warped_roots => BlockBehavior::default(), { + }, + nether_sprouts => BlockBehavior::default(), { + }, + crimson_stem => BlockBehavior::default(), { + Axis=Y, + }, + stripped_crimson_stem => BlockBehavior::default(), { + Axis=Y, + }, + crimson_hyphae => BlockBehavior::default(), { + Axis=Y, + }, + stripped_crimson_hyphae => BlockBehavior::default(), { + Axis=Y, + }, + crimson_nylium => BlockBehavior::default(), { + }, + crimson_fungus => BlockBehavior::default(), { + }, + shroomlight => BlockBehavior::default(), { + }, + weeping_vines => BlockBehavior::default(), { + WeepingVinesAge=_0, + }, + weeping_vines_plant => BlockBehavior::default(), { + }, + twisting_vines => BlockBehavior::default(), { + TwistingVinesAge=_0, + }, + twisting_vines_plant => BlockBehavior::default(), { + }, + crimson_roots => BlockBehavior::default(), { + }, + crimson_planks => BlockBehavior::default(), { + }, + warped_planks => BlockBehavior::default(), { + }, + crimson_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + warped_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + crimson_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + warped_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + crimson_fence => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + warped_fence => BlockBehavior::default(), { + North=False, + East=False, + West=False, + South=False, + Waterlogged=False, + }, + crimson_trapdoor => BlockBehavior::default(), { + Facing=North, + Open=False, + Half=Bottom, + Powered=False, + Waterlogged=False, + }, + warped_trapdoor => BlockBehavior::default(), { + Facing=North, + Open=False, + Half=Bottom, + Powered=False, + Waterlogged=False, + }, + crimson_fence_gate => BlockBehavior::default(), { + Facing=North, + Open=False, + Powered=False, + InWall=False, + }, + warped_fence_gate => BlockBehavior::default(), { + Facing=North, + Open=False, + Powered=False, + InWall=False, + }, + crimson_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + warped_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + crimson_button => BlockBehavior::default(), { + Facing=North, + Powered=False, + Face=Wall, + }, + warped_button => BlockBehavior::default(), { + Facing=North, + Powered=False, + Face=Wall, + }, + crimson_door => BlockBehavior::default(), { + Half=Lower, + Facing=North, + Open=False, + Hinge=Left, + Powered=False, + }, + warped_door => BlockBehavior::default(), { + Half=Lower, + Facing=North, + Open=False, + Hinge=Left, + Powered=False, + }, + crimson_sign => BlockBehavior::default(), { + CrimsonSignRotation=_0, + Waterlogged=False, + }, + warped_sign => BlockBehavior::default(), { + WarpedSignRotation=_0, + Waterlogged=False, + }, + crimson_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + warped_wall_sign => BlockBehavior::default(), { + Facing=North, + Waterlogged=False, + }, + structure_block => BlockBehavior::default(), { + Mode=Load, + }, + jigsaw => BlockBehavior::default(), { + Orientation=NorthUp, + }, + composter => BlockBehavior::default(), { + ComposterLevel=_0, + }, + target => BlockBehavior::default(), { + TargetOutputPower=_0, + }, + bee_nest => BlockBehavior::default(), { + BeeNestHoneyLevel=_0, + Facing=North, + }, + beehive => BlockBehavior::default(), { + BeehiveHoneyLevel=_0, + Facing=North, + }, + honey_block => BlockBehavior::default(), { + }, + honeycomb_block => BlockBehavior::default(), { + }, + netherite_block => BlockBehavior::default(), { + }, + ancient_debris => BlockBehavior::default(), { + }, + crying_obsidian => BlockBehavior::default(), { + }, + respawn_anchor => BlockBehavior::default(), { + RespawnAnchorCharge=_0, + }, + potted_crimson_fungus => BlockBehavior::default(), { + }, + potted_warped_fungus => BlockBehavior::default(), { + }, + potted_crimson_roots => BlockBehavior::default(), { + }, + potted_warped_roots => BlockBehavior::default(), { + }, + lodestone => BlockBehavior::default(), { + }, + blackstone => BlockBehavior::default(), { + }, + blackstone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + blackstone_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + blackstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + polished_blackstone => BlockBehavior::default(), { + }, + polished_blackstone_bricks => BlockBehavior::default(), { + }, + cracked_polished_blackstone_bricks => BlockBehavior::default(), { + }, + chiseled_polished_blackstone => BlockBehavior::default(), { + }, + polished_blackstone_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + polished_blackstone_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + polished_blackstone_brick_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + gilded_blackstone => BlockBehavior::default(), { + }, + polished_blackstone_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + polished_blackstone_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + polished_blackstone_pressure_plate => BlockBehavior::default(), { + Powered=False, + }, + polished_blackstone_button => BlockBehavior::default(), { + Facing=North, + Powered=False, + Face=Wall, + }, + polished_blackstone_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + chiseled_nether_bricks => BlockBehavior::default(), { + }, + cracked_nether_bricks => BlockBehavior::default(), { + }, + quartz_bricks => BlockBehavior::default(), { + }, + candle => BlockBehavior::default(), { + CandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + white_candle => BlockBehavior::default(), { + WhiteCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + orange_candle => BlockBehavior::default(), { + OrangeCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + magenta_candle => BlockBehavior::default(), { + MagentaCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + light_blue_candle => BlockBehavior::default(), { + LightBlueCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + yellow_candle => BlockBehavior::default(), { + YellowCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + lime_candle => BlockBehavior::default(), { + LimeCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + pink_candle => BlockBehavior::default(), { + PinkCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + gray_candle => BlockBehavior::default(), { + GrayCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + light_gray_candle => BlockBehavior::default(), { + LightGrayCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + cyan_candle => BlockBehavior::default(), { + CyanCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + purple_candle => BlockBehavior::default(), { + PurpleCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + blue_candle => BlockBehavior::default(), { + BlueCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + brown_candle => BlockBehavior::default(), { + BrownCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + green_candle => BlockBehavior::default(), { + GreenCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + red_candle => BlockBehavior::default(), { + RedCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + black_candle => BlockBehavior::default(), { + BlackCandleCandles=_1, + Lit=False, + Waterlogged=False, + }, + candle_cake => BlockBehavior::default(), { + Lit=False, + }, + white_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + orange_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + magenta_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + light_blue_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + yellow_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + lime_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + pink_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + gray_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + light_gray_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + cyan_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + purple_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + blue_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + brown_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + green_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + red_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + black_candle_cake => BlockBehavior::default(), { + Lit=False, + }, + amethyst_block => BlockBehavior::default(), { + }, + budding_amethyst => BlockBehavior::default(), { + }, + amethyst_cluster => BlockBehavior::default(), { + Waterlogged=False, + Facing=Up, + }, + large_amethyst_bud => BlockBehavior::default(), { + Waterlogged=False, + Facing=Up, + }, + medium_amethyst_bud => BlockBehavior::default(), { + Waterlogged=False, + Facing=Up, + }, + small_amethyst_bud => BlockBehavior::default(), { + Waterlogged=False, + Facing=Up, + }, + tuff => BlockBehavior::default(), { + }, + calcite => BlockBehavior::default(), { + }, + tinted_glass => BlockBehavior::default(), { + }, + powder_snow => BlockBehavior::default(), { + }, + sculk_sensor => BlockBehavior::default(), { + Phase=Inactive, + SculkSensorPower=_0, + Waterlogged=False, + }, + sculk => BlockBehavior::default(), { + }, + sculk_vein => BlockBehavior::default(), { + }, + sculk_catalyst => BlockBehavior::default(), { + Pulse=False, + }, + sculk_shrieker => BlockBehavior::default(), { + Shrieking=False, + Waterlogged=False, + CanSummon=False, + }, + oxidized_copper => BlockBehavior::default(), { + }, + weathered_copper => BlockBehavior::default(), { + }, + exposed_copper => BlockBehavior::default(), { + }, + copper_block => BlockBehavior::default(), { + }, + copper_ore => BlockBehavior::default(), { + }, + deepslate_copper_ore => BlockBehavior::default(), { + }, + oxidized_cut_copper => BlockBehavior::default(), { + }, + weathered_cut_copper => BlockBehavior::default(), { + }, + exposed_cut_copper => BlockBehavior::default(), { + }, + cut_copper => BlockBehavior::default(), { + }, + oxidized_cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + weathered_cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + exposed_cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + oxidized_cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + weathered_cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + exposed_cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + waxed_copper_block => BlockBehavior::default(), { + }, + waxed_weathered_copper => BlockBehavior::default(), { + }, + waxed_exposed_copper => BlockBehavior::default(), { + }, + waxed_oxidized_copper => BlockBehavior::default(), { + }, + waxed_oxidized_cut_copper => BlockBehavior::default(), { + }, + waxed_weathered_cut_copper => BlockBehavior::default(), { + }, + waxed_exposed_cut_copper => BlockBehavior::default(), { + }, + waxed_cut_copper => BlockBehavior::default(), { + }, + waxed_oxidized_cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + waxed_weathered_cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + waxed_exposed_cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + waxed_cut_copper_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + waxed_oxidized_cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + waxed_weathered_cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + waxed_exposed_cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + waxed_cut_copper_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + lightning_rod => BlockBehavior::default(), { + Facing=Up, + Powered=False, + Waterlogged=False, + }, + pointed_dripstone => BlockBehavior::default(), { + TipDirection=Up, + Thickness=Tip, + Waterlogged=False, + }, + dripstone_block => BlockBehavior::default(), { + }, + cave_vines => BlockBehavior::default(), { + }, + cave_vines_plant => BlockBehavior::default(), { + }, + spore_blossom => BlockBehavior::default(), { + }, + azalea => BlockBehavior::default(), { + }, + flowering_azalea => BlockBehavior::default(), { + }, + moss_carpet => BlockBehavior::default(), { + }, + moss_block => BlockBehavior::default(), { + }, + big_dripleaf => BlockBehavior::default(), { + Waterlogged=False, + Facing=North, + Tilt=None, + }, + big_dripleaf_stem => BlockBehavior::default(), { + Waterlogged=False, + Facing=North, + }, + small_dripleaf => BlockBehavior::default(), { + Half=Lower, + Waterlogged=False, + Facing=North, + }, + hanging_roots => BlockBehavior::default(), { + Waterlogged=False, + }, + rooted_dirt => BlockBehavior::default(), { + }, + mud => BlockBehavior::default(), { + }, + deepslate => BlockBehavior::default(), { + Axis=Y, + }, + cobbled_deepslate => BlockBehavior::default(), { + }, + cobbled_deepslate_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + cobbled_deepslate_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + cobbled_deepslate_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + polished_deepslate => BlockBehavior::default(), { + }, + polished_deepslate_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + polished_deepslate_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + polished_deepslate_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + deepslate_tiles => BlockBehavior::default(), { + }, + deepslate_tile_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + deepslate_tile_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + deepslate_tile_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + deepslate_bricks => BlockBehavior::default(), { + }, + deepslate_brick_stairs => BlockBehavior::default(), { + Facing=North, + Half=Bottom, + Shape=Straight, + Waterlogged=False, + }, + deepslate_brick_slab => BlockBehavior::default(), { + Type=Bottom, + Waterlogged=False, + }, + deepslate_brick_wall => BlockBehavior::default(), { + Up=True, + NorthWall=None, + EastWall=None, + WestWall=None, + SouthWall=None, + Waterlogged=False, + }, + chiseled_deepslate => BlockBehavior::default(), { + }, + cracked_deepslate_bricks => BlockBehavior::default(), { + }, + cracked_deepslate_tiles => BlockBehavior::default(), { + }, + infested_deepslate => BlockBehavior::default(), { + }, + smooth_basalt => BlockBehavior::default(), { + }, + raw_iron_block => BlockBehavior::default(), { + }, + raw_copper_block => BlockBehavior::default(), { + }, + raw_gold_block => BlockBehavior::default(), { + }, + potted_azalea_bush => BlockBehavior::default(), { + }, + potted_flowering_azalea_bush => BlockBehavior::default(), { + }, + ochre_froglight => BlockBehavior::default(), { + Axis=Y, + }, + verdant_froglight => BlockBehavior::default(), { + Axis=Y, + }, + pearlescent_froglight => BlockBehavior::default(), { + Axis=Y, + }, + frogspawn => BlockBehavior::default(), { + }, + reinforced_deepslate => BlockBehavior::default(), { + }, } -} +} \ No newline at end of file diff --git a/codegen/genblocks.py b/codegen/genblocks.py index 75516626..9e35f7f3 100644 --- a/codegen/genblocks.py +++ b/codegen/genblocks.py @@ -21,6 +21,8 @@ print('Ok') mappings = lib.download.get_mappings_for_version(version_id) block_states_burger = lib.extract.get_block_states_burger(version_id) +ordered_blocks = lib.extract.get_ordered_blocks_burger(version_id) block_states_report = lib.extract.get_block_states_report(version_id) -lib.code.blocks.generate_blocks(block_states_burger, block_states_report, mappings) +lib.code.blocks.generate_blocks( + block_states_burger, block_states_report, ordered_blocks, mappings) diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index 5ed16e8e..9d1a5f30 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -10,7 +10,8 @@ BLOCKS_RS_DIR = get_dir_location('../azalea-block/src/blocks.rs') # - State: A possible state of a block, a combination of variants # - Block: Has properties and states. -def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings): + +def generate_blocks(blocks_burger: dict, blocks_report: dict, ordered_blocks: list[str], mappings: Mappings): with open(BLOCKS_RS_DIR, 'r') as f: existing_code = f.read().splitlines() @@ -20,13 +21,15 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings def get_property_struct_name(property: dict, block_data_burger: dict) -> str: property_name = None for class_name in [block_data_burger['class']] + block_data_burger['super']: - property_name = mappings.get_field(class_name, property['field_name']) + property_name = mappings.get_field( + class_name, property['field_name']) if property_name: break assert property_name property_name = to_camel_case(property_name.lower()) if property['type'] == 'int': - property_name = to_camel_case(block_data_burger['text_id']) + property_name + property_name = to_camel_case( + block_data_burger['text_id']) + property_name return property_name # Find properties @@ -34,7 +37,8 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings # This dict looks like { 'FloweringAzaleaLeavesDistance': 'distance' } property_struct_names_to_names = {} - for block_id, block_data_burger in blocks_burger.items(): + for block_id in ordered_blocks: + block_data_burger = blocks_burger[block_id] block_data_report = blocks_report[f'minecraft:{block_id}'] block_properties = {} @@ -45,14 +49,16 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings property_burger = property break if property_burger is None: - print('Error: The reports have states for a block, but Burger doesn\'t!', block_data_burger) + print( + 'Error: The reports have states for a block, but Burger doesn\'t!', block_data_burger) continue # assert property_burger is not None property_variants = block_data_report['properties'][property_struct_name] - property_struct_name = get_property_struct_name(property_burger, block_data_burger) + property_struct_name = get_property_struct_name( + property_burger, block_data_burger) block_properties[property_struct_name] = property_variants - + property_name = property_burger['name'] # if the name ends with _, remove that part ending = property_name.split('_')[-1] @@ -84,7 +90,8 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings # Block codegen new_make_block_states_macro_code.append(' Blocks => {') - for block_id, block_data_burger in blocks_burger.items(): + for block_id in ordered_blocks: + block_data_burger = blocks_burger[block_id] block_data_report = blocks_report['minecraft:' + block_id] block_properties_burger = block_data_burger['states'] @@ -99,7 +106,8 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, mappings: Mappings f' {block_id} => BlockBehavior::default(), {{') for property in block_properties_burger: property_default = default_property_variants.get(property['name']) - property_struct_name = get_property_struct_name(property, block_data_burger) + property_struct_name = get_property_struct_name( + property, block_data_burger) assert property_default is not None new_make_block_states_macro_code.append( f' {property_struct_name}={to_camel_case(property_default)},') diff --git a/codegen/lib/extract.py b/codegen/lib/extract.py index 360c368c..40263779 100644 --- a/codegen/lib/extract.py +++ b/codegen/lib/extract.py @@ -21,11 +21,17 @@ def get_block_states_report(version_id: str): with open(get_dir_location(f'downloads/generated-{version_id}/reports/blocks.json'), 'r') as f: return json.load(f) + def get_block_states_burger(version_id: str): burger_data = get_burger_data_for_version(version_id) return burger_data[0]['blocks']['block'] +def get_ordered_blocks_burger(version_id: str): + burger_data = get_burger_data_for_version(version_id) + return burger_data[0]['blocks']['ordered_blocks'] + + def get_burger_data_for_version(version_id: str): if not os.path.exists(get_dir_location(f'downloads/burger-{version_id}.json')): get_burger() From 043f70aa6ef8a6ae37d56ac63d284251cbecdfaf Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 16 Jun 2022 15:12:20 -0500 Subject: [PATCH 25/33] Fix for states that burger doesn't have --- .vscode/settings.json | 2 +- README.md | 2 +- azalea-block/src/blocks.rs | 553 ++++++++++++++++++++----------------- codegen/lib/code/blocks.py | 50 ++-- 4 files changed, 337 insertions(+), 270 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 3b614348..b0d07499 100755 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "editor.formatOnSave": true + "editor.formatOnSave": false } \ No newline at end of file diff --git a/README.md b/README.md index e57b4728..f0975733 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Azalea -A Rust crate for creating Minecraft bots. +A collection of Rust crates for creating Minecraft bots and other utilities.

Azalea diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index f2ce03dd..879f97f9 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -588,6 +588,10 @@ make_block_states! { _6, _7, }, + "berries" => True_False { + True, + False, + }, "in_wall" => InWall { True, False, @@ -1577,12 +1581,45 @@ make_block_states! { Up, Down, }, + "age" => _0__1__2__3__4__5__6__7__8__9__10__11__12__13__14__15__16__17__18__19__20__21__22__23__24__25 { + _0, + _1, + _2, + _3, + _4, + _5, + _6, + _7, + _8, + _9, + _10, + _11, + _12, + _13, + _14, + _15, + _16, + _17, + _18, + _19, + _20, + _21, + _22, + _23, + _24, + _25, + }, "tilt" => Tilt { None, Unstable, Partial, Full, }, + "axis" => X_Y_Z { + X, + Y, + Z, + }, }, Blocks => { air => BlockBehavior::default(), { @@ -1646,10 +1683,10 @@ make_block_states! { DarkOakSaplingStage=_0, }, mangrove_propagule => BlockBehavior::default(), { - MangrovePropaguleStage=_0, MangrovePropaguleAge=_0, - Waterlogged=False, Hanging=False, + MangrovePropaguleStage=_0, + Waterlogged=False, }, bedrock => BlockBehavior::default(), { }, @@ -1838,102 +1875,102 @@ make_block_states! { }, note_block => BlockBehavior::default(), { Instrument=Harp, - Powered=False, NoteBlockNote=_0, + Powered=False, }, white_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, orange_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, magenta_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, light_blue_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, yellow_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, lime_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, pink_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, gray_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, light_gray_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, cyan_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, purple_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, blue_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, brown_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, green_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, red_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, black_bed => BlockBehavior::default(), { Facing=North, - Part=Foot, Occupied=False, + Part=Foot, }, powered_rail => BlockBehavior::default(), { - Shape=NorthSouth, Powered=False, + Shape=NorthSouth, Waterlogged=False, }, detector_rail => BlockBehavior::default(), { - Shape=NorthSouth, Powered=False, + Shape=NorthSouth, Waterlogged=False, }, sticky_piston => BlockBehavior::default(), { - Facing=North, Extended=False, + Facing=North, }, cobweb => BlockBehavior::default(), { }, @@ -1949,12 +1986,12 @@ make_block_states! { Half=Lower, }, piston => BlockBehavior::default(), { - Facing=North, Extended=False, + Facing=North, }, piston_head => BlockBehavior::default(), { - Facing=North, Type=Normal, + Facing=North, Short=False, }, white_wool => BlockBehavior::default(), { @@ -1990,8 +2027,8 @@ make_block_states! { black_wool => BlockBehavior::default(), { }, moving_piston => BlockBehavior::default(), { - Facing=North, Type=Normal, + Facing=North, }, dandelion => BlockBehavior::default(), { }, @@ -2045,11 +2082,11 @@ make_block_states! { }, fire => BlockBehavior::default(), { FireAge=_0, - North=False, East=False, + North=False, South=False, - West=False, Up=False, + West=False, }, soul_fire => BlockBehavior::default(), { }, @@ -2062,16 +2099,16 @@ make_block_states! { Waterlogged=False, }, chest => BlockBehavior::default(), { - Facing=North, Type=Single, + Facing=North, Waterlogged=False, }, redstone_wire => BlockBehavior::default(), { - North=None, East=None, + North=None, + RedstoneWirePower=_0, South=None, West=None, - RedstoneWirePower=_0, }, diamond_ore => BlockBehavior::default(), { }, @@ -2120,10 +2157,10 @@ make_block_states! { Waterlogged=False, }, oak_door => BlockBehavior::default(), { - Half=Lower, Facing=North, - Open=False, + Half=Lower, Hinge=Left, + Open=False, Powered=False, }, ladder => BlockBehavior::default(), { @@ -2177,10 +2214,10 @@ make_block_states! { Powered=False, }, iron_door => BlockBehavior::default(), { - Half=Lower, Facing=North, - Open=False, + Half=Lower, Hinge=Left, + Open=False, Powered=False, }, oak_pressure_plate => BlockBehavior::default(), { @@ -2218,9 +2255,9 @@ make_block_states! { Lit=True, }, stone_button => BlockBehavior::default(), { + Face=Wall, Facing=North, Powered=False, - Face=Wall, }, snow => BlockBehavior::default(), { SnowLayers=_1, @@ -2241,11 +2278,11 @@ make_block_states! { HasRecord=False, }, oak_fence => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, pumpkin => BlockBehavior::default(), { }, @@ -2281,8 +2318,8 @@ make_block_states! { CakeBites=_0, }, repeater => BlockBehavior::default(), { - Facing=North, RepeaterDelay=_1, + Facing=North, Locked=False, Powered=False, }, @@ -2320,50 +2357,50 @@ make_block_states! { }, oak_trapdoor => BlockBehavior::default(), { Facing=North, - Open=False, Half=Bottom, + Open=False, Powered=False, Waterlogged=False, }, spruce_trapdoor => BlockBehavior::default(), { Facing=North, - Open=False, Half=Bottom, + Open=False, Powered=False, Waterlogged=False, }, birch_trapdoor => BlockBehavior::default(), { Facing=North, - Open=False, Half=Bottom, + Open=False, Powered=False, Waterlogged=False, }, jungle_trapdoor => BlockBehavior::default(), { Facing=North, - Open=False, Half=Bottom, + Open=False, Powered=False, Waterlogged=False, }, acacia_trapdoor => BlockBehavior::default(), { Facing=North, - Open=False, Half=Bottom, + Open=False, Powered=False, Waterlogged=False, }, dark_oak_trapdoor => BlockBehavior::default(), { Facing=North, - Open=False, Half=Bottom, + Open=False, Powered=False, Waterlogged=False, }, mangrove_trapdoor => BlockBehavior::default(), { Facing=North, - Open=False, Half=Bottom, + Open=False, Powered=False, Waterlogged=False, }, @@ -2392,46 +2429,46 @@ make_block_states! { infested_chiseled_stone_bricks => BlockBehavior::default(), { }, brown_mushroom_block => BlockBehavior::default(), { - Up=True, Down=True, - North=True, East=True, + North=True, South=True, + Up=True, West=True, }, red_mushroom_block => BlockBehavior::default(), { - Up=True, Down=True, - North=True, East=True, + North=True, South=True, + Up=True, West=True, }, mushroom_stem => BlockBehavior::default(), { - Up=True, Down=True, - North=True, East=True, + North=True, South=True, + Up=True, West=True, }, iron_bars => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, chain => BlockBehavior::default(), { - Waterlogged=False, Axis=Y, + Waterlogged=False, }, glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, melon => BlockBehavior::default(), { }, @@ -2448,19 +2485,26 @@ make_block_states! { MelonStemAge=_0, }, vine => BlockBehavior::default(), { - Up=False, - North=False, East=False, + North=False, South=False, + Up=False, West=False, }, glow_lichen => BlockBehavior::default(), { + True_False=False, + True_False=False, + True_False=False, + True_False=False, + True_False=False, + True_False=False, + True_False=False, }, oak_fence_gate => BlockBehavior::default(), { Facing=North, + InWall=False, Open=False, Powered=False, - InWall=False, }, brick_stairs => BlockBehavior::default(), { Facing=North, @@ -2488,11 +2532,11 @@ make_block_states! { nether_bricks => BlockBehavior::default(), { }, nether_brick_fence => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, nether_brick_stairs => BlockBehavior::default(), { Facing=North, @@ -2523,8 +2567,8 @@ make_block_states! { end_portal => BlockBehavior::default(), { }, end_portal_frame => BlockBehavior::default(), { - Facing=North, HasEye=False, + Facing=North, }, end_stone => BlockBehavior::default(), { }, @@ -2534,8 +2578,8 @@ make_block_states! { Lit=False, }, cocoa => BlockBehavior::default(), { - Facing=North, CocoaAge=_0, + Facing=North, }, sandstone_stairs => BlockBehavior::default(), { Facing=North, @@ -2552,18 +2596,18 @@ make_block_states! { Waterlogged=False, }, tripwire_hook => BlockBehavior::default(), { + Attached=False, Facing=North, Powered=False, - Attached=False, }, tripwire => BlockBehavior::default(), { - Powered=False, Attached=False, Disarmed=False, - North=False, East=False, - West=False, + North=False, + Powered=False, South=False, + West=False, }, emerald_block => BlockBehavior::default(), { }, @@ -2586,26 +2630,26 @@ make_block_states! { Waterlogged=False, }, command_block => BlockBehavior::default(), { - Facing=North, Conditional=False, + Facing=North, }, beacon => BlockBehavior::default(), { }, cobblestone_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, mossy_cobblestone_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, flower_pot => BlockBehavior::default(), { }, @@ -2666,39 +2710,39 @@ make_block_states! { PotatoesAge=_0, }, oak_button => BlockBehavior::default(), { + Face=Wall, Facing=North, Powered=False, - Face=Wall, }, spruce_button => BlockBehavior::default(), { + Face=Wall, Facing=North, Powered=False, - Face=Wall, }, birch_button => BlockBehavior::default(), { + Face=Wall, Facing=North, Powered=False, - Face=Wall, }, jungle_button => BlockBehavior::default(), { + Face=Wall, Facing=North, Powered=False, - Face=Wall, }, acacia_button => BlockBehavior::default(), { + Face=Wall, Facing=North, Powered=False, - Face=Wall, }, dark_oak_button => BlockBehavior::default(), { + Face=Wall, Facing=North, Powered=False, - Face=Wall, }, mangrove_button => BlockBehavior::default(), { + Face=Wall, Facing=North, Powered=False, - Face=Wall, }, skeleton_skull => BlockBehavior::default(), { SkeletonSkullRotation=_0, @@ -2746,8 +2790,8 @@ make_block_states! { Facing=North, }, trapped_chest => BlockBehavior::default(), { - Facing=North, Type=Single, + Facing=North, Waterlogged=False, }, light_weighted_pressure_plate => BlockBehavior::default(), { @@ -2762,16 +2806,16 @@ make_block_states! { Powered=False, }, daylight_detector => BlockBehavior::default(), { - DaylightDetectorPower=_0, Inverted=False, + DaylightDetectorPower=_0, }, redstone_block => BlockBehavior::default(), { }, nether_quartz_ore => BlockBehavior::default(), { }, hopper => BlockBehavior::default(), { - Facing=Down, Enabled=True, + Facing=Down, }, quartz_block => BlockBehavior::default(), { }, @@ -2787,8 +2831,8 @@ make_block_states! { Waterlogged=False, }, activator_rail => BlockBehavior::default(), { - Shape=NorthSouth, Powered=False, + Shape=NorthSouth, Waterlogged=False, }, dropper => BlockBehavior::default(), { @@ -2828,116 +2872,116 @@ make_block_states! { black_terracotta => BlockBehavior::default(), { }, white_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, orange_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, magenta_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, light_blue_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, yellow_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, lime_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, pink_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, gray_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, light_gray_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, cyan_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, purple_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, blue_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, brown_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, green_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, red_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, black_stained_glass_pane => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, acacia_stairs => BlockBehavior::default(), { Facing=North, @@ -2967,8 +3011,8 @@ make_block_states! { }, iron_trapdoor => BlockBehavior::default(), { Facing=North, - Open=False, Half=Bottom, + Open=False, Powered=False, Waterlogged=False, }, @@ -3271,134 +3315,134 @@ make_block_states! { }, spruce_fence_gate => BlockBehavior::default(), { Facing=North, + InWall=False, Open=False, Powered=False, - InWall=False, }, birch_fence_gate => BlockBehavior::default(), { Facing=North, + InWall=False, Open=False, Powered=False, - InWall=False, }, jungle_fence_gate => BlockBehavior::default(), { Facing=North, + InWall=False, Open=False, Powered=False, - InWall=False, }, acacia_fence_gate => BlockBehavior::default(), { Facing=North, + InWall=False, Open=False, Powered=False, - InWall=False, }, dark_oak_fence_gate => BlockBehavior::default(), { Facing=North, + InWall=False, Open=False, Powered=False, - InWall=False, }, mangrove_fence_gate => BlockBehavior::default(), { Facing=North, + InWall=False, Open=False, Powered=False, - InWall=False, }, spruce_fence => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, birch_fence => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, jungle_fence => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, acacia_fence => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, dark_oak_fence => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, mangrove_fence => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, spruce_door => BlockBehavior::default(), { - Half=Lower, Facing=North, - Open=False, + Half=Lower, Hinge=Left, + Open=False, Powered=False, }, birch_door => BlockBehavior::default(), { - Half=Lower, Facing=North, - Open=False, + Half=Lower, Hinge=Left, + Open=False, Powered=False, }, jungle_door => BlockBehavior::default(), { - Half=Lower, Facing=North, - Open=False, + Half=Lower, Hinge=Left, + Open=False, Powered=False, }, acacia_door => BlockBehavior::default(), { - Half=Lower, Facing=North, - Open=False, + Half=Lower, Hinge=Left, + Open=False, Powered=False, }, dark_oak_door => BlockBehavior::default(), { - Half=Lower, Facing=North, - Open=False, + Half=Lower, Hinge=Left, + Open=False, Powered=False, }, mangrove_door => BlockBehavior::default(), { - Half=Lower, Facing=North, - Open=False, + Half=Lower, Hinge=Left, + Open=False, Powered=False, }, end_rod => BlockBehavior::default(), { Facing=Up, }, chorus_plant => BlockBehavior::default(), { - North=False, - East=False, - South=False, - West=False, - Up=False, Down=False, + East=False, + North=False, + South=False, + Up=False, + West=False, }, chorus_flower => BlockBehavior::default(), { ChorusFlowerAge=_0, @@ -3424,12 +3468,12 @@ make_block_states! { end_gateway => BlockBehavior::default(), { }, repeating_command_block => BlockBehavior::default(), { - Facing=North, Conditional=False, + Facing=North, }, chain_command_block => BlockBehavior::default(), { - Facing=North, Conditional=False, + Facing=North, }, frosted_ice => BlockBehavior::default(), { FrostedIceAge=_0, @@ -3620,8 +3664,8 @@ make_block_states! { dried_kelp_block => BlockBehavior::default(), { }, turtle_egg => BlockBehavior::default(), { - TurtleEggHatch=_0, TurtleEggEggs=_1, + TurtleEggHatch=_0, }, dead_tube_coral_block => BlockBehavior::default(), { }, @@ -3905,113 +3949,113 @@ make_block_states! { Waterlogged=False, }, brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, prismarine_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, red_sandstone_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, mossy_stone_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, granite_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, stone_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, mud_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, nether_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, andesite_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, red_nether_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, sandstone_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, end_stone_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, diorite_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, scaffolding => BlockBehavior::default(), { + Bottom=False, ScaffoldingDistance=_7, Waterlogged=False, - Bottom=False, }, loom => BlockBehavior::default(), { Facing=North, @@ -4033,13 +4077,13 @@ make_block_states! { fletching_table => BlockBehavior::default(), { }, grindstone => BlockBehavior::default(), { - Facing=North, Face=Wall, + Facing=North, }, lectern => BlockBehavior::default(), { Facing=North, - Powered=False, HasBook=False, + Powered=False, }, smithing_table => BlockBehavior::default(), { }, @@ -4047,8 +4091,8 @@ make_block_states! { Facing=North, }, bell => BlockBehavior::default(), { - Facing=North, Attachment=Floor, + Facing=North, Powered=False, }, lantern => BlockBehavior::default(), { @@ -4060,16 +4104,16 @@ make_block_states! { Waterlogged=False, }, campfire => BlockBehavior::default(), { + Facing=North, Lit=True, SignalFire=False, Waterlogged=False, - Facing=North, }, soul_campfire => BlockBehavior::default(), { + Facing=North, Lit=True, SignalFire=False, Waterlogged=False, - Facing=North, }, sweet_berry_bush => BlockBehavior::default(), { SweetBerryBushAge=_0, @@ -4145,44 +4189,44 @@ make_block_states! { Powered=False, }, crimson_fence => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, warped_fence => BlockBehavior::default(), { - North=False, East=False, - West=False, + North=False, South=False, Waterlogged=False, + West=False, }, crimson_trapdoor => BlockBehavior::default(), { Facing=North, - Open=False, Half=Bottom, + Open=False, Powered=False, Waterlogged=False, }, warped_trapdoor => BlockBehavior::default(), { Facing=North, - Open=False, Half=Bottom, + Open=False, Powered=False, Waterlogged=False, }, crimson_fence_gate => BlockBehavior::default(), { Facing=North, + InWall=False, Open=False, Powered=False, - InWall=False, }, warped_fence_gate => BlockBehavior::default(), { Facing=North, + InWall=False, Open=False, Powered=False, - InWall=False, }, crimson_stairs => BlockBehavior::default(), { Facing=North, @@ -4197,27 +4241,27 @@ make_block_states! { Waterlogged=False, }, crimson_button => BlockBehavior::default(), { + Face=Wall, Facing=North, Powered=False, - Face=Wall, }, warped_button => BlockBehavior::default(), { + Face=Wall, Facing=North, Powered=False, - Face=Wall, }, crimson_door => BlockBehavior::default(), { - Half=Lower, Facing=North, - Open=False, + Half=Lower, Hinge=Left, + Open=False, Powered=False, }, warped_door => BlockBehavior::default(), { - Half=Lower, Facing=North, - Open=False, + Half=Lower, Hinge=Left, + Open=False, Powered=False, }, crimson_sign => BlockBehavior::default(), { @@ -4249,12 +4293,12 @@ make_block_states! { TargetOutputPower=_0, }, bee_nest => BlockBehavior::default(), { - BeeNestHoneyLevel=_0, Facing=North, + BeeNestHoneyLevel=_0, }, beehive => BlockBehavior::default(), { - BeehiveHoneyLevel=_0, Facing=North, + BeehiveHoneyLevel=_0, }, honey_block => BlockBehavior::default(), { }, @@ -4288,12 +4332,12 @@ make_block_states! { Waterlogged=False, }, blackstone_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, blackstone_slab => BlockBehavior::default(), { Type=Bottom, @@ -4318,12 +4362,12 @@ make_block_states! { Waterlogged=False, }, polished_blackstone_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, gilded_blackstone => BlockBehavior::default(), { }, @@ -4341,17 +4385,17 @@ make_block_states! { Powered=False, }, polished_blackstone_button => BlockBehavior::default(), { + Face=Wall, Facing=North, Powered=False, - Face=Wall, }, polished_blackstone_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, chiseled_nether_bricks => BlockBehavior::default(), { }, @@ -4500,20 +4544,20 @@ make_block_states! { budding_amethyst => BlockBehavior::default(), { }, amethyst_cluster => BlockBehavior::default(), { - Waterlogged=False, Facing=Up, + Waterlogged=False, }, large_amethyst_bud => BlockBehavior::default(), { - Waterlogged=False, Facing=Up, + Waterlogged=False, }, medium_amethyst_bud => BlockBehavior::default(), { - Waterlogged=False, Facing=Up, + Waterlogged=False, }, small_amethyst_bud => BlockBehavior::default(), { - Waterlogged=False, Facing=Up, + Waterlogged=False, }, tuff => BlockBehavior::default(), { }, @@ -4524,21 +4568,28 @@ make_block_states! { powder_snow => BlockBehavior::default(), { }, sculk_sensor => BlockBehavior::default(), { - Phase=Inactive, SculkSensorPower=_0, + Phase=Inactive, Waterlogged=False, }, sculk => BlockBehavior::default(), { }, sculk_vein => BlockBehavior::default(), { + True_False=False, + True_False=False, + True_False=False, + True_False=False, + True_False=False, + True_False=False, + True_False=False, }, sculk_catalyst => BlockBehavior::default(), { Pulse=False, }, sculk_shrieker => BlockBehavior::default(), { + CanSummon=False, Shrieking=False, Waterlogged=False, - CanSummon=False, }, oxidized_copper => BlockBehavior::default(), { }, @@ -4662,15 +4713,18 @@ make_block_states! { Waterlogged=False, }, pointed_dripstone => BlockBehavior::default(), { - TipDirection=Up, Thickness=Tip, + TipDirection=Up, Waterlogged=False, }, dripstone_block => BlockBehavior::default(), { }, cave_vines => BlockBehavior::default(), { + _0__1__2__3__4__5__6__7__8__9__10__11__12__13__14__15__16__17__18__19__20__21__22__23__24__25=_0, + True_False=False, }, cave_vines_plant => BlockBehavior::default(), { + True_False=False, }, spore_blossom => BlockBehavior::default(), { }, @@ -4683,18 +4737,18 @@ make_block_states! { moss_block => BlockBehavior::default(), { }, big_dripleaf => BlockBehavior::default(), { - Waterlogged=False, Facing=North, Tilt=None, + Waterlogged=False, }, big_dripleaf_stem => BlockBehavior::default(), { - Waterlogged=False, Facing=North, + Waterlogged=False, }, small_dripleaf => BlockBehavior::default(), { + Facing=North, Half=Lower, Waterlogged=False, - Facing=North, }, hanging_roots => BlockBehavior::default(), { Waterlogged=False, @@ -4719,12 +4773,12 @@ make_block_states! { Waterlogged=False, }, cobbled_deepslate_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, polished_deepslate => BlockBehavior::default(), { }, @@ -4739,12 +4793,12 @@ make_block_states! { Waterlogged=False, }, polished_deepslate_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, deepslate_tiles => BlockBehavior::default(), { }, @@ -4759,12 +4813,12 @@ make_block_states! { Waterlogged=False, }, deepslate_tile_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, deepslate_bricks => BlockBehavior::default(), { }, @@ -4779,12 +4833,12 @@ make_block_states! { Waterlogged=False, }, deepslate_brick_wall => BlockBehavior::default(), { - Up=True, - NorthWall=None, EastWall=None, - WestWall=None, + NorthWall=None, SouthWall=None, + Up=True, Waterlogged=False, + WestWall=None, }, chiseled_deepslate => BlockBehavior::default(), { }, @@ -4793,6 +4847,7 @@ make_block_states! { cracked_deepslate_tiles => BlockBehavior::default(), { }, infested_deepslate => BlockBehavior::default(), { + X_Y_Z=Y, }, smooth_basalt => BlockBehavior::default(), { }, diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index 9d1a5f30..4978da6f 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -1,3 +1,4 @@ +from typing import Optional from lib.utils import to_snake_case, upper_first_letter, get_dir_location, to_camel_case from ..mappings import Mappings import re @@ -18,7 +19,10 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, ordered_blocks: li new_make_block_states_macro_code = [] new_make_block_states_macro_code.append('make_block_states! {') - def get_property_struct_name(property: dict, block_data_burger: dict) -> str: + def get_property_struct_name(property: Optional[dict], block_data_burger: dict, property_variants: list[str]) -> str: + if property is None: + return '_'.join(map(to_camel_case, property_variants)) + property_name = None for class_name in [block_data_burger['class']] + block_data_burger['super']: property_name = mappings.get_field( @@ -42,24 +46,25 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, ordered_blocks: li block_data_report = blocks_report[f'minecraft:{block_id}'] block_properties = {} - for property_struct_name in list(block_data_report.get('properties', {}).keys()): + for property_name in list(block_data_report.get('properties', {}).keys()): property_burger = None - for property in block_data_burger['states']: - if property['name'] == property_struct_name: + for property in block_data_burger.get('states', []): + if property['name'] == property_name: property_burger = property break + + property_variants = block_data_report['properties'][property_name] + if property_burger is None: print( - 'Error: The reports have states for a block, but Burger doesn\'t!', block_data_burger) - continue - # assert property_burger is not None - property_variants = block_data_report['properties'][property_struct_name] + 'Warning: The reports have states for a block, but Burger doesn\'t!', block_data_burger) + property_struct_name = get_property_struct_name( - property_burger, block_data_burger) + property_burger, block_data_burger, property_variants) + # assert property_name == property_burger['name'] block_properties[property_struct_name] = property_variants - property_name = property_burger['name'] # if the name ends with _, remove that part ending = property_name.split('_')[-1] if ending.isdigit(): @@ -94,25 +99,32 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, ordered_blocks: li block_data_burger = blocks_burger[block_id] block_data_report = blocks_report['minecraft:' + block_id] - block_properties_burger = block_data_burger['states'] + block_properties = block_data_burger.get('states', []) + block_properties_burger = block_data_burger.get('states', []) default_property_variants: dict[str, str] = {} - for property in block_data_report['states']: - if property.get('default'): - default_property_variants = property.get('properties', {}) + for state in block_data_report['states']: + if state.get('default'): + default_property_variants = state.get('properties', {}) # TODO: use burger to generate the blockbehavior new_make_block_states_macro_code.append( f' {block_id} => BlockBehavior::default(), {{') - for property in block_properties_burger: - property_default = default_property_variants.get(property['name']) + for property_name in list(block_data_report.get('properties', {}).keys()): + property_burger = None + for property in block_data_burger.get('states', []): + if property['name'] == property_name: + property_burger = property + break + + property_default = default_property_variants.get(property_name) + property_variants = block_data_report['properties'][property_name] + property_struct_name = get_property_struct_name( - property, block_data_burger) + property_burger, block_data_burger, property_variants) assert property_default is not None new_make_block_states_macro_code.append( f' {property_struct_name}={to_camel_case(property_default)},') - # new_make_block_states_macro_code.append( - # f' {to_camel_case(state)}=TODO,') new_make_block_states_macro_code.append(' },') new_make_block_states_macro_code.append(' }') new_make_block_states_macro_code.append('}') From b907ea5a3f731f21f288508105c986153a82ca21 Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 16 Jun 2022 19:29:16 -0500 Subject: [PATCH 26/33] "boolean" is cringe --- azalea-block/src/blocks.rs | 828 ++++++++++++++++++++----------------- codegen/lib/code/blocks.py | 38 +- 2 files changed, 488 insertions(+), 378 deletions(-) diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index 879f97f9..7f1ecbac 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -181,11 +181,13 @@ make_block_states! { _6, _7, }, - "facing" => Facing { + "facing" => FacingCubic { North, + East, South, West, - East, + Up, + Down, }, "triggered" => Triggered { True, @@ -240,6 +242,12 @@ make_block_states! { True, False, }, + "facing" => FacingCardinal { + North, + South, + West, + East, + }, "occupied" => Occupied { True, False, @@ -248,25 +256,25 @@ make_block_states! { Head, Foot, }, - "shape" => Shape { - Straight, - InnerLeft, - InnerRight, - OuterLeft, - OuterRight, + "shape" => RailShape { + NorthSouth, + EastWest, + AscendingEast, + AscendingWest, + AscendingNorth, + AscendingSouth, }, "extended" => Extended { True, False, }, "half" => Half { - Top, - Bottom, + Upper, + Lower, }, - "type" => Type { - Top, - Bottom, - Double, + "type" => PistonType { + Normal, + Sticky, }, "short" => Short { True, @@ -314,6 +322,32 @@ make_block_states! { True, False, }, + "half" => TopBottom { + Top, + Bottom, + }, + "shape" => StairShape { + Straight, + InnerLeft, + InnerRight, + OuterLeft, + OuterRight, + }, + "type" => ChestType { + Single, + Left, + Right, + }, + "east" => WireEast { + Up, + Side, + None, + }, + "north" => WireNorth { + Up, + Side, + None, + }, "power" => RedstoneWirePower { _0, _1, @@ -332,6 +366,16 @@ make_block_states! { _14, _15, }, + "south" => WireSouth { + Up, + Side, + None, + }, + "west" => WireWest { + Up, + Side, + None, + }, "age" => WheatAge { _0, _1, @@ -490,6 +534,18 @@ make_block_states! { True, False, }, + "shape" => Shape { + NorthSouth, + EastWest, + AscendingEast, + AscendingWest, + AscendingNorth, + AscendingSouth, + SouthEast, + SouthWest, + NorthWest, + NorthEast, + }, "face" => Face { Floor, Wall, @@ -545,6 +601,10 @@ make_block_states! { True, False, }, + "axis" => AxisXZ { + X, + Z, + }, "bites" => CakeBites { _0, _1, @@ -821,11 +881,9 @@ make_block_states! { _14, _15, }, - "mode" => Mode { - Save, - Load, - Corner, - Data, + "mode" => ComparatorType { + Compare, + Subtract, }, "inverted" => Inverted { True, @@ -853,6 +911,13 @@ make_block_states! { True, False, }, + "facing" => Facing { + Down, + North, + South, + West, + East, + }, "level" => LightLevel { _0, _1, @@ -871,6 +936,11 @@ make_block_states! { _14, _15, }, + "type" => Type { + Top, + Bottom, + Double, + }, "rotation" => WhiteBannerRotation { _0, _1, @@ -1367,6 +1437,12 @@ make_block_states! { _14, _15, }, + "mode" => Mode { + Save, + Load, + Corner, + Data, + }, "orientation" => Orientation { DownEast, DownNorth, @@ -1581,7 +1657,7 @@ make_block_states! { Up, Down, }, - "age" => _0__1__2__3__4__5__6__7__8__9__10__11__12__13__14__15__16__17__18__19__20__21__22__23__24__25 { + "age" => _0_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24_25 { _0, _1, _2, @@ -1864,7 +1940,7 @@ make_block_states! { lapis_block => BlockBehavior::default(), { }, dispenser => BlockBehavior::default(), { - Facing=North, + FacingCubic=North, Triggered=False, }, sandstone => BlockBehavior::default(), { @@ -1879,98 +1955,98 @@ make_block_states! { Powered=False, }, white_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, orange_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, magenta_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, light_blue_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, yellow_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, lime_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, pink_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, gray_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, light_gray_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, cyan_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, purple_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, blue_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, brown_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, green_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, red_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, black_bed => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Occupied=False, Part=Foot, }, powered_rail => BlockBehavior::default(), { Powered=False, - Shape=NorthSouth, + RailShape=NorthSouth, Waterlogged=False, }, detector_rail => BlockBehavior::default(), { Powered=False, - Shape=NorthSouth, + RailShape=NorthSouth, Waterlogged=False, }, sticky_piston => BlockBehavior::default(), { Extended=False, - Facing=North, + FacingCubic=North, }, cobweb => BlockBehavior::default(), { }, @@ -1987,11 +2063,11 @@ make_block_states! { }, piston => BlockBehavior::default(), { Extended=False, - Facing=North, + FacingCubic=North, }, piston_head => BlockBehavior::default(), { - Type=Normal, - Facing=North, + PistonType=Normal, + FacingCubic=North, Short=False, }, white_wool => BlockBehavior::default(), { @@ -2027,8 +2103,8 @@ make_block_states! { black_wool => BlockBehavior::default(), { }, moving_piston => BlockBehavior::default(), { - Type=Normal, - Facing=North, + PistonType=Normal, + FacingCubic=North, }, dandelion => BlockBehavior::default(), { }, @@ -2078,7 +2154,7 @@ make_block_states! { torch => BlockBehavior::default(), { }, wall_torch => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, fire => BlockBehavior::default(), { FireAge=_0, @@ -2093,22 +2169,22 @@ make_block_states! { spawner => BlockBehavior::default(), { }, oak_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, chest => BlockBehavior::default(), { - Type=Single, - Facing=North, + ChestType=Single, + FacingCardinal=North, Waterlogged=False, }, redstone_wire => BlockBehavior::default(), { - East=None, - North=None, + WireEast=None, + WireNorth=None, RedstoneWirePower=_0, - South=None, - West=None, + WireSouth=None, + WireWest=None, }, diamond_ore => BlockBehavior::default(), { }, @@ -2125,7 +2201,7 @@ make_block_states! { FarmlandMoisture=_0, }, furnace => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Lit=False, }, oak_sign => BlockBehavior::default(), { @@ -2157,14 +2233,14 @@ make_block_states! { Waterlogged=False, }, oak_door => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Half=Lower, Hinge=Left, Open=False, Powered=False, }, ladder => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=False, }, rail => BlockBehavior::default(), { @@ -2172,49 +2248,49 @@ make_block_states! { Waterlogged=False, }, cobblestone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, oak_wall_sign => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=False, }, spruce_wall_sign => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=False, }, birch_wall_sign => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=False, }, acacia_wall_sign => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=False, }, jungle_wall_sign => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=False, }, dark_oak_wall_sign => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=False, }, mangrove_wall_sign => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=False, }, lever => BlockBehavior::default(), { Face=Wall, - Facing=North, + FacingCardinal=North, Powered=False, }, stone_pressure_plate => BlockBehavior::default(), { Powered=False, }, iron_door => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Half=Lower, Hinge=Left, Open=False, @@ -2251,12 +2327,12 @@ make_block_states! { Lit=True, }, redstone_wall_torch => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Lit=True, }, stone_button => BlockBehavior::default(), { Face=Wall, - Facing=North, + FacingCardinal=North, Powered=False, }, snow => BlockBehavior::default(), { @@ -2301,25 +2377,25 @@ make_block_states! { soul_torch => BlockBehavior::default(), { }, soul_wall_torch => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, glowstone => BlockBehavior::default(), { }, nether_portal => BlockBehavior::default(), { - Axis=X, + AxisXZ=X, }, carved_pumpkin => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, jack_o_lantern => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, cake => BlockBehavior::default(), { CakeBites=_0, }, repeater => BlockBehavior::default(), { RepeaterDelay=_1, - Facing=North, + FacingCardinal=North, Locked=False, Powered=False, }, @@ -2356,50 +2432,50 @@ make_block_states! { black_stained_glass => BlockBehavior::default(), { }, oak_trapdoor => BlockBehavior::default(), { - Facing=North, - Half=Bottom, + FacingCardinal=North, + TopBottom=Bottom, Open=False, Powered=False, Waterlogged=False, }, spruce_trapdoor => BlockBehavior::default(), { - Facing=North, - Half=Bottom, + FacingCardinal=North, + TopBottom=Bottom, Open=False, Powered=False, Waterlogged=False, }, birch_trapdoor => BlockBehavior::default(), { - Facing=North, - Half=Bottom, + FacingCardinal=North, + TopBottom=Bottom, Open=False, Powered=False, Waterlogged=False, }, jungle_trapdoor => BlockBehavior::default(), { - Facing=North, - Half=Bottom, + FacingCardinal=North, + TopBottom=Bottom, Open=False, Powered=False, Waterlogged=False, }, acacia_trapdoor => BlockBehavior::default(), { - Facing=North, - Half=Bottom, + FacingCardinal=North, + TopBottom=Bottom, Open=False, Powered=False, Waterlogged=False, }, dark_oak_trapdoor => BlockBehavior::default(), { - Facing=North, - Half=Bottom, + FacingCardinal=North, + TopBottom=Bottom, Open=False, Powered=False, Waterlogged=False, }, mangrove_trapdoor => BlockBehavior::default(), { - Facing=North, - Half=Bottom, + FacingCardinal=North, + TopBottom=Bottom, Open=False, Powered=False, Waterlogged=False, @@ -2473,10 +2549,10 @@ make_block_states! { melon => BlockBehavior::default(), { }, attached_pumpkin_stem => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, attached_melon_stem => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, pumpkin_stem => BlockBehavior::default(), { PumpkinStemAge=_0, @@ -2501,27 +2577,27 @@ make_block_states! { True_False=False, }, oak_fence_gate => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, InWall=False, Open=False, Powered=False, }, brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, stone_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, mud_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, mycelium => BlockBehavior::default(), { @@ -2539,9 +2615,9 @@ make_block_states! { West=False, }, nether_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, nether_wart => BlockBehavior::default(), { @@ -2568,7 +2644,7 @@ make_block_states! { }, end_portal_frame => BlockBehavior::default(), { HasEye=False, - Facing=North, + FacingCardinal=North, }, end_stone => BlockBehavior::default(), { }, @@ -2579,12 +2655,12 @@ make_block_states! { }, cocoa => BlockBehavior::default(), { CocoaAge=_0, - Facing=North, + FacingCardinal=North, }, sandstone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, emerald_ore => BlockBehavior::default(), { @@ -2592,12 +2668,12 @@ make_block_states! { deepslate_emerald_ore => BlockBehavior::default(), { }, ender_chest => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=False, }, tripwire_hook => BlockBehavior::default(), { Attached=False, - Facing=North, + FacingCardinal=North, Powered=False, }, tripwire => BlockBehavior::default(), { @@ -2612,26 +2688,26 @@ make_block_states! { emerald_block => BlockBehavior::default(), { }, spruce_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, birch_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, jungle_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, command_block => BlockBehavior::default(), { Conditional=False, - Facing=North, + FacingCubic=North, }, beacon => BlockBehavior::default(), { }, @@ -2711,87 +2787,87 @@ make_block_states! { }, oak_button => BlockBehavior::default(), { Face=Wall, - Facing=North, + FacingCardinal=North, Powered=False, }, spruce_button => BlockBehavior::default(), { Face=Wall, - Facing=North, + FacingCardinal=North, Powered=False, }, birch_button => BlockBehavior::default(), { Face=Wall, - Facing=North, + FacingCardinal=North, Powered=False, }, jungle_button => BlockBehavior::default(), { Face=Wall, - Facing=North, + FacingCardinal=North, Powered=False, }, acacia_button => BlockBehavior::default(), { Face=Wall, - Facing=North, + FacingCardinal=North, Powered=False, }, dark_oak_button => BlockBehavior::default(), { Face=Wall, - Facing=North, + FacingCardinal=North, Powered=False, }, mangrove_button => BlockBehavior::default(), { Face=Wall, - Facing=North, + FacingCardinal=North, Powered=False, }, skeleton_skull => BlockBehavior::default(), { SkeletonSkullRotation=_0, }, skeleton_wall_skull => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, wither_skeleton_skull => BlockBehavior::default(), { WitherSkeletonSkullRotation=_0, }, wither_skeleton_wall_skull => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, zombie_head => BlockBehavior::default(), { ZombieHeadRotation=_0, }, zombie_wall_head => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, player_head => BlockBehavior::default(), { PlayerHeadRotation=_0, }, player_wall_head => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, creeper_head => BlockBehavior::default(), { CreeperHeadRotation=_0, }, creeper_wall_head => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, dragon_head => BlockBehavior::default(), { DragonHeadRotation=_0, }, dragon_wall_head => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, anvil => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, chipped_anvil => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, damaged_anvil => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, trapped_chest => BlockBehavior::default(), { - Type=Single, - Facing=North, + ChestType=Single, + FacingCardinal=North, Waterlogged=False, }, light_weighted_pressure_plate => BlockBehavior::default(), { @@ -2801,8 +2877,8 @@ make_block_states! { HeavyWeightedPressurePlatePower=_0, }, comparator => BlockBehavior::default(), { - Facing=North, - Mode=Compare, + FacingCardinal=North, + ComparatorType=Compare, Powered=False, }, daylight_detector => BlockBehavior::default(), { @@ -2825,18 +2901,18 @@ make_block_states! { Axis=Y, }, quartz_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, activator_rail => BlockBehavior::default(), { Powered=False, - Shape=NorthSouth, + RailShape=NorthSouth, Waterlogged=False, }, dropper => BlockBehavior::default(), { - Facing=North, + FacingCubic=North, Triggered=False, }, white_terracotta => BlockBehavior::default(), { @@ -2984,21 +3060,21 @@ make_block_states! { West=False, }, acacia_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, dark_oak_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, mangrove_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, slime_block => BlockBehavior::default(), { @@ -3010,8 +3086,8 @@ make_block_states! { Waterlogged=False, }, iron_trapdoor => BlockBehavior::default(), { - Facing=North, - Half=Bottom, + FacingCardinal=North, + TopBottom=Bottom, Open=False, Powered=False, Waterlogged=False, @@ -3023,21 +3099,21 @@ make_block_states! { dark_prismarine => BlockBehavior::default(), { }, prismarine_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, prismarine_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, dark_prismarine_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, prismarine_slab => BlockBehavior::default(), { @@ -3162,52 +3238,52 @@ make_block_states! { BlackBannerRotation=_0, }, white_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, orange_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, magenta_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, light_blue_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, yellow_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, lime_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, pink_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, gray_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, light_gray_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, cyan_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, purple_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, blue_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, brown_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, green_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, red_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, black_wall_banner => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, red_sandstone => BlockBehavior::default(), { }, @@ -3216,9 +3292,9 @@ make_block_states! { cut_red_sandstone => BlockBehavior::default(), { }, red_sandstone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, oak_slab => BlockBehavior::default(), { @@ -3314,37 +3390,37 @@ make_block_states! { smooth_red_sandstone => BlockBehavior::default(), { }, spruce_fence_gate => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, InWall=False, Open=False, Powered=False, }, birch_fence_gate => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, InWall=False, Open=False, Powered=False, }, jungle_fence_gate => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, InWall=False, Open=False, Powered=False, }, acacia_fence_gate => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, InWall=False, Open=False, Powered=False, }, dark_oak_fence_gate => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, InWall=False, Open=False, Powered=False, }, mangrove_fence_gate => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, InWall=False, Open=False, Powered=False, @@ -3392,49 +3468,49 @@ make_block_states! { West=False, }, spruce_door => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Half=Lower, Hinge=Left, Open=False, Powered=False, }, birch_door => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Half=Lower, Hinge=Left, Open=False, Powered=False, }, jungle_door => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Half=Lower, Hinge=Left, Open=False, Powered=False, }, acacia_door => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Half=Lower, Hinge=Left, Open=False, Powered=False, }, dark_oak_door => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Half=Lower, Hinge=Left, Open=False, Powered=False, }, mangrove_door => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Half=Lower, Hinge=Left, Open=False, Powered=False, }, end_rod => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, chorus_plant => BlockBehavior::default(), { Down=False, @@ -3453,9 +3529,9 @@ make_block_states! { Axis=Y, }, purpur_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, end_stone_bricks => BlockBehavior::default(), { @@ -3469,11 +3545,11 @@ make_block_states! { }, repeating_command_block => BlockBehavior::default(), { Conditional=False, - Facing=North, + FacingCubic=North, }, chain_command_block => BlockBehavior::default(), { Conditional=False, - Facing=North, + FacingCubic=North, }, frosted_ice => BlockBehavior::default(), { FrostedIceAge=_0, @@ -3490,107 +3566,107 @@ make_block_states! { structure_void => BlockBehavior::default(), { }, observer => BlockBehavior::default(), { - Facing=South, + FacingCubic=South, Powered=False, }, shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, white_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, orange_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, magenta_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, light_blue_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, yellow_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, lime_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, pink_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, gray_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, light_gray_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, cyan_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, purple_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, blue_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, brown_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, green_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, red_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, black_shulker_box => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, }, white_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, orange_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, magenta_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, light_blue_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, yellow_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, lime_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, pink_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, gray_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, light_gray_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, cyan_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, purple_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, blue_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, brown_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, green_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, red_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, black_glazed_terracotta => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, white_concrete => BlockBehavior::default(), { }, @@ -3748,43 +3824,43 @@ make_block_states! { Waterlogged=True, }, dead_tube_coral_wall_fan => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=True, }, dead_brain_coral_wall_fan => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=True, }, dead_bubble_coral_wall_fan => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=True, }, dead_fire_coral_wall_fan => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=True, }, dead_horn_coral_wall_fan => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=True, }, tube_coral_wall_fan => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=True, }, brain_coral_wall_fan => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=True, }, bubble_coral_wall_fan => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=True, }, fire_coral_wall_fan => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=True, }, horn_coral_wall_fan => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=True, }, sea_pickle => BlockBehavior::default(), { @@ -3813,87 +3889,87 @@ make_block_states! { DragDown=True, }, polished_granite_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, smooth_red_sandstone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, mossy_stone_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, polished_diorite_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, mossy_cobblestone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, end_stone_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, stone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, smooth_sandstone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, smooth_quartz_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, granite_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, andesite_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, red_nether_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, polished_andesite_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, diorite_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, polished_granite_slab => BlockBehavior::default(), { @@ -4058,18 +4134,18 @@ make_block_states! { Waterlogged=False, }, loom => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, barrel => BlockBehavior::default(), { - Facing=North, + FacingCubic=North, Open=False, }, smoker => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Lit=False, }, blast_furnace => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Lit=False, }, cartography_table => BlockBehavior::default(), { @@ -4078,21 +4154,21 @@ make_block_states! { }, grindstone => BlockBehavior::default(), { Face=Wall, - Facing=North, + FacingCardinal=North, }, lectern => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, HasBook=False, Powered=False, }, smithing_table => BlockBehavior::default(), { }, stonecutter => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, }, bell => BlockBehavior::default(), { Attachment=Floor, - Facing=North, + FacingCardinal=North, Powered=False, }, lantern => BlockBehavior::default(), { @@ -4104,13 +4180,13 @@ make_block_states! { Waterlogged=False, }, campfire => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Lit=True, SignalFire=False, Waterlogged=False, }, soul_campfire => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Lit=True, SignalFire=False, Waterlogged=False, @@ -4203,62 +4279,62 @@ make_block_states! { West=False, }, crimson_trapdoor => BlockBehavior::default(), { - Facing=North, - Half=Bottom, + FacingCardinal=North, + TopBottom=Bottom, Open=False, Powered=False, Waterlogged=False, }, warped_trapdoor => BlockBehavior::default(), { - Facing=North, - Half=Bottom, + FacingCardinal=North, + TopBottom=Bottom, Open=False, Powered=False, Waterlogged=False, }, crimson_fence_gate => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, InWall=False, Open=False, Powered=False, }, warped_fence_gate => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, InWall=False, Open=False, Powered=False, }, crimson_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, warped_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, crimson_button => BlockBehavior::default(), { Face=Wall, - Facing=North, + FacingCardinal=North, Powered=False, }, warped_button => BlockBehavior::default(), { Face=Wall, - Facing=North, + FacingCardinal=North, Powered=False, }, crimson_door => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Half=Lower, Hinge=Left, Open=False, Powered=False, }, warped_door => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Half=Lower, Hinge=Left, Open=False, @@ -4273,11 +4349,11 @@ make_block_states! { Waterlogged=False, }, crimson_wall_sign => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=False, }, warped_wall_sign => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=False, }, structure_block => BlockBehavior::default(), { @@ -4293,11 +4369,11 @@ make_block_states! { TargetOutputPower=_0, }, bee_nest => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, BeeNestHoneyLevel=_0, }, beehive => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, BeehiveHoneyLevel=_0, }, honey_block => BlockBehavior::default(), { @@ -4326,9 +4402,9 @@ make_block_states! { blackstone => BlockBehavior::default(), { }, blackstone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, blackstone_wall => BlockBehavior::default(), { @@ -4356,9 +4432,9 @@ make_block_states! { Waterlogged=False, }, polished_blackstone_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, polished_blackstone_brick_wall => BlockBehavior::default(), { @@ -4372,9 +4448,9 @@ make_block_states! { gilded_blackstone => BlockBehavior::default(), { }, polished_blackstone_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, polished_blackstone_slab => BlockBehavior::default(), { @@ -4386,7 +4462,7 @@ make_block_states! { }, polished_blackstone_button => BlockBehavior::default(), { Face=Wall, - Facing=North, + FacingCardinal=North, Powered=False, }, polished_blackstone_wall => BlockBehavior::default(), { @@ -4544,19 +4620,19 @@ make_block_states! { budding_amethyst => BlockBehavior::default(), { }, amethyst_cluster => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, Waterlogged=False, }, large_amethyst_bud => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, Waterlogged=False, }, medium_amethyst_bud => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, Waterlogged=False, }, small_amethyst_bud => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, Waterlogged=False, }, tuff => BlockBehavior::default(), { @@ -4612,27 +4688,27 @@ make_block_states! { cut_copper => BlockBehavior::default(), { }, oxidized_cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, weathered_cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, exposed_cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, oxidized_cut_copper_slab => BlockBehavior::default(), { @@ -4668,27 +4744,27 @@ make_block_states! { waxed_cut_copper => BlockBehavior::default(), { }, waxed_oxidized_cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, waxed_weathered_cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, waxed_exposed_cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, waxed_cut_copper_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, waxed_oxidized_cut_copper_slab => BlockBehavior::default(), { @@ -4708,7 +4784,7 @@ make_block_states! { Waterlogged=False, }, lightning_rod => BlockBehavior::default(), { - Facing=Up, + FacingCubic=Up, Powered=False, Waterlogged=False, }, @@ -4720,7 +4796,7 @@ make_block_states! { dripstone_block => BlockBehavior::default(), { }, cave_vines => BlockBehavior::default(), { - _0__1__2__3__4__5__6__7__8__9__10__11__12__13__14__15__16__17__18__19__20__21__22__23__24__25=_0, + _0_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24_25=_0, True_False=False, }, cave_vines_plant => BlockBehavior::default(), { @@ -4737,16 +4813,16 @@ make_block_states! { moss_block => BlockBehavior::default(), { }, big_dripleaf => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Tilt=None, Waterlogged=False, }, big_dripleaf_stem => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Waterlogged=False, }, small_dripleaf => BlockBehavior::default(), { - Facing=North, + FacingCardinal=North, Half=Lower, Waterlogged=False, }, @@ -4763,9 +4839,9 @@ make_block_states! { cobbled_deepslate => BlockBehavior::default(), { }, cobbled_deepslate_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, cobbled_deepslate_slab => BlockBehavior::default(), { @@ -4783,9 +4859,9 @@ make_block_states! { polished_deepslate => BlockBehavior::default(), { }, polished_deepslate_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, polished_deepslate_slab => BlockBehavior::default(), { @@ -4803,9 +4879,9 @@ make_block_states! { deepslate_tiles => BlockBehavior::default(), { }, deepslate_tile_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, deepslate_tile_slab => BlockBehavior::default(), { @@ -4823,9 +4899,9 @@ make_block_states! { deepslate_bricks => BlockBehavior::default(), { }, deepslate_brick_stairs => BlockBehavior::default(), { - Facing=North, - Half=Bottom, - Shape=Straight, + FacingCardinal=North, + TopBottom=Bottom, + StairShape=Straight, Waterlogged=False, }, deepslate_brick_slab => BlockBehavior::default(), { diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index 4978da6f..b3df15cf 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -20,8 +20,29 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, ordered_blocks: li new_make_block_states_macro_code.append('make_block_states! {') def get_property_struct_name(property: Optional[dict], block_data_burger: dict, property_variants: list[str]) -> str: + # these are hardcoded because otherwise they cause conflicts + # some names inspired by https://github.com/feather-rs/feather/blob/main/feather/blocks/src/generated/table.rs + if property_variants == ['north', 'east', 'south', 'west', 'up', 'down']: + return 'FacingCubic' + if property_variants == ['north', 'south', 'west', 'east']: + return 'FacingCardinal' + if property_variants == ['top', 'bottom']: + return 'TopBottom' + if property_variants == ['north_south', 'east_west', 'ascending_east', 'ascending_west', 'ascending_north', 'ascending_south']: + return 'RailShape' + if property_variants == ['straight', 'inner_left', 'inner_right', 'outer_left', 'outer_right']: + return 'StairShape' + if property_variants == ['normal', 'sticky']: + return 'PistonType' + if property_variants == ['x', 'z']: + return 'AxisXZ' + if property_variants == ['single', 'left', 'right']: + return 'ChestType' + if property_variants == ['compare', 'subtract']: + return 'ComparatorType' + if property is None: - return '_'.join(map(to_camel_case, property_variants)) + return '_'.join(map(to_camel_case, property_variants)).replace('__', '_') property_name = None for class_name in [block_data_burger['class']] + block_data_burger['super']: @@ -34,6 +55,12 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, ordered_blocks: li if property['type'] == 'int': property_name = to_camel_case( block_data_burger['text_id']) + property_name + + # if property_variants == ['none', 'low', 'tall']: + + if property_variants == ['up', 'side', 'none']: + property_name = 'Wire' + to_camel_case(property_name) + return property_name # Find properties @@ -61,7 +88,14 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, ordered_blocks: li property_struct_name = get_property_struct_name( property_burger, block_data_burger, property_variants) - # assert property_name == property_burger['name'] + + if property_struct_name in properties: + if not properties[property_struct_name] == property_variants: + raise Exception( + 'There are multiple enums with the same name! ' + f'Name: {property_struct_name}, variants: {property_variants}/{properties[property_struct_name]}. ' + 'This can be fixed by hardcoding a name in the get_property_struct_name function.' + ) block_properties[property_struct_name] = property_variants From 5d5441427f21733046a8f4e5671276408f32c27f Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 16 Jun 2022 19:33:34 -0500 Subject: [PATCH 27/33] less underscores --- azalea-block/src/blocks.rs | 38 +++++++++++++++++++------------------- codegen/lib/code/blocks.py | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index 7f1ecbac..77fb8276 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -648,7 +648,7 @@ make_block_states! { _6, _7, }, - "berries" => True_False { + "berries" => TrueFalse { True, False, }, @@ -1691,7 +1691,7 @@ make_block_states! { Partial, Full, }, - "axis" => X_Y_Z { + "axis" => XYZ { X, Y, Z, @@ -2568,13 +2568,13 @@ make_block_states! { West=False, }, glow_lichen => BlockBehavior::default(), { - True_False=False, - True_False=False, - True_False=False, - True_False=False, - True_False=False, - True_False=False, - True_False=False, + TrueFalse=False, + TrueFalse=False, + TrueFalse=False, + TrueFalse=False, + TrueFalse=False, + TrueFalse=False, + TrueFalse=False, }, oak_fence_gate => BlockBehavior::default(), { FacingCardinal=North, @@ -4651,13 +4651,13 @@ make_block_states! { sculk => BlockBehavior::default(), { }, sculk_vein => BlockBehavior::default(), { - True_False=False, - True_False=False, - True_False=False, - True_False=False, - True_False=False, - True_False=False, - True_False=False, + TrueFalse=False, + TrueFalse=False, + TrueFalse=False, + TrueFalse=False, + TrueFalse=False, + TrueFalse=False, + TrueFalse=False, }, sculk_catalyst => BlockBehavior::default(), { Pulse=False, @@ -4797,10 +4797,10 @@ make_block_states! { }, cave_vines => BlockBehavior::default(), { _0_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24_25=_0, - True_False=False, + TrueFalse=False, }, cave_vines_plant => BlockBehavior::default(), { - True_False=False, + TrueFalse=False, }, spore_blossom => BlockBehavior::default(), { }, @@ -4923,7 +4923,7 @@ make_block_states! { cracked_deepslate_tiles => BlockBehavior::default(), { }, infested_deepslate => BlockBehavior::default(), { - X_Y_Z=Y, + XYZ=Y, }, smooth_basalt => BlockBehavior::default(), { }, diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index b3df15cf..f6d6bb4b 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -42,7 +42,7 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, ordered_blocks: li return 'ComparatorType' if property is None: - return '_'.join(map(to_camel_case, property_variants)).replace('__', '_') + return ''.join(map(to_camel_case, property_variants)) property_name = None for class_name in [block_data_burger['class']] + block_data_burger['super']: From 4f89f70091962c967a7022e6f293f11a446abc3c Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 16 Jun 2022 20:48:01 -0500 Subject: [PATCH 28/33] type -> kind --- azalea-block/src/blocks.rs | 6 +++--- azalea-block/src/lib.rs | 1 + codegen/lib/code/blocks.py | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index 77fb8276..b8d204fd 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -272,7 +272,7 @@ make_block_states! { Upper, Lower, }, - "type" => PistonType { + "kind" => PistonType { Normal, Sticky, }, @@ -333,7 +333,7 @@ make_block_states! { OuterLeft, OuterRight, }, - "type" => ChestType { + "kind" => ChestType { Single, Left, Right, @@ -936,7 +936,7 @@ make_block_states! { _14, _15, }, - "type" => Type { + "kind" => Type { Top, Bottom, Double, diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index 459b486e..01c86b11 100644 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -3,3 +3,4 @@ mod blocks; pub use behavior::BlockBehavior; pub use blocks::*; + diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index f6d6bb4b..4ab4917f 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -103,6 +103,10 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, ordered_blocks: li ending = property_name.split('_')[-1] if ending.isdigit(): property_name = property_name[:-(len(ending) + 1)] + + # `type` is a reserved keyword, so we use kind instead ¯\_(ツ)_/¯ + if property_name == 'type': + property_name = 'kind' property_struct_names_to_names[property_struct_name] = property_name properties.update(block_properties) From 74c3ae52f84d988b8bf3f0affe143d2cd2d8143a Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 16 Jun 2022 23:38:51 -0500 Subject: [PATCH 29/33] azalea-world uses azalea-block --- Cargo.lock | 1 + azalea-block/block-macros/src/lib.rs | 12 ++++++++ azalea-block/src/lib.rs | 41 ++++++++++++++++++++++++++++ azalea-world/Cargo.toml | 1 + azalea-world/src/bit_storage.rs | 6 ++++ azalea-world/src/lib.rs | 21 ++++++++++---- 6 files changed, 76 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1ef95311..f3b5df08 100755 --- a/Cargo.lock +++ b/Cargo.lock @@ -183,6 +183,7 @@ dependencies = [ name = "azalea-world" version = "0.1.0" dependencies = [ + "azalea-block", "azalea-core", "azalea-nbt", "azalea-protocol", diff --git a/azalea-block/block-macros/src/lib.rs b/azalea-block/block-macros/src/lib.rs index d38062d4..6206bb65 100644 --- a/azalea-block/block-macros/src/lib.rs +++ b/azalea-block/block-macros/src/lib.rs @@ -461,9 +461,12 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { block_structs.extend(block_struct); } + let last_state_id = (state_id - 1) as u32; quote! { #property_enums + #[repr(u32)] + #[derive(Copy, Clone, PartialEq, Eq, Debug)] pub enum BlockState { #block_state_enum_variants } @@ -479,6 +482,15 @@ pub fn make_block_states(input: TokenStream) -> TokenStream { } } } + + impl BlockState { + /// Returns the highest possible state + #[inline] + pub fn max_state() -> u32 { + #last_state_id + } + } + } .into() } diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index 01c86b11..95e8ce37 100644 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -4,3 +4,44 @@ mod blocks; pub use behavior::BlockBehavior; pub use blocks::*; +use std::mem; + +impl BlockState { + /// Transmutes a u32 to a block state. UB if the value is not a valid block + /// state. + #[inline] + pub unsafe fn from_u32_unsafe(state_id: u32) -> Self { + mem::transmute::(state_id) + } + + #[inline] + pub fn is_valid_state(state_id: u32) -> bool { + state_id <= Self::max_state() + } +} + +impl TryFrom for BlockState { + type Error = (); + + /// Safely converts a state id to a block state. + fn try_from(state_id: u32) -> Result { + if Self::is_valid_state(state_id) { + Ok(unsafe { Self::from_u32_unsafe(state_id) }) + } else { + Err(()) + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_from_u32() { + assert_eq!(BlockState::try_from(0).unwrap(), BlockState::Air); + + assert!(BlockState::try_from(BlockState::max_state()).is_ok()); + assert!(BlockState::try_from(BlockState::max_state() + 1).is_err()); + } +} diff --git a/azalea-world/Cargo.toml b/azalea-world/Cargo.toml index e8d81ac3..79e6155d 100644 --- a/azalea-world/Cargo.toml +++ b/azalea-world/Cargo.toml @@ -9,3 +9,4 @@ version = "0.1.0" azalea-core = {path = "../azalea-core"} azalea-nbt = {path = "../azalea-nbt"} azalea-protocol = {path = "../azalea-protocol"} +azalea-block = {path = "../azalea-block"} diff --git a/azalea-world/src/bit_storage.rs b/azalea-world/src/bit_storage.rs index aba52aef..c69cb216 100644 --- a/azalea-world/src/bit_storage.rs +++ b/azalea-world/src/bit_storage.rs @@ -188,6 +188,12 @@ impl BitStorage { let bit_index = (index - cell_index * self.values_per_long as usize) * self.bits; *cell = *cell & !(self.mask << bit_index) | (value & self.mask) << bit_index; } + + /// The number of entries. + #[inline] + pub fn size(&self) -> usize { + self.size + } } #[cfg(test)] diff --git a/azalea-world/src/lib.rs b/azalea-world/src/lib.rs index 766c61f0..8777c0a3 100644 --- a/azalea-world/src/lib.rs +++ b/azalea-world/src/lib.rs @@ -8,6 +8,7 @@ use azalea_core::{BlockPos, ChunkBlockPos, ChunkPos, ChunkSectionBlockPos}; use azalea_protocol::mc_buf::{McBufReadable, McBufWritable}; pub use bit_storage::BitStorage; use palette::PalettedContainer; +use azalea_block::BlockState; use std::{ io::{Read, Write}, ops::{Index, IndexMut}, @@ -57,7 +58,7 @@ impl World { self.storage.view_center = *pos; } - pub fn get_block_state(&self, pos: &BlockPos) -> Option { + pub fn get_block_state(&self, pos: &BlockPos) -> Option { self.storage.get_block_state(pos, self.min_y) } } @@ -122,7 +123,7 @@ impl ChunkStorage { && (chunk_pos.z - self.view_center.z).unsigned_abs() <= self.chunk_radius } - pub fn get_block_state(&self, pos: &BlockPos, min_y: i32) -> Option { + pub fn get_block_state(&self, pos: &BlockPos, min_y: i32) -> Option { let chunk_pos = ChunkPos::from(pos); println!("chunk_pos {:?} block_pos {:?}", chunk_pos, pos); let chunk = &self[&chunk_pos]; @@ -175,7 +176,7 @@ impl Chunk { (y.div_floor(16) - min_section_index) as u32 } - pub fn get(&self, pos: &ChunkBlockPos, min_y: i32) -> u32 { + pub fn get(&self, pos: &ChunkBlockPos, min_y: i32) -> BlockState { let section_index = self.section_index(pos.y, min_y); // TODO: make sure the section exists let section = &self.sections[section_index as usize]; @@ -210,6 +211,14 @@ impl McBufReadable for Section { // "A section has more blocks than what should be possible. This is a bug!" // ); let states = PalettedContainer::read_with_type(buf, &PalettedContainerType::BlockStates)?; + for i in 0..states.storage.size() { + if !BlockState::is_valid_state(states.storage.get(i) as u32) { + return Err(format!( + "Invalid block state {} (index {}) found in section.", + states.storage.get(i), i + )); + } + } let biomes = PalettedContainer::read_with_type(buf, &PalettedContainerType::Biomes)?; Ok(Section { block_count, @@ -229,9 +238,9 @@ impl McBufWritable for Section { } impl Section { - // TODO: return a BlockState instead of a u32 - fn get(&self, pos: ChunkSectionBlockPos) -> u32 { + fn get(&self, pos: ChunkSectionBlockPos) -> BlockState { + // TODO: use the unsafe method and do the check earlier self.states - .get(pos.x as usize, pos.y as usize, pos.z as usize) + .get(pos.x as usize, pos.y as usize, pos.z as usize).try_into().expect("Invalid block state.") } } From 69e1125ecbb3e695125b8e65deba3e3f7be41b70 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 17 Jun 2022 15:59:27 -0500 Subject: [PATCH 30/33] Slightly improve bit storage --- .vscode/settings.json | 2 +- azalea-world/src/bit_storage.rs | 12 ++++++------ azalea-world/src/lib.rs | 4 ++++ bot/src/main.rs | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index b0d07499..3b614348 100755 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "editor.formatOnSave": false + "editor.formatOnSave": true } \ No newline at end of file diff --git a/azalea-world/src/bit_storage.rs b/azalea-world/src/bit_storage.rs index c69cb216..0dc81f9a 100644 --- a/azalea-world/src/bit_storage.rs +++ b/azalea-world/src/bit_storage.rs @@ -77,8 +77,8 @@ pub struct BitStorage { mask: u64, size: usize, values_per_long: u8, - divide_mul: i32, - divide_add: i32, + divide_mul: u64, + divide_add: u64, divide_shift: i32, } @@ -138,16 +138,16 @@ impl BitStorage { mask, size, values_per_long: values_per_long as u8, - divide_mul, - divide_add, + divide_mul: divide_mul as u32 as u64, + divide_add: divide_add as u32 as u64, divide_shift, }) } pub fn cell_index(&self, index: u64) -> usize { // as unsigned wrap - let first = self.divide_mul as u32 as u64; - let second = self.divide_add as u64; + let first = self.divide_mul; + let second = self.divide_add; (((index * first) + second) >> 32 >> self.divide_shift) .try_into() diff --git a/azalea-world/src/lib.rs b/azalea-world/src/lib.rs index 8777c0a3..26566416 100644 --- a/azalea-world/src/lib.rs +++ b/azalea-world/src/lib.rs @@ -205,12 +205,15 @@ pub struct Section { impl McBufReadable for Section { fn read_into(buf: &mut impl Read) -> Result { let block_count = u16::read_into(buf)?; + // this is commented out because the vanilla server is wrong // assert!( // block_count <= 16 * 16 * 16, // "A section has more blocks than what should be possible. This is a bug!" // ); + let states = PalettedContainer::read_with_type(buf, &PalettedContainerType::BlockStates)?; + for i in 0..states.storage.size() { if !BlockState::is_valid_state(states.storage.get(i) as u32) { return Err(format!( @@ -219,6 +222,7 @@ impl McBufReadable for Section { )); } } + let biomes = PalettedContainer::read_with_type(buf, &PalettedContainerType::Biomes)?; Ok(Section { block_count, diff --git a/bot/src/main.rs b/bot/src/main.rs index 8ad74ec4..cd27ba5a 100644 --- a/bot/src/main.rs +++ b/bot/src/main.rs @@ -6,7 +6,7 @@ async fn main() { println!("Hello, world!"); // let address = "95.111.249.143:10000"; - let address = "localhost:65519"; + let address = "localhost:51028"; // let response = azalea_client::ping::ping_server(&address.try_into().unwrap()) // .await // .unwrap(); From d0fc7d0eff32687d7210b730584db2c3faa055ae Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 17 Jun 2022 16:27:58 -0500 Subject: [PATCH 31/33] ClientboundSetEquipmentPacket --- azalea-block/src/blocks.rs | 2 +- azalea-block/src/lib.rs | 52 ++++++------- .../game/clientbound_set_equipment_packet.rs | 74 +++++++++++++++++++ azalea-protocol/src/packets/game/mod.rs | 2 + azalea-world/src/lib.rs | 9 ++- codegen/lib/code/packet.py | 9 ++- codegen/lib/code/utils.py | 5 +- codegen/lib/code/version.py | 2 +- 8 files changed, 118 insertions(+), 37 deletions(-) create mode 100644 azalea-protocol/src/packets/game/clientbound_set_equipment_packet.rs diff --git a/azalea-block/src/blocks.rs b/azalea-block/src/blocks.rs index b8d204fd..05973797 100644 --- a/azalea-block/src/blocks.rs +++ b/azalea-block/src/blocks.rs @@ -4951,4 +4951,4 @@ make_block_states! { reinforced_deepslate => BlockBehavior::default(), { }, } -} \ No newline at end of file +} diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index 95e8ce37..a6de1e92 100644 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -7,41 +7,41 @@ pub use blocks::*; use std::mem; impl BlockState { - /// Transmutes a u32 to a block state. UB if the value is not a valid block - /// state. - #[inline] - pub unsafe fn from_u32_unsafe(state_id: u32) -> Self { - mem::transmute::(state_id) - } + /// Transmutes a u32 to a block state. UB if the value is not a valid block + /// state. + #[inline] + pub unsafe fn from_u32_unsafe(state_id: u32) -> Self { + mem::transmute::(state_id) + } - #[inline] - pub fn is_valid_state(state_id: u32) -> bool { - state_id <= Self::max_state() - } + #[inline] + pub fn is_valid_state(state_id: u32) -> bool { + state_id <= Self::max_state() + } } impl TryFrom for BlockState { - type Error = (); + type Error = (); - /// Safely converts a state id to a block state. - fn try_from(state_id: u32) -> Result { - if Self::is_valid_state(state_id) { - Ok(unsafe { Self::from_u32_unsafe(state_id) }) - } else { - Err(()) - } - } + /// Safely converts a state id to a block state. + fn try_from(state_id: u32) -> Result { + if Self::is_valid_state(state_id) { + Ok(unsafe { Self::from_u32_unsafe(state_id) }) + } else { + Err(()) + } + } } #[cfg(test)] mod tests { - use super::*; + use super::*; - #[test] - fn test_from_u32() { - assert_eq!(BlockState::try_from(0).unwrap(), BlockState::Air); + #[test] + fn test_from_u32() { + assert_eq!(BlockState::try_from(0).unwrap(), BlockState::Air); - assert!(BlockState::try_from(BlockState::max_state()).is_ok()); - assert!(BlockState::try_from(BlockState::max_state() + 1).is_err()); - } + assert!(BlockState::try_from(BlockState::max_state()).is_ok()); + assert!(BlockState::try_from(BlockState::max_state() + 1).is_err()); + } } diff --git a/azalea-protocol/src/packets/game/clientbound_set_equipment_packet.rs b/azalea-protocol/src/packets/game/clientbound_set_equipment_packet.rs new file mode 100644 index 00000000..3acbd58f --- /dev/null +++ b/azalea-protocol/src/packets/game/clientbound_set_equipment_packet.rs @@ -0,0 +1,74 @@ +use azalea_core::Slot; +use packet_macros::{GamePacket, McBuf}; + +use crate::mc_buf::{McBufReadable, McBufWritable}; + +#[derive(Clone, Debug, McBuf, GamePacket)] +pub struct ClientboundSetEquipmentPacket { + #[var] + pub entity: i32, + pub slots: EquipmentSlots, +} + +#[derive(Clone, Debug)] +pub struct EquipmentSlots { + pub slots: Vec<(EquipmentSlot, Slot)>, +} + +impl McBufReadable for EquipmentSlots { + fn read_into(buf: &mut impl std::io::Read) -> Result { + let mut slots = vec![]; + + loop { + let equipment_byte = u8::read_into(buf)?; + let equipment_slot = EquipmentSlot::from_byte(equipment_byte & 127) + .ok_or_else(|| format!("Invalid equipment slot byte {}", equipment_byte))?; + let item = Slot::read_into(buf)?; + slots.push((equipment_slot, item)); + if equipment_byte & 128 == 0 { + break; + }; + } + + Ok(EquipmentSlots { slots }) + } +} +impl McBufWritable for EquipmentSlots { + fn write_into(&self, buf: &mut impl std::io::Write) -> Result<(), std::io::Error> { + for i in 0..self.slots.len() { + let (equipment_slot, item) = &self.slots[i]; + let mut equipment_byte = *equipment_slot as u8; + if i != self.slots.len() - 1 { + equipment_byte |= 128; + } + equipment_byte.write_into(buf)?; + item.write_into(buf)?; + } + + Ok(()) + } +} + +#[derive(Clone, Debug, Copy, McBuf)] +pub enum EquipmentSlot { + MainHand = 0, + OffHand = 1, + Feet = 2, + Legs = 3, + Chest = 4, + Head = 5, +} + +impl EquipmentSlot { + pub fn from_byte(byte: u8) -> Option { + match byte { + 0 => Some(EquipmentSlot::MainHand), + 1 => Some(EquipmentSlot::OffHand), + 2 => Some(EquipmentSlot::Feet), + 3 => Some(EquipmentSlot::Legs), + 4 => Some(EquipmentSlot::Chest), + 5 => Some(EquipmentSlot::Head), + _ => None, + } + } +} diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index eee36788..c4435636 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -37,6 +37,7 @@ pub mod clientbound_set_default_spawn_position_packet; pub mod clientbound_set_display_chat_preview_packet; pub mod clientbound_set_entity_data_packet; pub mod clientbound_set_entity_link_packet; +pub mod clientbound_set_equipment_packet; pub mod clientbound_set_experience_packet; pub mod clientbound_set_health_packet; pub mod clientbound_set_time_packet; @@ -104,6 +105,7 @@ declare_state_packets!( 0x4b: clientbound_set_display_chat_preview_packet::ClientboundSetDisplayChatPreviewPacket, 0x4d: clientbound_set_entity_data_packet::ClientboundSetEntityDataPacket, 0x4f: clientbound_entity_velocity_packet::ClientboundEntityVelocityPacket, + 0x50: clientbound_set_equipment_packet::ClientboundSetEquipmentPacket, 0x51: clientbound_set_experience_packet::ClientboundSetExperiencePacket, 0x52: clientbound_set_health_packet::ClientboundSetHealthPacket, 0x59: clientbound_set_time_packet::ClientboundSetTimePacket, diff --git a/azalea-world/src/lib.rs b/azalea-world/src/lib.rs index 26566416..e651e455 100644 --- a/azalea-world/src/lib.rs +++ b/azalea-world/src/lib.rs @@ -4,11 +4,11 @@ mod bit_storage; mod palette; use crate::palette::PalettedContainerType; +use azalea_block::BlockState; use azalea_core::{BlockPos, ChunkBlockPos, ChunkPos, ChunkSectionBlockPos}; use azalea_protocol::mc_buf::{McBufReadable, McBufWritable}; pub use bit_storage::BitStorage; use palette::PalettedContainer; -use azalea_block::BlockState; use std::{ io::{Read, Write}, ops::{Index, IndexMut}, @@ -218,7 +218,8 @@ impl McBufReadable for Section { if !BlockState::is_valid_state(states.storage.get(i) as u32) { return Err(format!( "Invalid block state {} (index {}) found in section.", - states.storage.get(i), i + states.storage.get(i), + i )); } } @@ -245,6 +246,8 @@ impl Section { fn get(&self, pos: ChunkSectionBlockPos) -> BlockState { // TODO: use the unsafe method and do the check earlier self.states - .get(pos.x as usize, pos.y as usize, pos.z as usize).try_into().expect("Invalid block state.") + .get(pos.x as usize, pos.y as usize, pos.z as usize) + .try_into() + .expect("Invalid block state.") } } diff --git a/codegen/lib/code/packet.py b/codegen/lib/code/packet.py index 36e0ba0c..2aabf39a 100644 --- a/codegen/lib/code/packet.py +++ b/codegen/lib/code/packet.py @@ -1,6 +1,6 @@ -from .utils import burger_type_to_rust_type, write_packet_file -from ..utils import padded_hex, to_snake_case, to_camel_case -from ..mappings import Mappings +from lib.code.utils import burger_type_to_rust_type, write_packet_file +from lib.utils import padded_hex, to_snake_case, to_camel_case, get_dir_location +from lib.mappings import Mappings import os @@ -74,7 +74,8 @@ def generate_packet(burger_packets, mappings: Mappings, target_packet_id, target '\n'.join(generated_packet_code)) print() - mod_rs_dir = f'../azalea-protocol/src/packets/{state}/mod.rs' + mod_rs_dir = get_dir_location( + f'../azalea-protocol/src/packets/{state}/mod.rs') with open(mod_rs_dir, 'r') as f: mod_rs = f.read().splitlines() diff --git a/codegen/lib/code/utils.py b/codegen/lib/code/utils.py index 28a5ef3c..ecfff4fb 100644 --- a/codegen/lib/code/utils.py +++ b/codegen/lib/code/utils.py @@ -1,4 +1,5 @@ +from lib.utils import get_dir_location import os # utilities specifically for codegen @@ -67,9 +68,9 @@ def burger_type_to_rust_type(burger_type): def write_packet_file(state, packet_name_snake_case, code): - with open(f'../azalea-protocol/src/packets/{state}/{packet_name_snake_case}.rs', 'w') as f: + with open(get_dir_location(f'../azalea-protocol/src/packets/{state}/{packet_name_snake_case}.rs'), 'w') as f: f.write(code) def fmt(): - os.system('cd .. && cargo fmt') + os.system(f'cd {get_dir_location("..")} && cargo fmt') diff --git a/codegen/lib/code/version.py b/codegen/lib/code/version.py index 4c8500be..511d30d1 100644 --- a/codegen/lib/code/version.py +++ b/codegen/lib/code/version.py @@ -1,6 +1,6 @@ +from lib.utils import get_dir_location import re import os -from lib.utils import get_dir_location README_DIR = get_dir_location('../README.md') VERSION_REGEX = r'\*Currently supported Minecraft version: `(.*)`.\*' From d27d283686d2920d7a7c08087e2d5a39c63fae1c Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 17 Jun 2022 16:34:34 -0500 Subject: [PATCH 32/33] Update ClientboundSoundPacket to 1.19 --- azalea-client/src/connect.rs | 3 +++ azalea-protocol/src/packets/game/clientbound_sound_packet.rs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/azalea-client/src/connect.rs b/azalea-client/src/connect.rs index cb2bec9c..4ef3df63 100755 --- a/azalea-client/src/connect.rs +++ b/azalea-client/src/connect.rs @@ -447,6 +447,9 @@ impl Client { GamePacket::ClientboundServerDataPacket(p) => { println!("Got server data packet {:?}", p); } + GamePacket::ClientboundSetEquipmentPacket(p) => { + println!("Got set equipment packet {:?}", p); + } _ => panic!("Unexpected packet {:?}", packet), } } diff --git a/azalea-protocol/src/packets/game/clientbound_sound_packet.rs b/azalea-protocol/src/packets/game/clientbound_sound_packet.rs index 797f03de..fbc5830b 100644 --- a/azalea-protocol/src/packets/game/clientbound_sound_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_sound_packet.rs @@ -3,7 +3,7 @@ use packet_macros::{GamePacket, McBuf}; #[derive(Clone, Debug, McBuf, GamePacket)] pub struct ClientboundSoundPacket { #[var] - /// TODO: use the sound registry instead of just being a u32 + // TODO: use the sound registry instead of just being a u32 pub sound: u32, pub source: SoundSource, pub x: i32, @@ -11,6 +11,8 @@ pub struct ClientboundSoundPacket { pub z: i32, pub volume: f32, pub pitch: f32, + /// Seed used to pick sound varient. + pub seed: u64, } #[derive(Clone, Debug, Copy, McBuf)] From 0a945e73ec43b3b0389e004e138c83f41cddc532 Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 17 Jun 2022 18:09:34 -0500 Subject: [PATCH 33/33] EntityPos --- azalea-client/src/connect.rs | 7 ++++++- azalea-client/src/entity.rs | 5 ++++- azalea-client/src/player.rs | 2 +- azalea-core/src/lib.rs | 4 +--- azalea-core/src/position.rs | 17 +++++++++++++++++ .../game/clientbound_add_entity_packet.rs | 1 + bot/src/main.rs | 4 ++++ 7 files changed, 34 insertions(+), 6 deletions(-) diff --git a/azalea-client/src/connect.rs b/azalea-client/src/connect.rs index 4ef3df63..1551ca69 100755 --- a/azalea-client/src/connect.rs +++ b/azalea-client/src/connect.rs @@ -1,5 +1,5 @@ use crate::Player; -use azalea_core::{resource_location::ResourceLocation, ChunkPos}; +use azalea_core::{resource_location::ResourceLocation, ChunkPos, EntityPos}; use azalea_protocol::{ connect::{GameConnection, HandshakeConnection}, packets::{ @@ -351,6 +351,11 @@ impl Client { } GamePacket::ClientboundAddEntityPacket(p) => { println!("Got add entity packet {:?}", p); + let pos = EntityPos { + x: p.x, + y: p.y, + z: p.z, + }; } GamePacket::ClientboundSetEntityDataPacket(p) => { // println!("Got set entity data packet {:?}", p); diff --git a/azalea-client/src/entity.rs b/azalea-client/src/entity.rs index ed8aa68d..d91f556f 100644 --- a/azalea-client/src/entity.rs +++ b/azalea-client/src/entity.rs @@ -1,5 +1,8 @@ -#[derive(Default)] +use azalea_core::EntityPos; + +#[derive(Default, Debug)] pub struct Entity { /// The incremental numerical id of the entity. pub id: u32, + pub pos: EntityPos, } diff --git a/azalea-client/src/player.rs b/azalea-client/src/player.rs index fc54ff93..04d34f6d 100644 --- a/azalea-client/src/player.rs +++ b/azalea-client/src/player.rs @@ -1,6 +1,6 @@ use crate::Entity; -#[derive(Default)] +#[derive(Default, Debug)] pub struct Player { /// The entity attached to the player. There's some useful fields here. pub entity: Entity, diff --git a/azalea-core/src/lib.rs b/azalea-core/src/lib.rs index cdb32ea9..a2632871 100755 --- a/azalea-core/src/lib.rs +++ b/azalea-core/src/lib.rs @@ -11,9 +11,7 @@ mod slot; pub use slot::{Slot, SlotData}; mod position; -pub use position::{ - BlockPos, ChunkBlockPos, ChunkPos, ChunkSectionBlockPos, ChunkSectionPos, GlobalPos, -}; +pub use position::*; mod direction; pub use direction::Direction; diff --git a/azalea-core/src/position.rs b/azalea-core/src/position.rs index d5c97eab..24be5f6a 100644 --- a/azalea-core/src/position.rs +++ b/azalea-core/src/position.rs @@ -147,6 +147,23 @@ pub struct GlobalPos { pub dimension: ResourceLocation, } +#[derive(Debug, Clone, Default)] +pub struct EntityPos { + pub x: f64, + pub y: f64, + pub z: f64, +} + +impl From<&EntityPos> for BlockPos { + fn from(pos: &EntityPos) -> Self { + BlockPos { + x: pos.x as i32, + y: pos.y as i32, + z: pos.z as i32, + } + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs b/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs index 8a8a713e..9ef7e05c 100644 --- a/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_add_entity_packet.rs @@ -3,6 +3,7 @@ use uuid::Uuid; #[derive(Clone, Debug, McBuf, GamePacket)] pub struct ClientboundAddEntityPacket { + /// The id of the entity. #[var] pub id: u32, pub uuid: Uuid, diff --git a/bot/src/main.rs b/bot/src/main.rs index cd27ba5a..2618675e 100644 --- a/bot/src/main.rs +++ b/bot/src/main.rs @@ -21,6 +21,10 @@ async fn main() { // TODO: have a "loaded" or "ready" event that fires when all chunks are loaded Event::Login => {} Event::Chat(p) => { + let state = client.state.lock().await; + let world = state.world.as_ref().unwrap(); + // println!("{:?}", state.player.entity); + // world.get_block_state(state.player.entity.pos); // println!("{}", p.message.to_ansi(None)); // if p.message.to_ansi(None) == " ok" { // let state = client.state.lock().await;