Fixed particles being emmited on non-player block breaks

This commit is contained in:
Shoghi Cervantes 2015-04-23 17:02:37 +02:00
parent 04f3cc4905
commit ba635b8858
3 changed files with 3 additions and 3 deletions

View File

@ -901,8 +901,8 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
$this->server->getPluginManager()->callEvent($ev = new PlayerBedLeaveEvent($this, $this->level->getBlock($this->sleeping)));
$this->sleeping = null;
$this->setDataFlag(self::DATA_PLAYER_FLAGS, self::DATA_PLAYER_FLAG_SLEEP, false);
$this->setDataProperty(self::DATA_PLAYER_BED_POSITION, self::DATA_TYPE_POS, [0, 0, 0]);
$this->setDataFlag(self::DATA_PLAYER_FLAGS, self::DATA_PLAYER_FLAG_SLEEP, false);
}
}

View File

@ -101,7 +101,7 @@ class BurningFurnace extends Solid{
$furnace = Tile::createTile("Furnace", $this->getLevel()->getChunk($this->x >> 4, $this->z >> 4), $nbt);
}
if(($player->getGamemode() & 0x01) === 0x01){
if($player->isCreative()){
return true;
}

View File

@ -1339,8 +1339,8 @@ class Level implements ChunkManager, Metadatable{
$players = $this->getUsingChunk($target->x >> 4, $target->z >> 4);
if($player !== null){
unset($players[$player->getId()]);
}
$this->addParticle(new DestroyBlockParticle($target->add(0.5, 0.5, 0.5), $target), $players);
}
$target->onBreak($item);