Skip to content

Commit

Permalink
1.21.40 BC
Browse files Browse the repository at this point in the history
  • Loading branch information
dries-c committed Dec 5, 2024
1 parent 2780ce3 commit 0420e77
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 15 deletions.
30 changes: 15 additions & 15 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/data/bedrock/BedrockDataFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ private function __construct(){
public const BLOCK_ID_TO_ITEM_ID_MAP_1_21_2_JSON = BEDROCK_DATA_PATH . '/block_id_to_item_id_map-1.21.2.json';
public const BLOCK_ID_TO_ITEM_ID_MAP_1_21_20_JSON = BEDROCK_DATA_PATH . '/block_id_to_item_id_map-1.21.20.json';
public const BLOCK_ID_TO_ITEM_ID_MAP_1_21_30_JSON = BEDROCK_DATA_PATH . '/block_id_to_item_id_map-1.21.30.json';
public const BLOCK_ID_TO_ITEM_ID_MAP_1_21_40_JSON = BEDROCK_DATA_PATH . '/block_id_to_item_id_map-1.21.40.json';
public const BLOCK_ID_TO_ITEM_ID_MAP_JSON = BEDROCK_DATA_PATH . '/block_id_to_item_id_map.json';
public const BLOCK_PROPERTIES_TABLE_JSON = BEDROCK_DATA_PATH . '/block_properties_table.json';
public const BLOCK_STATE_META_MAP_1_20_0_JSON = BEDROCK_DATA_PATH . '/block_state_meta_map-1.20.0.json';
Expand All @@ -57,6 +58,7 @@ private function __construct(){
public const BLOCK_STATE_META_MAP_1_21_2_JSON = BEDROCK_DATA_PATH . '/block_state_meta_map-1.21.2.json';
public const BLOCK_STATE_META_MAP_1_21_20_JSON = BEDROCK_DATA_PATH . '/block_state_meta_map-1.21.20.json';
public const BLOCK_STATE_META_MAP_1_21_30_JSON = BEDROCK_DATA_PATH . '/block_state_meta_map-1.21.30.json';
public const BLOCK_STATE_META_MAP_1_21_40_JSON = BEDROCK_DATA_PATH . '/block_state_meta_map-1.21.40.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';
Expand All @@ -69,6 +71,7 @@ private function __construct(){
public const CANONICAL_BLOCK_STATES_1_21_2_NBT = BEDROCK_DATA_PATH . '/canonical_block_states-1.21.2.nbt';
public const CANONICAL_BLOCK_STATES_1_21_20_NBT = BEDROCK_DATA_PATH . '/canonical_block_states-1.21.20.nbt';
public const CANONICAL_BLOCK_STATES_1_21_30_NBT = BEDROCK_DATA_PATH . '/canonical_block_states-1.21.30.nbt';
public const CANONICAL_BLOCK_STATES_1_21_40_NBT = BEDROCK_DATA_PATH . '/canonical_block_states-1.21.40.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';
Expand Down Expand Up @@ -102,5 +105,6 @@ private function __construct(){
public const REQUIRED_ITEM_LIST_1_21_2_JSON = BEDROCK_DATA_PATH . '/required_item_list-1.21.2.json';
public const REQUIRED_ITEM_LIST_1_21_20_JSON = BEDROCK_DATA_PATH . '/required_item_list-1.21.20.json';
public const REQUIRED_ITEM_LIST_1_21_30_JSON = BEDROCK_DATA_PATH . '/required_item_list-1.21.30.json';
public const REQUIRED_ITEM_LIST_1_21_40_JSON = BEDROCK_DATA_PATH . '/required_item_list-1.21.40.json';
public const REQUIRED_ITEM_LIST_JSON = BEDROCK_DATA_PATH . '/required_item_list.json';
}
1 change: 1 addition & 0 deletions src/data/bedrock/ItemTagToIdMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ final class ItemTagToIdMap{

private const PATHS = [
ProtocolInfo::CURRENT_PROTOCOL => "",
ProtocolInfo::PROTOCOL_1_21_40 => "",
ProtocolInfo::PROTOCOL_1_21_30 => "",
ProtocolInfo::PROTOCOL_1_21_20 => "",
ProtocolInfo::PROTOCOL_1_21_2 => "",
Expand Down
4 changes: 4 additions & 0 deletions src/network/mcpe/convert/BlockTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ final class BlockTranslator{
self::CANONICAL_BLOCK_STATES_PATH => '',
self::BLOCK_STATE_META_MAP_PATH => '',
],
ProtocolInfo::PROTOCOL_1_21_40 => [
self::CANONICAL_BLOCK_STATES_PATH => '-1.21.40',
self::BLOCK_STATE_META_MAP_PATH => '-1.21.40',
],
ProtocolInfo::PROTOCOL_1_21_30 => [
self::CANONICAL_BLOCK_STATES_PATH => '-1.21.30',
self::BLOCK_STATE_META_MAP_PATH => '-1.21.30',
Expand Down
2 changes: 2 additions & 0 deletions src/network/mcpe/convert/ItemTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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_50 => 231,

ProtocolInfo::PROTOCOL_1_21_40 => 221,

ProtocolInfo::PROTOCOL_1_21_30 => 211,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ final class ItemTypeDictionaryFromDataHelper{

private const PATHS = [
ProtocolInfo::CURRENT_PROTOCOL => "",
ProtocolInfo::PROTOCOL_1_21_40 => "-1.21.40",
ProtocolInfo::PROTOCOL_1_21_30 => "-1.21.30",
ProtocolInfo::PROTOCOL_1_21_20 => "-1.21.20",
ProtocolInfo::PROTOCOL_1_21_2 => "-1.21.2",
Expand Down

0 comments on commit 0420e77

Please sign in to comment.