Crash - Call to a member function getBlock() on null
Hzste opened this issue · 2 comments
https://github.com/RevivalPMMP/PureEntitiesX/wiki/Issue-Reporting-Guidelines
If you do not follow the guidelines at the above link, your issue will be closed with a Resolution Status of "Invalid".
Required Information
PocketMine-MP Version: Latest (nether update)
Plugin Version: 0.6.6
Where you got the plugin: poggit
Error: Call to a member function getBlock() on null
File: plugins/PureEntitiesX.phar/src/revivalpmmp/pureentities/entity/BaseEntity
Line: 247
Type: Error
Code:
[238] }
[239]
[240] public function updateMovement(bool $teleport = false) : void{
[241] if(!$this->isClosed() && $this->getLevel() !== null){
[242] parent::updateMovement($teleport);
[243] }
[244] }
[245]
[246] public function isInsideOfSolid() : bool{
[247] $block = $this->level->getBlock($this->temporalVector->setComponents(Math::floorFloat($this->x), Math::floorFloat($this->y + $this->height - 0.18), Math::floorFloat($this->z)));
[248] $bb = $block->getBoundingBox();
[249] return $bb !== null and $block->isSolid() and !$block->isTransparent() and $bb->intersectsWith($this->getBoundingBox());
[250] }
[251]
[252] /**
[253] * Entity gets attacked by another entity / explosion or something similar
[254] *
[255] * @param EntityDamageEvent $source the damage event
[256] */
[257] public function attack(EntityDamageEvent $source) : void{
Backtrace:
#0 src/pocketmine/entity/Living(650): revivalpmmp\pureentities\entity\BaseEntity->isInsideOfSolid()
#1 plugins/PureEntitiesX.phar/src/revivalpmmp/pureentities/entity/BaseEntity(308): pocketmine\entity\Living->entityBaseTick(integer 1)
#2 plugins/PureEntitiesX.phar/src/revivalpmmp/pureentities/entity/monster/WalkingMonster(216): revivalpmmp\pureentities\entity\BaseEntity->entityBaseTick(integer 1)
#3 plugins/BossPlugin_v3.21/src/hmmhmmmm/boss/entity/walk/BossEndermite(63): revivalpmmp\pureentities\entity\monster\WalkingMonster->entityBaseTick(integer 1)
#4 plugins/PureEntitiesX.phar/src/revivalpmmp/pureentities/entity/monster/WalkingMonster(184): hmmhmmmm\boss\entity\walk\BossEndermite->entityBaseTick(integer 1)
#5 src/pocketmine/level/Level(852): revivalpmmp\pureentities\entity\monster\WalkingMonster->onUpdate(integer 8162)
#6 src/pocketmine/level/Level(785): pocketmine\level\Level->actuallyDoTick(integer 8162)
#7 src/pocketmine/Server(2267): pocketmine\level\Level->doTick(integer 8162)
#8 src/pocketmine/Server(2398): pocketmine\Server->checkTickUpdates(integer 8162, double 1593724765.9227)
#9 src/pocketmine/Server(2154): pocketmine\Server->tick()
#10 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#11 src/pocketmine/Server(1588): pocketmine\Server->start()
#12 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[48] /home/minecraft/multicraft/servers/server152020/, string[56] /home/minecraft/multicraft/servers/server152020/plugins/)
#13 src/pocketmine/PocketMine(304): pocketmine\server()
#14 (11): require(string[96] phar:///home/minecraft/multicraft/servers/server152020/custom.phar/src/pocketmin)
New version exist (0.6.7) - could you try it ?
Currently, I am unable to reproduce this issue. Please update to the next released version. If you continue to have problems, please open a new issue.