protected function checkBlockCollision()
{
foreach ($blocksaround = $this->getBlocksAround() as $block) {
$block->onEntityCollide($this);
if ($this->getServer()->redstoneEnabled) {
if ($block instanceof PressurePlate) {
$this->activatedPressurePlates[Level::blockHash($block->x, $block->y, $block->z)] = $block;
}
}
}
if ($this->getServer()->redstoneEnabled) {
/** @var \pocketmine\block\PressurePlate $block * */
foreach ($this->activatedPressurePlates as $key => $block) {
if (!isset($blocksaround[$key])) {
$block->checkActivation();
}
}
}
}