Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Random Server Crashes (EntityLookHelper) #230

Closed
Unfy opened this issue Apr 5, 2020 · 0 comments
Closed

Random Server Crashes (EntityLookHelper) #230

Unfy opened this issue Apr 5, 2020 · 0 comments

Comments

@Unfy
Copy link

Unfy commented Apr 5, 2020

Error: Argument 1 passed to pocketmine\entity\helper\EntityLookHelper::setLookPositionWithEntity() must be an instance of pocketmine\entity\Entity, null given, called in phar:///home/container/PocketMine-MP.phar/src/pocketmine/entity/behavior/MateBehavior.php on line 60
File: src/pocketmine/entity/helper/EntityLookHelper
Line: 46
Type: TypeError

Code:
[37] protected $isLooking = false;
[38] protected $posX = 0;
[39] protected $posY = 0;
[40] protected $posZ = 0;
[41]
[42] public function __construct(Mob $mob){
[43] $this->entity = $mob;
[44] }
[45]
[46] public function setLookPositionWithEntity(Entity $entity, float $deltaYaw, float $deltaPitch) : void{
[47] $this->setLookPosition($entity->x, $entity->y + $entity->getEyeHeight(), $entity->z, $deltaYaw, $deltaPitch);
[48] }
[49]
[50] public function setLookPosition(float $x, float $y, float $z, float $deltaYaw, float $deltaPitch) : void{
[51] $this->posX = $x;
[52] $this->posY = $y;
[53] $this->posZ = $z;
[54] $this->deltaLookYaw = $deltaYaw;
[55] $this->deltaLookPitch = $deltaPitch;
[56] $this->isLooking = true;

Backtrace:
#0 src/pocketmine/entity/behavior/MateBehavior(60): pocketmine\entity\helper\EntityLookHelper->setLookPositionWithEntity(NULL , integer 10, integer 40)
#1 src/pocketmine/entity/behavior/BehaviorPool(82): pocketmine\entity\behavior\MateBehavior->onTick()
#2 src/pocketmine/entity/Mob(183): pocketmine\entity\behavior\BehaviorPool->onUpdate()
#3 src/pocketmine/entity/passive/AbstractHorse(146): pocketmine\entity\Mob->onBehaviorUpdate()
#4 src/pocketmine/entity/Mob(174): pocketmine\entity\passive\AbstractHorse->onBehaviorUpdate()
#5 src/pocketmine/entity/passive/AbstractHorse(142): pocketmine\entity\Mob->onUpdate(integer 140823)
#6 src/pocketmine/level/Level(900): pocketmine\entity\passive\AbstractHorse->onUpdate(integer 140823)
#7 src/pocketmine/level/Level(826): pocketmine\level\Level->actuallyDoTick(integer 140823)
#8 src/pocketmine/Server(2359): pocketmine\level\Level->doTick(integer 140823)
#9 src/pocketmine/Server(2482): pocketmine\Server->checkTickUpdates(integer 140823, double 1586013276.2865)
#10 src/pocketmine/Server(2250): pocketmine\Server->tick()
#11 src/pocketmine/Server(2100): pocketmine\Server->tickProcessor()
#12 src/pocketmine/Server(1687): pocketmine\Server->start()
#13 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
#14 src/pocketmine/PocketMine(296): pocketmine\server()
#15 (11): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Altay version: 3.11.7+dev [Protocol 389]
Git commit: 10a8ca0
uname -a: Linux bd9f24ca-a3c0-4985-8560-941171c34fa4 4.4.0-164-generic #192-Ubuntu SMP Fri Sep 13 12:02:50 UTC 2019 x86_64
PHP Version: 7.3.14
Zend version: 3.3.14
OS : Linux, linux

@phoshp phoshp closed this as completed in 62c87b5 Apr 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant