menu
#4656983 Return value of revivalpmmp\pureentities\entity\monster\walking\Wolf::getPositionNearOwner() must be an instance of pocketmine\math\Vector3, null returned

Submitted by PocketMine-MP 3.15.4

General information

Version: 3.15.4
Git commit: e8b6b563
Plugin involvement: Direct
Report date: 2020-11-22 03:11:17 +0000 UTC

System Information

PHP version: 7.3.7
Operating system: linux
System banner: Linux 9fc465e0f21d 4.15.0-106-generic #107-Ubuntu SMP Thu Jun 4 11:27:52 UTC 2020 x86_64

Error information

Warning: the PureEntitiesX plugin was directly involved in this crash. Please contact the plugin author.
Message: Return value of revivalpmmp\pureentities\entity\monster\walking\Wolf::getPositionNearOwner() must be an instance of pocketmine\math\Vector3, null returned
File: plugins/PureEntitiesX_20201031_194821.phar/src/revivalpmmp/pureentities/traits/Tameable
Line: #192
Error level: TypeError
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
	 */

private function getPositionNearOwner(Player $owner, BaseEntity $pet) : Vector3{
$x = $owner->x + (mt_rand(2, 3) * (mt_rand(0, 1) == 1 ?: -1));
$z = $owner->z + (mt_rand(2, 3) * (mt_rand(0, 1) == 1 ?: -1));
$pos = PureEntities::getInstance()->getSuitableHeightPosition($x, $owner->y, $z, $pet->getLevel());
if($pos !== null){
return new Vector3($x, $pos->y, $z);
}else{
return null;
}
}

/**
* Returns the items the entity can be tamed with (maybe multiple!)
*
* @return array
*/
public function getTameFoods(){
return $this->tameFoods;
#0 plugins/PureEntitiesX_20201031_194821.phar/src/revivalpmmp/pureentities/entity/monster/walking/Wolf(353): revivalpmmp\pureentities\entity\monster\walking\Wolf->getPositionNearOwner(object pocketmine\Player, object hmmhmmmm\boss\entity\walk\BossWolf)
#1 plugins/PureEntitiesX_20201031_194821.phar/src/revivalpmmp/pureentities/entity/monster/walking/Wolf(131): revivalpmmp\pureentities\entity\monster\walking\Wolf->checkFollowOwner()
#2 plugins/BossPlugin.phar/src/hmmhmmmm/boss/entity/walk/BossWolf(52): revivalpmmp\pureentities\entity\monster\walking\Wolf->entityBaseTick(integer 1)
#3 plugins/PureEntitiesX_20201031_194821.phar/src/revivalpmmp/pureentities/entity/monster/WalkingMonster(185): hmmhmmmm\boss\entity\walk\BossWolf->entityBaseTick(integer 1)
#4 src/pocketmine/level/Level(854): revivalpmmp\pureentities\entity\monster\WalkingMonster->onUpdate(integer 172238)
#5 src/pocketmine/level/Level(787): pocketmine\level\Level->actuallyDoTick(integer 172238)
#6 src/pocketmine/Server(2267): pocketmine\level\Level->doTick(integer 172238)
#7 src/pocketmine/Server(2398): pocketmine\Server->checkTickUpdates(integer 172238, double 1606014677.3945)
#8 src/pocketmine/Server(2154): pocketmine\Server->tick()
#9 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#10 src/pocketmine/Server(1588): pocketmine\Server->start()
#11 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[15] /home/gs-40093/, string[23] /home/gs-40093/plugins/)
#12 src/pocketmine/PocketMine(304): pocketmine\server()
#13 (11): require(string[95] phar:///pro/bin/mcpe/pocketmine-stable-1.16.20/PocketMine-MP.phar/src/pocketmine)

Loaded Plugins

  • Show

Server Settings

  • Show