From c97ab91afbc3ac6723c96b0f6f69298092ec793a Mon Sep 17 00:00:00 2001 From: Dries C Date: Thu, 13 Jun 2024 20:34:43 +0200 Subject: [PATCH] Fix codestyle --- src/data/bedrock/BedrockDataFiles.php | 5 +++++ src/data/bedrock/ItemTagToIdMap.php | 1 + src/network/mcpe/convert/BlockTranslator.php | 4 ++++ src/network/mcpe/convert/ItemTranslator.php | 2 ++ .../mcpe/convert/ItemTypeDictionaryFromDataHelper.php | 1 + 5 files changed, 13 insertions(+) diff --git a/src/data/bedrock/BedrockDataFiles.php b/src/data/bedrock/BedrockDataFiles.php index b449c4f0d12..656f75f02f5 100644 --- a/src/data/bedrock/BedrockDataFiles.php +++ b/src/data/bedrock/BedrockDataFiles.php @@ -40,6 +40,7 @@ private function __construct(){ public const BLOCK_ID_TO_ITEM_ID_MAP_1_20_50_JSON = BEDROCK_DATA_PATH . '/block_id_to_item_id_map-1.20.50.json'; public const BLOCK_ID_TO_ITEM_ID_MAP_1_20_60_JSON = BEDROCK_DATA_PATH . '/block_id_to_item_id_map-1.20.60.json'; public const BLOCK_ID_TO_ITEM_ID_MAP_1_20_70_JSON = BEDROCK_DATA_PATH . '/block_id_to_item_id_map-1.20.70.json'; + public const BLOCK_ID_TO_ITEM_ID_MAP_1_20_80_JSON = BEDROCK_DATA_PATH . '/block_id_to_item_id_map-1.20.80.json'; public const BLOCK_ID_TO_ITEM_ID_MAP_JSON = BEDROCK_DATA_PATH . '/block_id_to_item_id_map.json'; public const BLOCK_STATE_META_MAP_1_20_0_JSON = BEDROCK_DATA_PATH . '/block_state_meta_map-1.20.0.json'; public const BLOCK_STATE_META_MAP_1_20_10_JSON = BEDROCK_DATA_PATH . '/block_state_meta_map-1.20.10.json'; @@ -48,6 +49,7 @@ private function __construct(){ public const BLOCK_STATE_META_MAP_1_20_50_JSON = BEDROCK_DATA_PATH . '/block_state_meta_map-1.20.50.json'; public const BLOCK_STATE_META_MAP_1_20_60_JSON = BEDROCK_DATA_PATH . '/block_state_meta_map-1.20.60.json'; public const BLOCK_STATE_META_MAP_1_20_70_JSON = BEDROCK_DATA_PATH . '/block_state_meta_map-1.20.70.json'; + public const BLOCK_STATE_META_MAP_1_20_80_JSON = BEDROCK_DATA_PATH . '/block_state_meta_map-1.20.80.json'; public const BLOCK_STATE_META_MAP_JSON = BEDROCK_DATA_PATH . '/block_state_meta_map.json'; public const CANONICAL_BLOCK_STATES_1_20_0_NBT = BEDROCK_DATA_PATH . '/canonical_block_states-1.20.0.nbt'; public const CANONICAL_BLOCK_STATES_1_20_10_NBT = BEDROCK_DATA_PATH . '/canonical_block_states-1.20.10.nbt'; @@ -56,6 +58,7 @@ private function __construct(){ public const CANONICAL_BLOCK_STATES_1_20_50_NBT = BEDROCK_DATA_PATH . '/canonical_block_states-1.20.50.nbt'; public const CANONICAL_BLOCK_STATES_1_20_60_NBT = BEDROCK_DATA_PATH . '/canonical_block_states-1.20.60.nbt'; public const CANONICAL_BLOCK_STATES_1_20_70_NBT = BEDROCK_DATA_PATH . '/canonical_block_states-1.20.70.nbt'; + public const CANONICAL_BLOCK_STATES_1_20_80_NBT = BEDROCK_DATA_PATH . '/canonical_block_states-1.20.80.nbt'; public const CANONICAL_BLOCK_STATES_NBT = BEDROCK_DATA_PATH . '/canonical_block_states.nbt'; public const COMMAND_ARG_TYPES_JSON = BEDROCK_DATA_PATH . '/command_arg_types.json'; public const CREATIVEITEMS_JSON = BEDROCK_DATA_PATH . '/creativeitems.json'; @@ -72,6 +75,7 @@ private function __construct(){ public const R12_TO_CURRENT_BLOCK_MAP_1_20_50_BIN = BEDROCK_DATA_PATH . '/r12_to_current_block_map-1.20.50.bin'; public const R12_TO_CURRENT_BLOCK_MAP_1_20_60_BIN = BEDROCK_DATA_PATH . '/r12_to_current_block_map-1.20.60.bin'; public const R12_TO_CURRENT_BLOCK_MAP_1_20_70_BIN = BEDROCK_DATA_PATH . '/r12_to_current_block_map-1.20.70.bin'; + public const R12_TO_CURRENT_BLOCK_MAP_1_20_80_BIN = BEDROCK_DATA_PATH . '/r12_to_current_block_map-1.20.80.bin'; public const R12_TO_CURRENT_BLOCK_MAP_BIN = BEDROCK_DATA_PATH . '/r12_to_current_block_map.bin'; public const R16_TO_CURRENT_ITEM_MAP_JSON = BEDROCK_DATA_PATH . '/r16_to_current_item_map.json'; public const REQUIRED_ITEM_LIST_1_20_0_JSON = BEDROCK_DATA_PATH . '/required_item_list-1.20.0.json'; @@ -80,5 +84,6 @@ private function __construct(){ public const REQUIRED_ITEM_LIST_1_20_50_JSON = BEDROCK_DATA_PATH . '/required_item_list-1.20.50.json'; public const REQUIRED_ITEM_LIST_1_20_60_JSON = BEDROCK_DATA_PATH . '/required_item_list-1.20.60.json'; public const REQUIRED_ITEM_LIST_1_20_70_JSON = BEDROCK_DATA_PATH . '/required_item_list-1.20.70.json'; + public const REQUIRED_ITEM_LIST_1_20_80_JSON = BEDROCK_DATA_PATH . '/required_item_list-1.20.80.json'; public const REQUIRED_ITEM_LIST_JSON = BEDROCK_DATA_PATH . '/required_item_list.json'; } diff --git a/src/data/bedrock/ItemTagToIdMap.php b/src/data/bedrock/ItemTagToIdMap.php index e49d6832a5a..bc22917b59f 100644 --- a/src/data/bedrock/ItemTagToIdMap.php +++ b/src/data/bedrock/ItemTagToIdMap.php @@ -46,6 +46,7 @@ final class ItemTagToIdMap{ private const PATHS = [ ProtocolInfo::CURRENT_PROTOCOL => "", + ProtocolInfo::PROTOCOL_1_20_80 => "", ProtocolInfo::PROTOCOL_1_20_70 => "", ProtocolInfo::PROTOCOL_1_20_60 => "", ProtocolInfo::PROTOCOL_1_20_50 => "", diff --git a/src/network/mcpe/convert/BlockTranslator.php b/src/network/mcpe/convert/BlockTranslator.php index 604bff17943..27eb48966d9 100644 --- a/src/network/mcpe/convert/BlockTranslator.php +++ b/src/network/mcpe/convert/BlockTranslator.php @@ -46,6 +46,10 @@ final class BlockTranslator{ self::CANONICAL_BLOCK_STATES_PATH => '', self::BLOCK_STATE_META_MAP_PATH => '', ], + ProtocolInfo::PROTOCOL_1_20_80 => [ + self::CANONICAL_BLOCK_STATES_PATH => '-1.20.80', + self::BLOCK_STATE_META_MAP_PATH => '-1.20.80', + ], ProtocolInfo::PROTOCOL_1_20_70 => [ self::CANONICAL_BLOCK_STATES_PATH => '-1.20.70', self::BLOCK_STATE_META_MAP_PATH => '-1.20.70', diff --git a/src/network/mcpe/convert/ItemTranslator.php b/src/network/mcpe/convert/ItemTranslator.php index 734ff045928..1b5cabe5469 100644 --- a/src/network/mcpe/convert/ItemTranslator.php +++ b/src/network/mcpe/convert/ItemTranslator.php @@ -137,6 +137,8 @@ public function fromNetworkId(int $networkId, int $networkMeta, int $networkBloc public static function getItemSchemaId(int $protocolId) : int{ return match($protocolId){ + ProtocolInfo::PROTOCOL_1_21_0 => 191, + ProtocolInfo::PROTOCOL_1_20_80 => 181, ProtocolInfo::PROTOCOL_1_20_70 => 171, diff --git a/src/network/mcpe/convert/ItemTypeDictionaryFromDataHelper.php b/src/network/mcpe/convert/ItemTypeDictionaryFromDataHelper.php index ae5d1d601e1..957953d3fd4 100644 --- a/src/network/mcpe/convert/ItemTypeDictionaryFromDataHelper.php +++ b/src/network/mcpe/convert/ItemTypeDictionaryFromDataHelper.php @@ -40,6 +40,7 @@ final class ItemTypeDictionaryFromDataHelper{ private const PATHS = [ ProtocolInfo::CURRENT_PROTOCOL => "", + ProtocolInfo::PROTOCOL_1_20_80 => "-1.20.80", ProtocolInfo::PROTOCOL_1_20_70 => "-1.20.70", ProtocolInfo::PROTOCOL_1_20_60 => "-1.20.60", ProtocolInfo::PROTOCOL_1_20_50 => "-1.20.50",