Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protocol 409 #988

Merged
merged 38 commits into from
Nov 11, 2020
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e781f32
start 409 commit
dexdurable Aug 5, 2020
ebc79ea
protocol 410 start
dexdurable Aug 13, 2020
1ee2469
protocol 414 start
dexdurable Sep 11, 2020
ff54a3f
protocol 415
dexdurable Sep 23, 2020
7e802fd
protocol 417 start
dexdurable Oct 1, 2020
a6b7ff5
changes for protocol 415
dexdurable Oct 5, 2020
9bfb371
ResourcePackStackPacket
dexdurable Oct 6, 2020
e3d60ff
change player list packet
dexdurable Oct 7, 2020
8df7218
packets update
dexdurable Oct 8, 2020
c46abe6
startGamePacket progress
dexdurable Oct 9, 2020
65bdbae
startGamePacket changes
dexdurable Oct 12, 2020
e497e51
startGamepacket progress
dexdurable Oct 16, 2020
b802888
items list
dexdurable Oct 22, 2020
7180a38
protocol 418
dexdurable Oct 26, 2020
e660fe6
start game packet changes
dexdurable Oct 26, 2020
36221db
protocol 419
dexdurable Oct 26, 2020
b11e11d
startGamePacket work
dexdurable Oct 28, 2020
1b4d26a
UpdateAttributesPacket and pallet
dexdurable Oct 28, 2020
7e86636
ItemComponentPacket
dexdurable Oct 28, 2020
a224376
try a different item list
dishrex Oct 28, 2020
710724a
fix item list mistake
dishrex Oct 28, 2020
2e7fd57
CreativeContentPacket
dexdurable Oct 30, 2020
cf92afe
some 419 work
dishrex Nov 2, 2020
55f4ebc
fix conflicts
dishrex Nov 2, 2020
fe6f02c
remove some debug
dishrex Nov 2, 2020
f93991b
ids from Item.php
dexdurable Nov 2, 2020
195609c
couple proto 19 changes
dishrex Nov 2, 2020
9a92532
ids from MC site
dexdurable Nov 3, 2020
ff577b8
change some ids
dexdurable Nov 3, 2020
f5094a0
change some ids
dexdurable Nov 3, 2020
967c1c2
start commit for new pallet
dexdurable Nov 4, 2020
6e39c8a
pallet 419 work
dexdurable Nov 4, 2020
19c71b7
get rid of asserts in item list
dishrex Nov 4, 2020
249ea1e
ContainerClosePacket
dexdurable Nov 5, 2020
2abee92
frames meta
dexdurable Nov 6, 2020
d0a9bff
corretion condition
dexdurable Nov 6, 2020
dd5249d
leave meta
dexdurable Nov 6, 2020
634701c
remove AnimationExpression
dexdurable Nov 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
frames meta
dexdurable committed Nov 6, 2020
commit 2abee92b8bd5d3d2e1492b55f92d7155722b815d
12 changes: 12 additions & 0 deletions src/pocketmine/network/protocol/PEPacket.php
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

namespace pocketmine\network\protocol;

use pocketmine\item\Item;
use pocketmine\network\protocol\DataPacket;
use pocketmine\network\protocol\Info;
use pocketmine\network\multiversion\BlockPallet;
@@ -165,8 +166,19 @@ public static function getBlockIDByRuntime($runtimeId, $playerProtocol) {

public static function getBlockRuntimeID($id, $meta, $playerProtocol) {
$pallet = self::getPallet($playerProtocol);
if ($playerProtocol == Info::PROTOCOL_419) {
$meta = self::getActualMeta($id, $meta);
}
return is_null($pallet) ? 0 : $pallet->getBlockRuntimeIDByData($id, $meta);
}

private static function getActualMeta($id, $meta) {
if ($id = Item::ITEM_FRAME_BLOCK) {
$array = [3 => 8, 4 => 5, 5 => 4];
return $array[$meta]??$meta;
}
return $meta;
}

public static function getBlockPalletData($playerProtocol) {
$pallet = self::getPallet($playerProtocol);