mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-11 03:58:06 +00:00
Compare commits
18 Commits
Author | SHA1 | Date | |
---|---|---|---|
c32c21464c | |||
16faafa1ef | |||
4d6ac57a26 | |||
73ba1ba224 | |||
8b79253d3b | |||
1122131c8d | |||
a50ef2af6f | |||
72e4660800 | |||
e6285a0312 | |||
5420e76a9a | |||
de46a81cf4 | |||
0cdc04f9b5 | |||
8b1a84f2bf | |||
155e516f74 | |||
ea0a47dff7 | |||
0a6ce18322 | |||
11d73e5bb8 | |||
492ad6bb66 |
Submodule build/php updated: 0a0ac2abb3...4bf8ec1ad0
@ -9,3 +9,7 @@ Plugin developers should **only** update their required API to this version if y
|
||||
# 3.21.0
|
||||
- PHP 7.4 is now required as a minimum.
|
||||
- A workaround for player movement added in 1.14.30 has been removed.
|
||||
|
||||
# 3.21.1
|
||||
- Fixed so-called 'pot lag' - a bug that could occur when using items while rapidly switching hotbar slots.
|
||||
- Plugins in crashdumps are now ordered alphabetically for easier reading.
|
||||
|
11
changelogs/3.22.md
Normal file
11
changelogs/3.22.md
Normal file
@ -0,0 +1,11 @@
|
||||
**For Minecraft: Bedrock Edition 1.17.10**
|
||||
|
||||
### Note about API versions
|
||||
Plugins which don't touch the protocol and compatible with any previous 3.x.y version will also run on these releases and do not need API bumps.
|
||||
Plugin developers should **only** update their required API to this version if you need the changes in this build.
|
||||
|
||||
**WARNING: If your plugin uses the protocol, you're not shielded by API change constraints.** You should consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you do.
|
||||
|
||||
# 3.22.0
|
||||
- Added support for Minecraft: Bedrock Edition 1.17.10.
|
||||
- Removed compatibility with earlier versions.
|
@ -38,7 +38,7 @@
|
||||
"pocketmine/spl": "^0.4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "0.12.89",
|
||||
"phpstan/phpstan": "0.12.92",
|
||||
"phpstan/phpstan-phpunit": "^0.12.6",
|
||||
"phpstan/phpstan-strict-rules": "^0.12.2",
|
||||
"phpunit/phpunit": "^9.2"
|
||||
|
82
composer.lock
generated
82
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "29c660b8c4fd0708d270c63993de9526",
|
||||
"content-hash": "79b082334bd3930d7eef49be9b70e59f",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/json-comment",
|
||||
@ -617,16 +617,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"version": "v4.10.5",
|
||||
"version": "v4.11.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||
"reference": "4432ba399e47c66624bc73c8c0f811e5c109576f"
|
||||
"reference": "fe14cf3672a149364fb66dfe11bf6549af899f94"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f",
|
||||
"reference": "4432ba399e47c66624bc73c8c0f811e5c109576f",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/fe14cf3672a149364fb66dfe11bf6549af899f94",
|
||||
"reference": "fe14cf3672a149364fb66dfe11bf6549af899f94",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -667,9 +667,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5"
|
||||
"source": "https://github.com/nikic/PHP-Parser/tree/v4.11.0"
|
||||
},
|
||||
"time": "2021-05-03T19:11:20+00:00"
|
||||
"time": "2021-07-03T13:36:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phar-io/manifest",
|
||||
@ -1009,16 +1009,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "0.12.89",
|
||||
"version": "0.12.92",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan.git",
|
||||
"reference": "54c0f5a6c30511b77128d58b6369f718df250542"
|
||||
"reference": "64d4c5dc8ea96972bc18432d137a330239a5d2b2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/54c0f5a6c30511b77128d58b6369f718df250542",
|
||||
"reference": "54c0f5a6c30511b77128d58b6369f718df250542",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/64d4c5dc8ea96972bc18432d137a330239a5d2b2",
|
||||
"reference": "64d4c5dc8ea96972bc18432d137a330239a5d2b2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1049,7 +1049,7 @@
|
||||
"description": "PHPStan - PHP Static Analysis Tool",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpstan/issues",
|
||||
"source": "https://github.com/phpstan/phpstan/tree/0.12.89"
|
||||
"source": "https://github.com/phpstan/phpstan/tree/0.12.92"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1069,20 +1069,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-06-09T20:23:49+00:00"
|
||||
"time": "2021-07-10T13:53:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan-phpunit",
|
||||
"version": "0.12.19",
|
||||
"version": "0.12.20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan-phpunit.git",
|
||||
"reference": "52f7072ddc5f81492f9d2de65a24813a48c90b18"
|
||||
"reference": "efc009981af383eb3303f0ca9868c29acad7ce74"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/52f7072ddc5f81492f9d2de65a24813a48c90b18",
|
||||
"reference": "52f7072ddc5f81492f9d2de65a24813a48c90b18",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/efc009981af383eb3303f0ca9868c29acad7ce74",
|
||||
"reference": "efc009981af383eb3303f0ca9868c29acad7ce74",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1093,10 +1093,9 @@
|
||||
"phpunit/phpunit": "<7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phing/phing": "^2.16.3",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.2",
|
||||
"phpstan/phpstan-strict-rules": "^0.12.6",
|
||||
"phpunit/phpunit": "^7.5.20"
|
||||
"phpunit/phpunit": "^9.5"
|
||||
},
|
||||
"type": "phpstan-extension",
|
||||
"extra": {
|
||||
@ -1122,22 +1121,22 @@
|
||||
"description": "PHPUnit extensions and rules for PHPStan",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpstan-phpunit/issues",
|
||||
"source": "https://github.com/phpstan/phpstan-phpunit/tree/0.12.19"
|
||||
"source": "https://github.com/phpstan/phpstan-phpunit/tree/0.12.20"
|
||||
},
|
||||
"time": "2021-04-30T11:10:37+00:00"
|
||||
"time": "2021-06-17T08:28:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan-strict-rules",
|
||||
"version": "0.12.9",
|
||||
"version": "0.12.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/phpstan/phpstan-strict-rules.git",
|
||||
"reference": "0705fefc7c9168529fd130e341428f5f10f4f01d"
|
||||
"reference": "ce82a050f9da4a32e438272907e38cdd04806223"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/0705fefc7c9168529fd130e341428f5f10f4f01d",
|
||||
"reference": "0705fefc7c9168529fd130e341428f5f10f4f01d",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/ce82a050f9da4a32e438272907e38cdd04806223",
|
||||
"reference": "ce82a050f9da4a32e438272907e38cdd04806223",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1145,10 +1144,9 @@
|
||||
"phpstan/phpstan": "^0.12.66"
|
||||
},
|
||||
"require-dev": {
|
||||
"phing/phing": "^2.16.3",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.2",
|
||||
"phpstan/phpstan-phpunit": "^0.12.16",
|
||||
"phpunit/phpunit": "^7.5.20"
|
||||
"phpunit/phpunit": "^9.5"
|
||||
},
|
||||
"type": "phpstan-extension",
|
||||
"extra": {
|
||||
@ -1173,9 +1171,9 @@
|
||||
"description": "Extra strict and opinionated rules for PHPStan",
|
||||
"support": {
|
||||
"issues": "https://github.com/phpstan/phpstan-strict-rules/issues",
|
||||
"source": "https://github.com/phpstan/phpstan-strict-rules/tree/0.12.9"
|
||||
"source": "https://github.com/phpstan/phpstan-strict-rules/tree/0.12.10"
|
||||
},
|
||||
"time": "2021-01-13T08:50:28+00:00"
|
||||
"time": "2021-07-04T14:57:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
@ -1497,16 +1495,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "9.5.5",
|
||||
"version": "9.5.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "89ff45ea9d70e35522fb6654a2ebc221158de276"
|
||||
"reference": "fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/89ff45ea9d70e35522fb6654a2ebc221158de276",
|
||||
"reference": "89ff45ea9d70e35522fb6654a2ebc221158de276",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb",
|
||||
"reference": "fb9b8333f14e3dce976a60ef6a7e05c7c7ed8bfb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1536,7 +1534,7 @@
|
||||
"sebastian/global-state": "^5.0.1",
|
||||
"sebastian/object-enumerator": "^4.0.3",
|
||||
"sebastian/resource-operations": "^3.0.3",
|
||||
"sebastian/type": "^2.3.2",
|
||||
"sebastian/type": "^2.3.4",
|
||||
"sebastian/version": "^3.0.2"
|
||||
},
|
||||
"require-dev": {
|
||||
@ -1584,7 +1582,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.5"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.6"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1596,7 +1594,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-06-05T04:49:07+00:00"
|
||||
"time": "2021-06-23T05:14:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
@ -2455,16 +2453,16 @@
|
||||
},
|
||||
{
|
||||
"name": "sebastian/type",
|
||||
"version": "2.3.2",
|
||||
"version": "2.3.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/type.git",
|
||||
"reference": "0d1c587401514d17e8f9258a27e23527cb1b06c1"
|
||||
"reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0d1c587401514d17e8f9258a27e23527cb1b06c1",
|
||||
"reference": "0d1c587401514d17e8f9258a27e23527cb1b06c1",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8cd8a1c753c90bc1a0f5372170e3e489136f914",
|
||||
"reference": "b8cd8a1c753c90bc1a0f5372170e3e489136f914",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2499,7 +2497,7 @@
|
||||
"homepage": "https://github.com/sebastianbergmann/type",
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/type/issues",
|
||||
"source": "https://github.com/sebastianbergmann/type/tree/2.3.2"
|
||||
"source": "https://github.com/sebastianbergmann/type/tree/2.3.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2507,7 +2505,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-06-04T13:02:07+00:00"
|
||||
"time": "2021-06-15T12:49:02+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/version",
|
||||
|
@ -46,6 +46,7 @@ use function is_dir;
|
||||
use function is_resource;
|
||||
use function json_encode;
|
||||
use function json_last_error_msg;
|
||||
use function ksort;
|
||||
use function max;
|
||||
use function microtime;
|
||||
use function mkdir;
|
||||
@ -81,6 +82,7 @@ use const FILE_IGNORE_NEW_LINES;
|
||||
use const JSON_UNESCAPED_SLASHES;
|
||||
use const PHP_EOL;
|
||||
use const PHP_OS;
|
||||
use const SORT_STRING;
|
||||
|
||||
class CrashDump{
|
||||
|
||||
@ -182,7 +184,9 @@ class CrashDump{
|
||||
$this->addLine();
|
||||
$this->addLine("Loaded plugins:");
|
||||
$this->data["plugins"] = [];
|
||||
foreach($this->server->getPluginManager()->getPlugins() as $p){
|
||||
$plugins = $this->server->getPluginManager()->getPlugins();
|
||||
ksort($plugins, SORT_STRING);
|
||||
foreach($plugins as $p){
|
||||
$d = $p->getDescription();
|
||||
$this->data["plugins"][$d->getName()] = [
|
||||
"name" => $d->getName(),
|
||||
|
@ -2529,6 +2529,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
$blockVector = $packet->trData->getBlockPos();
|
||||
$face = $packet->trData->getFace();
|
||||
|
||||
if($this->inventory->getHeldItemIndex() !== $packet->trData->getHotbarSlot()){
|
||||
$this->inventory->equipItem($packet->trData->getHotbarSlot());
|
||||
}
|
||||
|
||||
switch($packet->trData->getActionType()){
|
||||
case UseItemTransactionData::ACTION_CLICK_BLOCK:
|
||||
//TODO: start hack for client spam bug
|
||||
@ -2687,6 +2691,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
return false;
|
||||
}
|
||||
|
||||
if($this->inventory->getHeldItemIndex() !== $packet->trData->getHotbarSlot()){
|
||||
$this->inventory->equipItem($packet->trData->getHotbarSlot());
|
||||
}
|
||||
|
||||
switch($packet->trData->getActionType()){
|
||||
case UseItemOnEntityTransactionData::ACTION_INTERACT:
|
||||
break; //TODO
|
||||
@ -2778,6 +2786,10 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
$this->inventory->sendContents($this);
|
||||
return false;
|
||||
}elseif($packet->trData instanceof ReleaseItemTransactionData){
|
||||
if($this->inventory->getHeldItemIndex() !== $packet->trData->getHotbarSlot()){
|
||||
$this->inventory->equipItem($packet->trData->getHotbarSlot());
|
||||
}
|
||||
|
||||
try{
|
||||
switch($packet->trData->getActionType()){
|
||||
case ReleaseItemTransactionData::ACTION_RELEASE:
|
||||
|
@ -33,6 +33,6 @@ if(defined('pocketmine\_VERSION_INFO_INCLUDED')){
|
||||
const _VERSION_INFO_INCLUDED = true;
|
||||
|
||||
const NAME = "PocketMine-MP";
|
||||
const BASE_VERSION = "3.21.0";
|
||||
const BASE_VERSION = "3.22.0";
|
||||
const IS_DEVELOPMENT_BUILD = false;
|
||||
const BUILD_NUMBER = 0;
|
||||
|
@ -36,78 +36,79 @@ abstract class Particle extends Vector3{
|
||||
public const TYPE_EXPLODE = 6;
|
||||
public const TYPE_EVAPORATION = 7;
|
||||
public const TYPE_FLAME = 8;
|
||||
public const TYPE_LAVA = 9;
|
||||
public const TYPE_LARGE_SMOKE = 10;
|
||||
public const TYPE_REDSTONE = 11;
|
||||
public const TYPE_RISING_RED_DUST = 12;
|
||||
public const TYPE_ITEM_BREAK = 13;
|
||||
public const TYPE_SNOWBALL_POOF = 14;
|
||||
public const TYPE_HUGE_EXPLODE = 15;
|
||||
public const TYPE_HUGE_EXPLODE_SEED = 16;
|
||||
public const TYPE_MOB_FLAME = 17;
|
||||
public const TYPE_HEART = 18;
|
||||
public const TYPE_TERRAIN = 19;
|
||||
public const TYPE_SUSPENDED_TOWN = 20, TYPE_TOWN_AURA = 20;
|
||||
public const TYPE_PORTAL = 21;
|
||||
//22 same as 21
|
||||
public const TYPE_SPLASH = 23, TYPE_WATER_SPLASH = 23;
|
||||
public const TYPE_WATER_SPLASH_MANUAL = 24;
|
||||
public const TYPE_WATER_WAKE = 25;
|
||||
public const TYPE_DRIP_WATER = 26;
|
||||
public const TYPE_DRIP_LAVA = 27;
|
||||
public const TYPE_DRIP_HONEY = 28;
|
||||
public const TYPE_STALACTITE_DRIP_WATER = 29;
|
||||
public const TYPE_STALACTITE_DRIP_LAVA = 30;
|
||||
public const TYPE_FALLING_DUST = 31, TYPE_DUST = 31;
|
||||
public const TYPE_MOB_SPELL = 32;
|
||||
public const TYPE_MOB_SPELL_AMBIENT = 33;
|
||||
public const TYPE_MOB_SPELL_INSTANTANEOUS = 34;
|
||||
public const TYPE_INK = 35;
|
||||
public const TYPE_SLIME = 36;
|
||||
public const TYPE_RAIN_SPLASH = 37;
|
||||
public const TYPE_VILLAGER_ANGRY = 38;
|
||||
public const TYPE_VILLAGER_HAPPY = 39;
|
||||
public const TYPE_ENCHANTMENT_TABLE = 40;
|
||||
public const TYPE_TRACKING_EMITTER = 41;
|
||||
public const TYPE_NOTE = 42;
|
||||
public const TYPE_WITCH_SPELL = 43;
|
||||
public const TYPE_CARROT = 44;
|
||||
public const TYPE_MOB_APPEARANCE = 45;
|
||||
public const TYPE_END_ROD = 46;
|
||||
public const TYPE_DRAGONS_BREATH = 47;
|
||||
public const TYPE_SPIT = 48;
|
||||
public const TYPE_TOTEM = 49;
|
||||
public const TYPE_FOOD = 50;
|
||||
public const TYPE_FIREWORKS_STARTER = 51;
|
||||
public const TYPE_FIREWORKS_SPARK = 52;
|
||||
public const TYPE_FIREWORKS_OVERLAY = 53;
|
||||
public const TYPE_BALLOON_GAS = 54;
|
||||
public const TYPE_COLORED_FLAME = 55;
|
||||
public const TYPE_SPARKLER = 56;
|
||||
public const TYPE_CONDUIT = 57;
|
||||
public const TYPE_BUBBLE_COLUMN_UP = 58;
|
||||
public const TYPE_BUBBLE_COLUMN_DOWN = 59;
|
||||
public const TYPE_SNEEZE = 60;
|
||||
public const TYPE_SHULKER_BULLET = 61;
|
||||
public const TYPE_BLEACH = 62;
|
||||
public const TYPE_DRAGON_DESTROY_BLOCK = 63;
|
||||
public const TYPE_MYCELIUM_DUST = 64;
|
||||
public const TYPE_FALLING_RED_DUST = 65;
|
||||
public const TYPE_CAMPFIRE_SMOKE = 66;
|
||||
public const TYPE_TALL_CAMPFIRE_SMOKE = 67;
|
||||
public const TYPE_DRAGON_BREATH_FIRE = 68;
|
||||
public const TYPE_DRAGON_BREATH_TRAIL = 69;
|
||||
public const TYPE_BLUE_FLAME = 70;
|
||||
public const TYPE_SOUL = 71;
|
||||
public const TYPE_OBSIDIAN_TEAR = 72;
|
||||
public const TYPE_PORTAL_REVERSE = 73;
|
||||
public const TYPE_SNOWFLAKE = 74;
|
||||
public const TYPE_VIBRATION_SIGNAL = 75;
|
||||
public const TYPE_SCULK_SENSOR_REDSTONE = 76;
|
||||
public const TYPE_SPORE_BLOSSOM_SHOWER = 77;
|
||||
public const TYPE_SPORE_BLOSSOM_AMBIENT = 78;
|
||||
public const TYPE_WAX = 79;
|
||||
public const TYPE_ELECTRIC_SPARK = 80;
|
||||
public const TYPE_CANDLE_FLAME = 9;
|
||||
public const TYPE_LAVA = 10;
|
||||
public const TYPE_LARGE_SMOKE = 11;
|
||||
public const TYPE_REDSTONE = 12;
|
||||
public const TYPE_RISING_RED_DUST = 13;
|
||||
public const TYPE_ITEM_BREAK = 14;
|
||||
public const TYPE_SNOWBALL_POOF = 15;
|
||||
public const TYPE_HUGE_EXPLODE = 16;
|
||||
public const TYPE_HUGE_EXPLODE_SEED = 17;
|
||||
public const TYPE_MOB_FLAME = 18;
|
||||
public const TYPE_HEART = 19;
|
||||
public const TYPE_TERRAIN = 20;
|
||||
public const TYPE_SUSPENDED_TOWN = 21, TYPE_TOWN_AURA = 21;
|
||||
public const TYPE_PORTAL = 22;
|
||||
//23 same as 22
|
||||
public const TYPE_SPLASH = 24, TYPE_WATER_SPLASH = 24;
|
||||
public const TYPE_WATER_SPLASH_MANUAL = 25;
|
||||
public const TYPE_WATER_WAKE = 26;
|
||||
public const TYPE_DRIP_WATER = 27;
|
||||
public const TYPE_DRIP_LAVA = 28;
|
||||
public const TYPE_DRIP_HONEY = 29;
|
||||
public const TYPE_STALACTITE_DRIP_WATER = 30;
|
||||
public const TYPE_STALACTITE_DRIP_LAVA = 31;
|
||||
public const TYPE_FALLING_DUST = 32, TYPE_DUST = 32;
|
||||
public const TYPE_MOB_SPELL = 33;
|
||||
public const TYPE_MOB_SPELL_AMBIENT = 34;
|
||||
public const TYPE_MOB_SPELL_INSTANTANEOUS = 35;
|
||||
public const TYPE_INK = 36;
|
||||
public const TYPE_SLIME = 37;
|
||||
public const TYPE_RAIN_SPLASH = 38;
|
||||
public const TYPE_VILLAGER_ANGRY = 39;
|
||||
public const TYPE_VILLAGER_HAPPY = 40;
|
||||
public const TYPE_ENCHANTMENT_TABLE = 41;
|
||||
public const TYPE_TRACKING_EMITTER = 42;
|
||||
public const TYPE_NOTE = 43;
|
||||
public const TYPE_WITCH_SPELL = 44;
|
||||
public const TYPE_CARROT = 45;
|
||||
public const TYPE_MOB_APPEARANCE = 46;
|
||||
public const TYPE_END_ROD = 47;
|
||||
public const TYPE_DRAGONS_BREATH = 48;
|
||||
public const TYPE_SPIT = 49;
|
||||
public const TYPE_TOTEM = 50;
|
||||
public const TYPE_FOOD = 51;
|
||||
public const TYPE_FIREWORKS_STARTER = 52;
|
||||
public const TYPE_FIREWORKS_SPARK = 53;
|
||||
public const TYPE_FIREWORKS_OVERLAY = 54;
|
||||
public const TYPE_BALLOON_GAS = 55;
|
||||
public const TYPE_COLORED_FLAME = 56;
|
||||
public const TYPE_SPARKLER = 57;
|
||||
public const TYPE_CONDUIT = 58;
|
||||
public const TYPE_BUBBLE_COLUMN_UP = 59;
|
||||
public const TYPE_BUBBLE_COLUMN_DOWN = 60;
|
||||
public const TYPE_SNEEZE = 61;
|
||||
public const TYPE_SHULKER_BULLET = 62;
|
||||
public const TYPE_BLEACH = 63;
|
||||
public const TYPE_DRAGON_DESTROY_BLOCK = 64;
|
||||
public const TYPE_MYCELIUM_DUST = 65;
|
||||
public const TYPE_FALLING_RED_DUST = 66;
|
||||
public const TYPE_CAMPFIRE_SMOKE = 67;
|
||||
public const TYPE_TALL_CAMPFIRE_SMOKE = 68;
|
||||
public const TYPE_DRAGON_BREATH_FIRE = 69;
|
||||
public const TYPE_DRAGON_BREATH_TRAIL = 70;
|
||||
public const TYPE_BLUE_FLAME = 71;
|
||||
public const TYPE_SOUL = 72;
|
||||
public const TYPE_OBSIDIAN_TEAR = 73;
|
||||
public const TYPE_PORTAL_REVERSE = 74;
|
||||
public const TYPE_SNOWFLAKE = 75;
|
||||
public const TYPE_VIBRATION_SIGNAL = 76;
|
||||
public const TYPE_SCULK_SENSOR_REDSTONE = 77;
|
||||
public const TYPE_SPORE_BLOSSOM_SHOWER = 78;
|
||||
public const TYPE_SPORE_BLOSSOM_AMBIENT = 79;
|
||||
public const TYPE_WAX = 80;
|
||||
public const TYPE_ELECTRIC_SPARK = 81;
|
||||
|
||||
/**
|
||||
* @return DataPacket|DataPacket[]
|
||||
|
@ -110,6 +110,7 @@ use pocketmine\network\mcpe\protocol\MultiplayerSettingsPacket;
|
||||
use pocketmine\network\mcpe\protocol\NetworkChunkPublisherUpdatePacket;
|
||||
use pocketmine\network\mcpe\protocol\NetworkSettingsPacket;
|
||||
use pocketmine\network\mcpe\protocol\NetworkStackLatencyPacket;
|
||||
use pocketmine\network\mcpe\protocol\NpcDialoguePacket;
|
||||
use pocketmine\network\mcpe\protocol\NpcRequestPacket;
|
||||
use pocketmine\network\mcpe\protocol\OnScreenTextureAnimationPacket;
|
||||
use pocketmine\network\mcpe\protocol\PacketViolationWarningPacket;
|
||||
@ -166,6 +167,7 @@ use pocketmine\network\mcpe\protocol\ShowCreditsPacket;
|
||||
use pocketmine\network\mcpe\protocol\ShowProfilePacket;
|
||||
use pocketmine\network\mcpe\protocol\ShowStoreOfferPacket;
|
||||
use pocketmine\network\mcpe\protocol\SimpleEventPacket;
|
||||
use pocketmine\network\mcpe\protocol\SimulationTypePacket;
|
||||
use pocketmine\network\mcpe\protocol\SpawnExperienceOrbPacket;
|
||||
use pocketmine\network\mcpe\protocol\SpawnParticleEffectPacket;
|
||||
use pocketmine\network\mcpe\protocol\StartGamePacket;
|
||||
@ -841,4 +843,12 @@ abstract class NetworkSession{
|
||||
public function handleRemoveVolumeEntity(RemoveVolumeEntityPacket $packet) : bool{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function handleSimulationType(SimulationTypePacket $packet) : bool{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function handleNpcDialogue(NpcDialoguePacket $packet) : bool{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ class AvailableCommandsPacket extends DataPacket{
|
||||
$retval = new CommandData();
|
||||
$retval->commandName = $this->getString();
|
||||
$retval->commandDescription = $this->getString();
|
||||
$retval->flags = $this->getByte();
|
||||
$retval->flags = $this->getLShort();
|
||||
$retval->permission = $this->getByte();
|
||||
$retval->aliases = $enums[$this->getLInt()] ?? null;
|
||||
|
||||
@ -324,7 +324,7 @@ class AvailableCommandsPacket extends DataPacket{
|
||||
protected function putCommandData(CommandData $data, array $enumIndexes, array $postfixIndexes) : void{
|
||||
$this->putString($data->commandName);
|
||||
$this->putString($data->commandDescription);
|
||||
$this->putByte($data->flags);
|
||||
$this->putLShort($data->flags);
|
||||
$this->putByte($data->permission);
|
||||
|
||||
if($data->aliases !== null){
|
||||
|
87
src/pocketmine/network/mcpe/protocol/NpcDialoguePacket.php
Normal file
87
src/pocketmine/network/mcpe/protocol/NpcDialoguePacket.php
Normal file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\network\mcpe\protocol;
|
||||
|
||||
#include <rules/DataPacket.h>
|
||||
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class NpcDialoguePacket extends DataPacket/* implements ClientboundPacket*/{
|
||||
public const NETWORK_ID = ProtocolInfo::NPC_DIALOGUE_PACKET;
|
||||
|
||||
public const ACTION_OPEN = 0;
|
||||
public const ACTION_CLOSE = 1;
|
||||
|
||||
private int $npcActorUniqueId;
|
||||
private int $actionType;
|
||||
private string $dialogue;
|
||||
private string $sceneName;
|
||||
private string $npcName;
|
||||
private string $actionJson;
|
||||
|
||||
public static function create(int $npcActorUniqueId, int $actionType, string $dialogue, string $sceneName, string $npcName, string $actionJson) : self{
|
||||
$result = new self;
|
||||
$result->npcActorUniqueId = $npcActorUniqueId;
|
||||
$result->actionType = $actionType;
|
||||
$result->dialogue = $dialogue;
|
||||
$result->sceneName = $sceneName;
|
||||
$result->npcName = $npcName;
|
||||
$result->actionJson = $actionJson;
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getNpcActorUniqueId() : int{ return $this->npcActorUniqueId; }
|
||||
|
||||
public function getActionType() : int{ return $this->actionType; }
|
||||
|
||||
public function getDialogue() : string{ return $this->dialogue; }
|
||||
|
||||
public function getSceneName() : string{ return $this->sceneName; }
|
||||
|
||||
public function getNpcName() : string{ return $this->npcName; }
|
||||
|
||||
public function getActionJson() : string{ return $this->actionJson; }
|
||||
|
||||
protected function decodePayload() : void{
|
||||
$this->npcActorUniqueId = $this->getEntityUniqueId();
|
||||
$this->actionType = $this->getVarInt();
|
||||
$this->dialogue = $this->getString();
|
||||
$this->sceneName = $this->getString();
|
||||
$this->npcName = $this->getString();
|
||||
$this->actionJson = $this->getString();
|
||||
}
|
||||
|
||||
protected function encodePayload() : void{
|
||||
$this->putEntityUniqueId($this->npcActorUniqueId);
|
||||
$this->putVarInt($this->actionType);
|
||||
$this->putString($this->dialogue);
|
||||
$this->putString($this->sceneName);
|
||||
$this->putString($this->npcName);
|
||||
$this->putString($this->actionJson);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $handler) : bool{
|
||||
return $handler->handleNpcDialogue($this);
|
||||
}
|
||||
}
|
@ -36,6 +36,7 @@ class NpcRequestPacket extends DataPacket{
|
||||
public const REQUEST_SET_NAME = 3;
|
||||
public const REQUEST_SET_SKIN = 4;
|
||||
public const REQUEST_SET_INTERACTION_TEXT = 5;
|
||||
public const REQUEST_EXECUTE_OPENING_COMMANDS = 6;
|
||||
|
||||
/** @var int */
|
||||
public $entityRuntimeId;
|
||||
@ -45,12 +46,14 @@ class NpcRequestPacket extends DataPacket{
|
||||
public $commandString;
|
||||
/** @var int */
|
||||
public $actionType;
|
||||
public string $sceneName;
|
||||
|
||||
protected function decodePayload(){
|
||||
$this->entityRuntimeId = $this->getEntityRuntimeId();
|
||||
$this->requestType = $this->getByte();
|
||||
$this->commandString = $this->getString();
|
||||
$this->actionType = $this->getByte();
|
||||
$this->sceneName = $this->getString();
|
||||
}
|
||||
|
||||
protected function encodePayload(){
|
||||
@ -58,6 +61,7 @@ class NpcRequestPacket extends DataPacket{
|
||||
$this->putByte($this->requestType);
|
||||
$this->putString($this->commandString);
|
||||
$this->putByte($this->actionType);
|
||||
$this->putString($this->sceneName);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
|
@ -198,6 +198,8 @@ class PacketPool{
|
||||
static::registerPacket(new SyncActorPropertyPacket());
|
||||
static::registerPacket(new AddVolumeEntityPacket());
|
||||
static::registerPacket(new RemoveVolumeEntityPacket());
|
||||
static::registerPacket(new SimulationTypePacket());
|
||||
static::registerPacket(new NpcDialoguePacket());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -37,11 +37,11 @@ interface ProtocolInfo{
|
||||
*/
|
||||
|
||||
/** Actual Minecraft: PE protocol version */
|
||||
public const CURRENT_PROTOCOL = 440;
|
||||
public const CURRENT_PROTOCOL = 448;
|
||||
/** Current Minecraft PE version reported by the server. This is usually the earliest currently supported version. */
|
||||
public const MINECRAFT_VERSION = 'v1.17.0';
|
||||
public const MINECRAFT_VERSION = 'v1.17.10';
|
||||
/** Version number sent to clients in ping responses. */
|
||||
public const MINECRAFT_VERSION_NETWORK = '1.17.0';
|
||||
public const MINECRAFT_VERSION_NETWORK = '1.17.10';
|
||||
|
||||
public const LOGIN_PACKET = 0x01;
|
||||
public const PLAY_STATUS_PACKET = 0x02;
|
||||
@ -210,5 +210,7 @@ interface ProtocolInfo{
|
||||
public const SYNC_ACTOR_PROPERTY_PACKET = 0xa5;
|
||||
public const ADD_VOLUME_ENTITY_PACKET = 0xa6;
|
||||
public const REMOVE_VOLUME_ENTITY_PACKET = 0xa7;
|
||||
public const SIMULATION_TYPE_PACKET = 0xa8;
|
||||
public const NPC_DIALOGUE_PACKET = 0xa9;
|
||||
|
||||
}
|
||||
|
@ -33,9 +33,11 @@ class ResourcePacksInfoPacket extends DataPacket{
|
||||
public const NETWORK_ID = ProtocolInfo::RESOURCE_PACKS_INFO_PACKET;
|
||||
|
||||
/** @var bool */
|
||||
public $mustAccept = false; //if true, forces client to use selected resource packs
|
||||
public $mustAccept = false; //if true, forces client to choose between accepting packs or being disconnected
|
||||
/** @var bool */
|
||||
public $hasScripts = false; //if true, causes disconnect for any platform that doesn't support scripts yet
|
||||
|
||||
public bool $forceServerPacks = false;
|
||||
/** @var ResourcePack[] */
|
||||
public $behaviorPackEntries = [];
|
||||
/** @var ResourcePack[] */
|
||||
@ -44,6 +46,7 @@ class ResourcePacksInfoPacket extends DataPacket{
|
||||
protected function decodePayload(){
|
||||
$this->mustAccept = $this->getBool();
|
||||
$this->hasScripts = $this->getBool();
|
||||
$this->forceServerPacks = $this->getBool();
|
||||
$behaviorPackCount = $this->getLShort();
|
||||
while($behaviorPackCount-- > 0){
|
||||
$this->getString();
|
||||
@ -71,6 +74,7 @@ class ResourcePacksInfoPacket extends DataPacket{
|
||||
protected function encodePayload(){
|
||||
$this->putBool($this->mustAccept);
|
||||
$this->putBool($this->hasScripts);
|
||||
$this->putBool($this->forceServerPacks);
|
||||
$this->putLShort(count($this->behaviorPackEntries));
|
||||
foreach($this->behaviorPackEntries as $entry){
|
||||
$this->putString($entry->getPackId());
|
||||
|
@ -50,6 +50,8 @@ class SetTitlePacket extends DataPacket{
|
||||
public $stayTime = 0;
|
||||
/** @var int */
|
||||
public $fadeOutTime = 0;
|
||||
public string $xuid = "";
|
||||
public string $platformOnlineId = "";
|
||||
|
||||
protected function decodePayload(){
|
||||
$this->type = $this->getVarInt();
|
||||
@ -57,6 +59,8 @@ class SetTitlePacket extends DataPacket{
|
||||
$this->fadeInTime = $this->getVarInt();
|
||||
$this->stayTime = $this->getVarInt();
|
||||
$this->fadeOutTime = $this->getVarInt();
|
||||
$this->xuid = $this->getString();
|
||||
$this->platformOnlineId = $this->getString();
|
||||
}
|
||||
|
||||
protected function encodePayload(){
|
||||
@ -65,6 +69,8 @@ class SetTitlePacket extends DataPacket{
|
||||
$this->putVarInt($this->fadeInTime);
|
||||
$this->putVarInt($this->stayTime);
|
||||
$this->putVarInt($this->fadeOutTime);
|
||||
$this->putString($this->xuid);
|
||||
$this->putString($this->platformOnlineId);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $session) : bool{
|
||||
|
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\network\mcpe\protocol;
|
||||
|
||||
#include <rules/DataPacket.h>
|
||||
|
||||
use pocketmine\network\mcpe\NetworkSession;
|
||||
|
||||
class SimulationTypePacket extends DataPacket/* implements ClientboundPacket*/{
|
||||
public const NETWORK_ID = ProtocolInfo::SIMULATION_TYPE_PACKET;
|
||||
|
||||
public const GAME = 0;
|
||||
public const EDITOR = 1;
|
||||
public const TEST = 2;
|
||||
|
||||
private int $type;
|
||||
|
||||
public static function create(int $type) : self{
|
||||
$result = new self;
|
||||
$result->type = $type;
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getType() : int{ return $this->type; }
|
||||
|
||||
protected function decodePayload() : void{
|
||||
$this->type = $this->getByte();
|
||||
}
|
||||
|
||||
protected function encodePayload() : void{
|
||||
$this->putByte($this->type);
|
||||
}
|
||||
|
||||
public function handle(NetworkSession $handler) : bool{
|
||||
return $handler->handleSimulationType($this);
|
||||
}
|
||||
}
|
@ -56,8 +56,8 @@ final class PlayerAuthInputFlags{
|
||||
public const WANT_DOWN_SLOW = 18;
|
||||
public const WANT_UP_SLOW = 19;
|
||||
public const SPRINTING = 20;
|
||||
public const ASCEND_SCAFFOLDING = 21;
|
||||
public const DESCEND_SCAFFOLDING = 22;
|
||||
public const ASCEND_BLOCK = 21;
|
||||
public const DESCEND_BLOCK = 22;
|
||||
public const SNEAK_TOGGLE_DOWN = 23;
|
||||
public const PERSIST_SNEAK = 24;
|
||||
public const START_SPRINTING = 25;
|
||||
|
Submodule src/pocketmine/resources/vanilla updated: 04c846c5f9...21ec07f14e
@ -1,7 +1,7 @@
|
||||
parameters:
|
||||
ignoreErrors:
|
||||
-
|
||||
message: "#^Cannot access offset float\\|int on mixed\\.$#"
|
||||
message: "#^Cannot access offset \\(float\\|int\\) on mixed\\.$#"
|
||||
count: 1
|
||||
path: ../../../src/pocketmine/CrashDump.php
|
||||
|
||||
|
Reference in New Issue
Block a user