mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 11:57:10 +00:00
Updated Math dependency
This commit is contained in:
parent
d04991feb6
commit
37b445f210
@ -26,7 +26,7 @@
|
||||
"pocketmine/spl": "0.3.0",
|
||||
"pocketmine/binaryutils": "dev-master#c824ac67eeeb6899c2a9ec91a769eb9ed6e3f595",
|
||||
"pocketmine/nbt": "dev-master#09809564c7e58c322dcefc6905ab333313e05d1f",
|
||||
"pocketmine/math": "dev-master#f88790f343b72563bf69658d6f14630fba580905",
|
||||
"pocketmine/math": "dev-master#95ae5600328ed2add44c0bc830a68d3660e9e0ef",
|
||||
"pocketmine/snooze": "dev-master#541f0f038f401e9117ae60c8dbc167a46569282d"
|
||||
},
|
||||
"autoload": {
|
||||
|
12
composer.lock
generated
12
composer.lock
generated
@ -1,10 +1,10 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "9993493665deb27b5b984de2c596cdc5",
|
||||
"content-hash": "43d1b7cd0a341ec946218a7664720fd0",
|
||||
"packages": [
|
||||
{
|
||||
"name": "pocketmine/binaryutils",
|
||||
@ -46,12 +46,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pmmp/Math.git",
|
||||
"reference": "f88790f343b72563bf69658d6f14630fba580905"
|
||||
"reference": "95ae5600328ed2add44c0bc830a68d3660e9e0ef"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/pmmp/Math/zipball/f88790f343b72563bf69658d6f14630fba580905",
|
||||
"reference": "f88790f343b72563bf69658d6f14630fba580905",
|
||||
"url": "https://api.github.com/repos/pmmp/Math/zipball/95ae5600328ed2add44c0bc830a68d3660e9e0ef",
|
||||
"reference": "95ae5600328ed2add44c0bc830a68d3660e9e0ef",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -72,7 +72,7 @@
|
||||
"source": "https://github.com/pmmp/Math/tree/master",
|
||||
"issues": "https://github.com/pmmp/Math/issues"
|
||||
},
|
||||
"time": "2018-05-28T12:55:13+00:00"
|
||||
"time": "2018-06-09T09:26:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pocketmine/nbt",
|
||||
|
@ -1503,7 +1503,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
}
|
||||
|
||||
protected function checkNearEntities(int $tickDiff){
|
||||
foreach($this->level->getNearbyEntities($this->boundingBox->grow(1, 0.5, 1), $this) as $entity){
|
||||
foreach($this->level->getNearbyEntities($this->boundingBox->expandedCopy(1, 0.5, 1), $this) as $entity){
|
||||
$entity->scheduleUpdate();
|
||||
|
||||
if(!$entity->isAlive() or $entity->isFlaggedForDespawn()){
|
||||
|
@ -1478,7 +1478,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
|
||||
Timings::$entityMoveTimer->startTiming();
|
||||
|
||||
$newBB = $this->boundingBox->getOffsetBoundingBox($dx, $dy, $dz);
|
||||
$newBB = $this->boundingBox->offsetCopy($dx, $dy, $dz);
|
||||
|
||||
$list = $this->level->getCollisionCubes($this, $newBB, false);
|
||||
|
||||
@ -1566,7 +1566,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
|
||||
assert(abs($dx) <= 20 and abs($dy) <= 20 and abs($dz) <= 20, "Movement distance is excessive: dx=$dx, dy=$dy, dz=$dz");
|
||||
|
||||
$list = $this->level->getCollisionCubes($this, $this->level->getTickRate() > 1 ? $this->boundingBox->getOffsetBoundingBox($dx, $dy, $dz) : $this->boundingBox->addCoord($dx, $dy, $dz), false);
|
||||
$list = $this->level->getCollisionCubes($this, $this->level->getTickRate() > 1 ? $this->boundingBox->offsetCopy($dx, $dy, $dz) : $this->boundingBox->addCoord($dx, $dy, $dz), false);
|
||||
|
||||
foreach($list as $bb){
|
||||
$dy = $bb->calculateYOffset($this->boundingBox, $dy);
|
||||
|
@ -185,7 +185,7 @@ abstract class Projectile extends Entity{
|
||||
continue;
|
||||
}
|
||||
|
||||
$entityBB = $entity->boundingBox->grow(0.3, 0.3, 0.3);
|
||||
$entityBB = $entity->boundingBox->expandedCopy(0.3, 0.3, 0.3);
|
||||
$entityHitResult = $entityBB->calculateIntercept($start, $end);
|
||||
|
||||
if($entityHitResult === null){
|
||||
|
@ -81,7 +81,7 @@ class SplashPotion extends Throwable{
|
||||
|
||||
if($hasEffects){
|
||||
if(!$this->willLinger()){
|
||||
foreach($this->level->getNearbyEntities($this->boundingBox->grow(4.125, 2.125, 4.125), $this) as $entity){
|
||||
foreach($this->level->getNearbyEntities($this->boundingBox->expandedCopy(4.125, 2.125, 4.125), $this) as $entity){
|
||||
if($entity instanceof Living){
|
||||
$distanceSquared = $entity->distanceSquared($this);
|
||||
if($distanceSquared > 16){ //4 blocks
|
||||
|
@ -1185,7 +1185,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
|
||||
if($entities){
|
||||
foreach($this->getCollidingEntities($bb->grow(0.25, 0.25, 0.25), $entity) as $ent){
|
||||
foreach($this->getCollidingEntities($bb->expandedCopy(0.25, 0.25, 0.25), $entity) as $ent){
|
||||
$collides[] = clone $ent->boundingBox;
|
||||
}
|
||||
}
|
||||
@ -1818,7 +1818,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
|
||||
if($player !== null){
|
||||
if(($diff = $player->getNextPosition()->subtract($player->getPosition())) and $diff->lengthSquared() > 0.00001){
|
||||
$bb = $player->getBoundingBox()->getOffsetBoundingBox($diff->x, $diff->y, $diff->z);
|
||||
$bb = $player->getBoundingBox()->offsetCopy($diff->x, $diff->y, $diff->z);
|
||||
if($collisionBox->intersectsWith($bb)){
|
||||
return false; //Inside player BB
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user