Skip to content

Commit dc7606a

Browse files
committed
Protocol changes for 1.20.80.24 beta
1 parent 8d63f39 commit dc7606a

14 files changed

+42
-71
lines changed

Diff for: src/FilterTextPacket.php

-52
This file was deleted.

Diff for: src/PacketHandlerDefaultImplTrait.php

-4
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,6 @@ public function handleItemComponent(ItemComponentPacket $packet) : bool{
630630
return false;
631631
}
632632

633-
public function handleFilterText(FilterTextPacket $packet) : bool{
634-
return false;
635-
}
636-
637633
public function handleClientboundDebugRenderer(ClientboundDebugRendererPacket $packet) : bool{
638634
return false;
639635
}

Diff for: src/PacketHandlerInterface.php

-2
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,6 @@ public function handleCorrectPlayerMovePrediction(CorrectPlayerMovePredictionPac
322322

323323
public function handleItemComponent(ItemComponentPacket $packet) : bool;
324324

325-
public function handleFilterText(FilterTextPacket $packet) : bool;
326-
327325
public function handleClientboundDebugRenderer(ClientboundDebugRendererPacket $packet) : bool;
328326

329327
public function handleSyncActorProperty(SyncActorPropertyPacket $packet) : bool;

Diff for: src/PacketPool.php

-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ public function __construct(){
185185
$this->registerPacket(new PlayerFogPacket());
186186
$this->registerPacket(new CorrectPlayerMovePredictionPacket());
187187
$this->registerPacket(new ItemComponentPacket());
188-
$this->registerPacket(new FilterTextPacket());
189188
$this->registerPacket(new ClientboundDebugRendererPacket());
190189
$this->registerPacket(new SyncActorPropertyPacket());
191190
$this->registerPacket(new AddVolumeEntityPacket());

Diff for: src/ProtocolInfo.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ private function __construct(){
3232
*/
3333

3434
/** Actual Minecraft: PE protocol version */
35-
public const CURRENT_PROTOCOL = 662;
35+
public const CURRENT_PROTOCOL = 671;
3636
/** Current Minecraft PE version reported by the server. This is usually the earliest currently supported version. */
37-
public const MINECRAFT_VERSION = 'v1.20.70';
37+
public const MINECRAFT_VERSION = 'v1.20.80';
3838
/** Version number sent to clients in ping responses. */
39-
public const MINECRAFT_VERSION_NETWORK = '1.20.70';
39+
public const MINECRAFT_VERSION_NETWORK = '1.20.80';
4040

4141
public const LOGIN_PACKET = 0x01;
4242
public const PLAY_STATUS_PACKET = 0x02;
@@ -197,7 +197,7 @@ private function __construct(){
197197
public const PLAYER_FOG_PACKET = 0xa0;
198198
public const CORRECT_PLAYER_MOVE_PREDICTION_PACKET = 0xa1;
199199
public const ITEM_COMPONENT_PACKET = 0xa2;
200-
public const FILTER_TEXT_PACKET = 0xa3;
200+
201201
public const CLIENTBOUND_DEBUG_RENDERER_PACKET = 0xa4;
202202
public const SYNC_ACTOR_PROPERTY_PACKET = 0xa5;
203203
public const ADD_VOLUME_ENTITY_PACKET = 0xa6;

Diff for: src/ResourcePackStackPacket.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,21 @@ class ResourcePackStackPacket extends DataPacket implements ClientboundPacket{
2929
public bool $mustAccept = false;
3030
public string $baseGameVersion = ProtocolInfo::MINECRAFT_VERSION_NETWORK;
3131
public Experiments $experiments;
32+
public bool $useVanillaEditorPacks;
3233

3334
/**
3435
* @generate-create-func
3536
* @param ResourcePackStackEntry[] $resourcePackStack
3637
* @param ResourcePackStackEntry[] $behaviorPackStack
3738
*/
38-
public static function create(array $resourcePackStack, array $behaviorPackStack, bool $mustAccept, string $baseGameVersion, Experiments $experiments) : self{
39+
public static function create(array $resourcePackStack, array $behaviorPackStack, bool $mustAccept, string $baseGameVersion, Experiments $experiments, bool $useVanillaEditorPacks) : self{
3940
$result = new self;
4041
$result->resourcePackStack = $resourcePackStack;
4142
$result->behaviorPackStack = $behaviorPackStack;
4243
$result->mustAccept = $mustAccept;
4344
$result->baseGameVersion = $baseGameVersion;
4445
$result->experiments = $experiments;
46+
$result->useVanillaEditorPacks = $useVanillaEditorPacks;
4547
return $result;
4648
}
4749

@@ -59,6 +61,7 @@ protected function decodePayload(PacketSerializer $in) : void{
5961

6062
$this->baseGameVersion = $in->getString();
6163
$this->experiments = Experiments::read($in);
64+
$this->useVanillaEditorPacks = $in->getBool();
6265
}
6366

6467
protected function encodePayload(PacketSerializer $out) : void{
@@ -76,6 +79,7 @@ protected function encodePayload(PacketSerializer $out) : void{
7679

7780
$out->putString($this->baseGameVersion);
7881
$this->experiments->write($out);
82+
$out->putBool($this->useVanillaEditorPacks);
7983
}
8084

8185
public function handle(PacketHandlerInterface $handler) : bool{

Diff for: src/UpdatePlayerGameTypePacket.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,35 @@ class UpdatePlayerGameTypePacket extends DataPacket implements ClientboundPacket
2323
/** @see GameMode */
2424
private int $gameMode;
2525
private int $playerActorUniqueId;
26+
private int $tick;
2627

2728
/**
2829
* @generate-create-func
2930
*/
30-
public static function create(int $gameMode, int $playerActorUniqueId) : self{
31+
public static function create(int $gameMode, int $playerActorUniqueId, int $tick) : self{
3132
$result = new self;
3233
$result->gameMode = $gameMode;
3334
$result->playerActorUniqueId = $playerActorUniqueId;
35+
$result->tick = $tick;
3436
return $result;
3537
}
3638

3739
public function getGameMode() : int{ return $this->gameMode; }
3840

3941
public function getPlayerActorUniqueId() : int{ return $this->playerActorUniqueId; }
4042

43+
public function getTick() : int{ return $this->tick; }
44+
4145
protected function decodePayload(PacketSerializer $in) : void{
4246
$this->gameMode = $in->getVarInt();
4347
$this->playerActorUniqueId = $in->getActorUniqueId();
48+
$this->tick = $in->getUnsignedVarInt();
4449
}
4550

4651
protected function encodePayload(PacketSerializer $out) : void{
4752
$out->putVarInt($this->gameMode);
4853
$out->putActorUniqueId($this->playerActorUniqueId);
54+
$out->putUnsignedVarInt($this->tick);
4955
}
5056

5157
public function handle(PacketHandlerInterface $handler) : bool{

Diff for: src/types/LevelSettings.php

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ final class LevelSettings{
2525
public SpawnSettings $spawnSettings;
2626
public int $generator = GeneratorType::OVERWORLD;
2727
public int $worldGamemode;
28+
public bool $hardcore = false;
2829
public int $difficulty;
2930
public BlockPosition $spawnPosition;
3031
public bool $hasAchievementsDisabled = true;
@@ -96,6 +97,7 @@ private function internalRead(PacketSerializer $in) : void{
9697
$this->spawnSettings = SpawnSettings::read($in);
9798
$this->generator = $in->getVarInt();
9899
$this->worldGamemode = $in->getVarInt();
100+
$this->hardcore = $in->getBool();
99101
$this->difficulty = $in->getVarInt();
100102
$this->spawnPosition = $in->getBlockPosition();
101103
$this->hasAchievementsDisabled = $in->getBool();
@@ -146,6 +148,7 @@ public function write(PacketSerializer $out) : void{
146148
$this->spawnSettings->write($out);
147149
$out->putVarInt($this->generator);
148150
$out->putVarInt($this->worldGamemode);
151+
$out->putBool($this->hardcore);
149152
$out->putVarInt($this->difficulty);
150153
$out->putBlockPosition($this->spawnPosition);
151154
$out->putBool($this->hasAchievementsDisabled);

Diff for: src/types/LevelSoundEvent.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
namespace pocketmine\network\mcpe\protocol\types;
1616

1717
/**
18-
* This file is generated from level_sound_id_map.json in BedrockData.
19-
*
2018
* This file is automatically generated; do NOT edit it by hand.
19+
* Regenerate it by running tools/generate-level-sound-ids.php
2120
*/
2221
final class LevelSoundEvent{
2322
private function __construct(){
@@ -501,6 +500,14 @@ private function __construct(){
501500
public const HURT_REDUCED = 508;
502501
public const WIND_CHARGE_BURST = 509;
503502

503+
public const ARMOR_CRACK_WOLF = 511;
504+
public const ARMOR_BREAK_WOLF = 512;
505+
public const ARMOR_REPAIR_WOLF = 513;
506+
public const MACE_SMASH_AIR = 514;
507+
public const MACE_SMASH_GROUND = 515;
508+
509+
public const MACE_HEAVY_SMASH_GROUND = 520;
510+
504511
//The following aliases are kept for backwards compatibility only
505512
public const SCULK_SENSOR_POWER_ON = self::POWER_ON_SCULK_SENSOR;
506513
public const SCULK_SENSOR_POWER_OFF = self::POWER_OFF_SCULK_SENSOR;

Diff for: src/types/ParticleIds.php

+1
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,5 @@ private function __construct(){
110110
public const WHITE_SMOKE = 89;
111111
public const VAULT_CONNECTION = 90;
112112
public const WIND_EXPLOSION = 91;
113+
public const WOLF_ARMOR_CRACK = 92;
113114
}

Diff for: src/types/entity/EntityIds.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515
namespace pocketmine\network\mcpe\protocol\types\entity;
1616

1717
/**
18-
* This file is directly generated from the entity definitions provided by the client. The entities listed in this file
19-
* are expected to always have the same IDs.
20-
*
2118
* This file is automatically generated; do NOT edit it by hand.
19+
* Regenerate it by running tools/generate-entity-ids.php
2220
*/
2321
final class EntityIds{
2422

@@ -29,6 +27,7 @@ private function __construct(){
2927
public const AGENT = "minecraft:agent";
3028
public const ALLAY = "minecraft:allay";
3129
public const AREA_EFFECT_CLOUD = "minecraft:area_effect_cloud";
30+
public const ARMADILLO = "minecraft:armadillo";
3231
public const ARMOR_STAND = "minecraft:armor_stand";
3332
public const ARROW = "minecraft:arrow";
3433
public const AXOLOTL = "minecraft:axolotl";

Diff for: src/types/entity/EntityMetadataFlags.php

+1
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,5 @@ private function __construct(){
137137
public const TIMER_FLAG_1 = 115;
138138
public const TIMER_FLAG_2 = 116;
139139
public const TIMER_FLAG_3 = 117;
140+
public const BODY_ROTATION_BLOCKED = 118;
140141
}

Diff for: src/types/hud/HudElement.php

+2
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,6 @@ enum HudElement : int{
3030
case FOOD = 8;
3131
case AIR_BUBBLES = 9;
3232
case HORSE_HEALTH = 10;
33+
case STATUS_EFFECTS = 11;
34+
case ITEM_TEXT = 12;
3335
}

Diff for: src/types/recipe/ShapedRecipe.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function __construct(
3434
private UuidInterface $uuid,
3535
string $blockType, //TODO: rename this
3636
private int $priority,
37+
private bool $symmetric,
3738
private int $recipeNetId
3839
){
3940
parent::__construct($typeId);
@@ -90,6 +91,8 @@ public function getPriority() : int{
9091
return $this->priority;
9192
}
9293

94+
public function isSymmetric() : bool{ return $this->symmetric; }
95+
9396
public function getRecipeNetId() : int{
9497
return $this->recipeNetId;
9598
}
@@ -112,9 +115,11 @@ public static function decode(int $recipeType, PacketSerializer $in) : self{
112115
$uuid = $in->getUUID();
113116
$block = $in->getString();
114117
$priority = $in->getVarInt();
118+
$symmetric = $in->getBool();
119+
115120
$recipeNetId = $in->readRecipeNetId();
116121

117-
return new self($recipeType, $recipeId, $input, $output, $uuid, $block, $priority, $recipeNetId);
122+
return new self($recipeType, $recipeId, $input, $output, $uuid, $block, $priority, $symmetric, $recipeNetId);
118123
}
119124

120125
public function encode(PacketSerializer $out) : void{
@@ -135,6 +140,8 @@ public function encode(PacketSerializer $out) : void{
135140
$out->putUUID($this->uuid);
136141
$out->putString($this->blockName);
137142
$out->putVarInt($this->priority);
143+
$out->putBool($this->symmetric);
144+
138145
$out->writeRecipeNetId($this->recipeNetId);
139146
}
140147
}

0 commit comments

Comments
 (0)