Merge branch 'stable' into next-minor

This commit is contained in:
Dylan K. Taylor 2020-03-10 12:45:00 +00:00
commit b8caf34e62
13 changed files with 34 additions and 40 deletions

View File

@ -23,6 +23,10 @@ declare(strict_types=1);
namespace pocketmine;
use function define;
use function defined;
use function dirname;
// composer autoload doesn't use require_once and also pthreads can inherit things
if(defined('pocketmine\_CORE_CONSTANTS_INCLUDED')){
return;

View File

@ -19,6 +19,8 @@
*
*/
declare(strict_types=1);
// composer autoload doesn't use require_once and also pthreads can inherit things
if(defined('pocketmine\_GLOBAL_CONSTANTS_INCLUDED')){
return;

View File

@ -23,6 +23,8 @@ declare(strict_types=1);
namespace pocketmine;
use const PTHREADS_INHERIT_ALL;
/**
* This class must be extended by all custom threading classes
*/
@ -78,7 +80,7 @@ abstract class Thread extends \Thread{
*
* @return bool
*/
public function start(?int $options = \PTHREADS_INHERIT_ALL){
public function start(?int $options = PTHREADS_INHERIT_ALL){
ThreadManager::getInstance()->add($this);
if($this->getClassLoader() === null){

View File

@ -23,6 +23,8 @@ declare(strict_types=1);
namespace pocketmine;
use function defined;
// composer autoload doesn't use require_once and also pthreads can inherit things
// TODO: drop this file and use a final class with constants
if(defined('pocketmine\_VERSION_INFO_INCLUDED')){

View File

@ -23,6 +23,8 @@ declare(strict_types=1);
namespace pocketmine;
use const PTHREADS_INHERIT_ALL;
/**
* This class must be extended by all custom threading classes
*/
@ -78,7 +80,7 @@ abstract class Worker extends \Worker{
*
* @return bool
*/
public function start(?int $options = \PTHREADS_INHERIT_ALL){
public function start(?int $options = PTHREADS_INHERIT_ALL){
ThreadManager::getInstance()->add($this);
if($this->getClassLoader() === null){

View File

@ -125,7 +125,7 @@ class Effect{
/**
* @param int $id Effect ID as per Minecraft PE
* @param string $name Translation key used for effect name
* @param Color $color
* @param Color $color Color of bubbles given by this effect
* @param bool $isBad Whether the effect is harmful
* @param int $defaultDuration Duration in ticks the effect will last for by default if applied without a duration.
* @param bool $hasBubbles Whether the effect has potion bubbles. Some do not (e.g. Instant Damage has its own particles instead of bubbles)

View File

@ -36,14 +36,10 @@ class ExperienceOrb extends Entity{
public const TAG_VALUE_PC = "Value"; //short
public const TAG_VALUE_PE = "experience value"; //int (WTF?)
/**
* Max distance an orb will follow a player across.
*/
/** Max distance an orb will follow a player across. */
public const MAX_TARGET_DISTANCE = 8.0;
/**
* Split sizes used for dropping experience orbs.
*/
/** Split sizes used for dropping experience orbs. */
public const ORB_SPLIT_SIZES = [2477, 1237, 617, 307, 149, 73, 37, 17, 7, 3, 1]; //This is indexed biggest to smallest so that we can return as soon as we found the biggest value.
/**

View File

@ -28,13 +28,9 @@ use pocketmine\Player;
class CreativeInventoryAction extends InventoryAction{
/**
* Player put an item into the creative window to destroy it.
*/
/** Player put an item into the creative window to destroy it. */
public const TYPE_DELETE_ITEM = 0;
/**
* Player took an item from the creative window.
*/
/** Player took an item from the creative window. */
public const TYPE_CREATE_ITEM = 1;
/** @var int */

View File

@ -175,7 +175,7 @@ class Chunk{
* Returns a bitmap of block ID and meta at the specified chunk block coordinates
*
* @param int $x 0-15
* @param int $y
* @param int $y 0-255
* @param int $z 0-15
*
* @return int bitmap, (id << 4) | meta
@ -188,7 +188,7 @@ class Chunk{
* Sets block ID and meta in one call at the specified chunk block coordinates
*
* @param int $x 0-15
* @param int $y
* @param int $y 0-255
* @param int $z 0-15
* @param int|null $blockId 0-255 if null, does not change
* @param int|null $meta 0-15 if null, does not change
@ -205,7 +205,7 @@ class Chunk{
* Returns the block ID at the specified chunk block coordinates
*
* @param int $x 0-15
* @param int $y
* @param int $y 0-255
* @param int $z 0-15
*
* @return int 0-255
@ -218,7 +218,7 @@ class Chunk{
* Sets the block ID at the specified chunk block coordinates
*
* @param int $x 0-15
* @param int $y
* @param int $y 0-255
* @param int $z 0-15
* @param int $id 0-255
*
@ -234,7 +234,7 @@ class Chunk{
* Returns the block meta value at the specified chunk block coordinates
*
* @param int $x 0-15
* @param int $y
* @param int $y 0-255
* @param int $z 0-15
*
* @return int 0-15
@ -247,7 +247,7 @@ class Chunk{
* Sets the block meta value at the specified chunk block coordinates
*
* @param int $x 0-15
* @param int $y
* @param int $y 0-255
* @param int $z 0-15
* @param int $data 0-15
*
@ -263,7 +263,7 @@ class Chunk{
* Returns the sky light level at the specified chunk block coordinates
*
* @param int $x 0-15
* @param int $y
* @param int $y 0-255
* @param int $z 0-15
*
* @return int 0-15
@ -276,7 +276,7 @@ class Chunk{
* Sets the sky light level at the specified chunk block coordinates
*
* @param int $x 0-15
* @param int $y
* @param int $y 0-255
* @param int $z 0-15
* @param int $level 0-15
*
@ -303,7 +303,7 @@ class Chunk{
* Returns the block light level at the specified chunk block coordinates
*
* @param int $x 0-15
* @param int $y 0-15
* @param int $y 0-255
* @param int $z 0-15
*
* @return int 0-15
@ -316,7 +316,7 @@ class Chunk{
* Sets the block light level at the specified chunk block coordinates
*
* @param int $x 0-15
* @param int $y 0-15
* @param int $y 0-255
* @param int $z 0-15
* @param int $level 0-15
*
@ -653,7 +653,7 @@ class Chunk{
* Returns the tile at the specified chunk block coordinates, or null if no tile exists.
*
* @param int $x 0-15
* @param int $y
* @param int $y 0-255
* @param int $z 0-15
*
* @return Tile|null

View File

@ -27,7 +27,6 @@ namespace pocketmine\network\mcpe;
use pocketmine\entity\Attribute;
use pocketmine\entity\Entity;
use pocketmine\entity\Skin;
use pocketmine\item\Durable;
use pocketmine\item\Item;
use pocketmine\item\ItemFactory;

View File

@ -75,9 +75,7 @@ class AvailableCommandsPacket extends DataPacket{
*/
public const ARG_FLAG_ENUM = 0x200000;
/**
* This is used for /xp <level: int>L. It can only be applied to integer parameters.
*/
/** This is used for /xp <level: int>L. It can only be applied to integer parameters. */
public const ARG_FLAG_POSTFIX = 0x1000000;
public const HARDCODED_ENUM_NAMES = [

View File

@ -25,7 +25,6 @@ namespace pocketmine\network\mcpe\protocol;
#include <rules/DataPacket.h>
use pocketmine\network\mcpe\NetworkBinaryStream;
use pocketmine\network\mcpe\NetworkSession;
use function assert;

View File

@ -36,17 +36,11 @@ interface ProtocolInfo{
* This file is generated automatically, do not edit it manually.
*/
/**
* Actual Minecraft: PE protocol version
*/
/** Actual Minecraft: PE protocol version */
public const CURRENT_PROTOCOL = 389;
/**
* Current Minecraft PE version reported by the server. This is usually the earliest currently supported version.
*/
/** Current Minecraft PE version reported by the server. This is usually the earliest currently supported version. */
public const MINECRAFT_VERSION = 'v1.14.0';
/**
* Version number sent to clients in ping responses.
*/
/** Version number sent to clients in ping responses. */
public const MINECRAFT_VERSION_NETWORK = '1.14.0';
public const LOGIN_PACKET = 0x01;