mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
Fixed particles being emmited on non-player block breaks
This commit is contained in:
parent
04f3cc4905
commit
ba635b8858
@ -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->server->getPluginManager()->callEvent($ev = new PlayerBedLeaveEvent($this, $this->level->getBlock($this->sleeping)));
|
||||||
|
|
||||||
$this->sleeping = null;
|
$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->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);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ class BurningFurnace extends Solid{
|
|||||||
$furnace = Tile::createTile("Furnace", $this->getLevel()->getChunk($this->x >> 4, $this->z >> 4), $nbt);
|
$furnace = Tile::createTile("Furnace", $this->getLevel()->getChunk($this->x >> 4, $this->z >> 4), $nbt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(($player->getGamemode() & 0x01) === 0x01){
|
if($player->isCreative()){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1339,8 +1339,8 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
$players = $this->getUsingChunk($target->x >> 4, $target->z >> 4);
|
$players = $this->getUsingChunk($target->x >> 4, $target->z >> 4);
|
||||||
if($player !== null){
|
if($player !== null){
|
||||||
unset($players[$player->getId()]);
|
unset($players[$player->getId()]);
|
||||||
}
|
|
||||||
$this->addParticle(new DestroyBlockParticle($target->add(0.5, 0.5, 0.5), $target), $players);
|
$this->addParticle(new DestroyBlockParticle($target->add(0.5, 0.5, 0.5), $target), $players);
|
||||||
|
}
|
||||||
|
|
||||||
$target->onBreak($item);
|
$target->onBreak($item);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user