mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
Fixed chunk unloading on same level
This commit is contained in:
parent
6977833b1a
commit
6f36e9af24
@ -653,10 +653,10 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
|
|
||||||
|
|
||||||
foreach($lastChunk as $index => $Yndex){
|
foreach($lastChunk as $index => $Yndex){
|
||||||
if($Yndex === 0){
|
|
||||||
$X = null;
|
$X = null;
|
||||||
$Z = null;
|
$Z = null;
|
||||||
Level::getXZ($index, $X, $Z);
|
Level::getXZ($index, $X, $Z);
|
||||||
|
if($Yndex === 0){
|
||||||
foreach($this->getLevel()->getChunkEntities($X, $Z) as $entity){
|
foreach($this->getLevel()->getChunkEntities($X, $Z) as $entity){
|
||||||
if($entity !== $this){
|
if($entity !== $this){
|
||||||
$entity->despawnFrom($this);
|
$entity->despawnFrom($this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user