mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 07:39:42 +00:00
Merge branch 'next-major' into modern-world-support
This commit is contained in:
@@ -28,16 +28,9 @@ use pocketmine\utils\AssumptionFailedError;
|
||||
use function assert;
|
||||
|
||||
class Position extends Vector3{
|
||||
public ?World $world = null;
|
||||
|
||||
/** @var World|null */
|
||||
public $world = null;
|
||||
|
||||
/**
|
||||
* @param float|int $x
|
||||
* @param float|int $y
|
||||
* @param float|int $z
|
||||
*/
|
||||
public function __construct($x, $y, $z, ?World $world){
|
||||
public function __construct(float|int $x, float|int $y, float|int $z, ?World $world){
|
||||
parent::__construct($x, $y, $z);
|
||||
if($world !== null && !$world->isLoaded()){
|
||||
throw new \InvalidArgumentException("Specified world has been unloaded and cannot be used");
|
||||
|
@@ -1904,11 +1904,9 @@ class World implements ChunkManager{
|
||||
public function getCollidingEntities(AxisAlignedBB $bb, ?Entity $entity = null) : array{
|
||||
$nearby = [];
|
||||
|
||||
if($entity === null || $entity->canCollide){
|
||||
foreach($this->getNearbyEntities($bb, $entity) as $ent){
|
||||
if($ent->canBeCollidedWith() && ($entity === null || $entity->canCollideWith($ent))){
|
||||
$nearby[] = $ent;
|
||||
}
|
||||
foreach($this->getNearbyEntities($bb, $entity) as $ent){
|
||||
if($ent->canBeCollidedWith() && ($entity === null || $entity->canCollideWith($ent))){
|
||||
$nearby[] = $ent;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -64,9 +64,6 @@ class RegionLoader{
|
||||
|
||||
public const FIRST_SECTOR = 2; //location table occupies 0 and 1
|
||||
|
||||
/** @var int */
|
||||
public static $COMPRESSION_LEVEL = 7;
|
||||
|
||||
/** @var string */
|
||||
protected $filePath;
|
||||
/** @var resource */
|
||||
|
Reference in New Issue
Block a user