Fixed some issues related to new indexes

This commit is contained in:
Shoghi Cervantes
2015-05-16 22:36:55 +02:00
parent fb05636694
commit fbbe02a3bc
3 changed files with 24 additions and 16 deletions

View File

@ -272,9 +272,9 @@ abstract class Door extends Transparent{
if($down->getId() === $this->id){
$meta = $down->getDamage() ^ 0x04;
$this->getLevel()->setBlock($down, Block::get($this->id, $meta), true);
$players = $this->getLevel()->getUsingChunk($this->x >> 4, $this->z >> 4);
$players = $this->getLevel()->getChunkPlayers($this->x >> 4, $this->z >> 4);
if($player instanceof Player){
unset($players[$player->getId()]);
unset($players[$player->getLoaderId()]);
}
$this->level->addSound(new DoorSound($this));
@ -285,9 +285,9 @@ abstract class Door extends Transparent{
}else{
$this->meta ^= 0x04;
$this->getLevel()->setBlock($this, $this, true);
$players = $this->getLevel()->getUsingChunk($this->x >> 4, $this->z >> 4);
$players = $this->getLevel()->getChunkPlayers($this->x >> 4, $this->z >> 4);
if($player instanceof Player){
unset($players[$player->getId()]);
unset($players[$player->getLoaderId()]);
}
$this->level->addSound(new DoorSound($this));
}