mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-10 13:35:29 +00:00
Merge branch 'stable'
This commit is contained in:
commit
382d97a178
@ -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();
|
||||||
}
|
}
|
||||||
|
@ -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)){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user