Merge branch 'stable'

This commit is contained in:
Dylan K. Taylor 2019-07-17 13:58:43 +01:00
commit 382d97a178
2 changed files with 3 additions and 2 deletions

View File

@ -32,6 +32,7 @@ use pocketmine\nbt\tag\ShortTag;
use pocketmine\network\mcpe\protocol\types\EntityMetadataFlags; use pocketmine\network\mcpe\protocol\types\EntityMetadataFlags;
use pocketmine\network\mcpe\protocol\types\EntityMetadataProperties; use pocketmine\network\mcpe\protocol\types\EntityMetadataProperties;
use pocketmine\world\Explosion; use pocketmine\world\Explosion;
use pocketmine\world\Position;
use pocketmine\world\sound\IgniteSound; use pocketmine\world\sound\IgniteSound;
class PrimedTNT extends Entity implements Explosive{ class PrimedTNT extends Entity implements Explosive{
@ -110,7 +111,7 @@ class PrimedTNT extends Entity implements Explosive{
$ev = new ExplosionPrimeEvent($this, 4); $ev = new ExplosionPrimeEvent($this, 4);
$ev->call(); $ev->call();
if(!$ev->isCancelled()){ if(!$ev->isCancelled()){
$explosion = new Explosion($this, $ev->getForce(), $this); $explosion = new Explosion(Position::fromObject($this->add(0, $this->height / 2, 0), $this->world), $ev->getForce(), $this);
if($ev->isBlockBreaking()){ if($ev->isBlockBreaking()){
$explosion->explodeA(); $explosion->explodeA();
} }

View File

@ -1378,7 +1378,7 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
* If you must tamper with this code, be aware that this can cause very nasty results. Do not waste our time * If you must tamper with this code, be aware that this can cause very nasty results. Do not waste our time
* asking for help if you suffer the consequences of messing with this. * asking for help if you suffer the consequences of messing with this.
*/ */
$this->logger->warning("Moved too fast, reverting movement"); $this->logger->debug("Moved too fast, reverting movement");
$this->logger->debug("Old position: " . $this->asVector3() . ", new position: " . $this->newPosition); $this->logger->debug("Old position: " . $this->asVector3() . ", new position: " . $this->newPosition);
$revert = true; $revert = true;
}elseif(!$this->world->isInLoadedTerrain($newPos) or !$this->world->isChunkGenerated($newPos->getFloorX() >> 4, $newPos->getFloorZ() >> 4)){ }elseif(!$this->world->isInLoadedTerrain($newPos) or !$this->world->isChunkGenerated($newPos->getFloorX() >> 4, $newPos->getFloorZ() >> 4)){