mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Merge branch 'stable' into next-minor
This commit is contained in:
commit
a3502a711d
14
composer.lock
generated
14
composer.lock
generated
@ -930,21 +930,20 @@
|
||||
},
|
||||
{
|
||||
"name": "ramsey/uuid",
|
||||
"version": "4.5.1",
|
||||
"version": "4.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ramsey/uuid.git",
|
||||
"reference": "a161a26d917604dc6d3aa25100fddf2556e9f35d"
|
||||
"reference": "ad63bc700e7d021039e30ce464eba384c4a1d40f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ramsey/uuid/zipball/a161a26d917604dc6d3aa25100fddf2556e9f35d",
|
||||
"reference": "a161a26d917604dc6d3aa25100fddf2556e9f35d",
|
||||
"url": "https://api.github.com/repos/ramsey/uuid/zipball/ad63bc700e7d021039e30ce464eba384c4a1d40f",
|
||||
"reference": "ad63bc700e7d021039e30ce464eba384c4a1d40f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"brick/math": "^0.8.8 || ^0.9 || ^0.10",
|
||||
"ext-ctype": "*",
|
||||
"ext-json": "*",
|
||||
"php": "^8.0",
|
||||
"ramsey/collection": "^1.0"
|
||||
@ -976,7 +975,6 @@
|
||||
},
|
||||
"suggest": {
|
||||
"ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.",
|
||||
"ext-ctype": "Enables faster processing of character classification using ctype functions.",
|
||||
"ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.",
|
||||
"ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.",
|
||||
"paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
|
||||
@ -1008,7 +1006,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/ramsey/uuid/issues",
|
||||
"source": "https://github.com/ramsey/uuid/tree/4.5.1"
|
||||
"source": "https://github.com/ramsey/uuid/tree/4.6.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1020,7 +1018,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-09-16T03:22:46+00:00"
|
||||
"time": "2022-11-05T23:03:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
|
@ -38,6 +38,7 @@ use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection;
|
||||
use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataFlags;
|
||||
use pocketmine\player\Player;
|
||||
use pocketmine\world\sound\ArrowHitSound;
|
||||
use function ceil;
|
||||
use function mt_rand;
|
||||
use function sqrt;
|
||||
|
||||
@ -103,7 +104,7 @@ class Arrow extends Projectile{
|
||||
}
|
||||
|
||||
public function getResultDamage() : int{
|
||||
$base = parent::getResultDamage();
|
||||
$base = (int) ceil($this->motion->length() * parent::getResultDamage());
|
||||
if($this->isCritical()){
|
||||
return ($base + mt_rand(0, (int) ($base / 2) + 1));
|
||||
}else{
|
||||
|
@ -128,7 +128,7 @@ abstract class Projectile extends Entity{
|
||||
* Returns the amount of damage this projectile will deal to the entity it hits.
|
||||
*/
|
||||
public function getResultDamage() : int{
|
||||
return (int) ceil($this->motion->length() * $this->damage);
|
||||
return (int) ceil($this->damage);
|
||||
}
|
||||
|
||||
public function saveNBT() : CompoundTag{
|
||||
|
@ -2416,9 +2416,6 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
$this->ySize = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function teleport(Vector3 $pos, ?float $yaw = null, ?float $pitch = null) : bool{
|
||||
if(parent::teleport($pos, $yaw, $pitch)){
|
||||
|
||||
|
@ -70,7 +70,7 @@ class Internet{
|
||||
public static $online = true;
|
||||
|
||||
/**
|
||||
* Gets the External IP using an external service, it is cached
|
||||
* Lazily gets the External IP using an external service and caches the result
|
||||
*
|
||||
* @param bool $force default false, force IP check even when cached
|
||||
*
|
||||
|
@ -208,7 +208,7 @@ abstract class Timezone{
|
||||
//That's been a bug in PHP since 2008!
|
||||
foreach(timezone_abbreviations_list() as $zones){
|
||||
foreach($zones as $timezone){
|
||||
if($timezone['offset'] == $offset){
|
||||
if($timezone['timezone_id'] !== null && $timezone['offset'] == $offset){
|
||||
return $timezone['timezone_id'];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user