public function getPosition() { return new Position($this->x, $this->y, $this->z, $this->level); }
public function isEntityCollided(Entity $entity = null) { foreach ($this->getLevel()->getEntities() as $entity) { if ($entity instanceof Minecart && $entity->getPosition() === $this) { return true; } } return false; }