mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 03:47:16 +00:00
Rename DestroyBlockParticle -> BlockBreakParticle
closes #3461 literally every other particle/sound has the subject first, followed by the (optional) verb, and finally Particle (or Sound). In addition, we refer to breaking blocks as 'break' everywhere except here, where we refer to it as 'destroy'.
This commit is contained in:
parent
7d1c4efdfb
commit
742f86e022
@ -956,6 +956,7 @@ This version features substantial changes to the network system, improving coher
|
||||
- `Location` has been moved to `pocketmine\entity\Location`.
|
||||
|
||||
#### Particles
|
||||
- `DestroyBlockParticle` has been renamed to `BlockBreakParticle` for consistency.
|
||||
- `DustParticle->__construct()` now accepts a `pocketmine\utils\Color` object instead of `r, g, b, a`.
|
||||
- `pocketmine\world\particle\Particle` no longer extends `pocketmine\math\Vector3`, and has been converted to an interface.
|
||||
- Added the following `Particle` classes:
|
||||
|
@ -36,7 +36,7 @@ use pocketmine\nbt\tag\CompoundTag;
|
||||
use pocketmine\network\mcpe\protocol\AddPaintingPacket;
|
||||
use pocketmine\network\mcpe\protocol\types\entity\EntityIds;
|
||||
use pocketmine\player\Player;
|
||||
use pocketmine\world\particle\DestroyBlockParticle;
|
||||
use pocketmine\world\particle\BlockBreakParticle;
|
||||
use pocketmine\world\World;
|
||||
use function ceil;
|
||||
|
||||
@ -116,7 +116,7 @@ class Painting extends Entity{
|
||||
//non-living entities don't have a way to create drops generically yet
|
||||
$this->getWorld()->dropItem($this->location, VanillaItems::PAINTING());
|
||||
}
|
||||
$this->getWorld()->addParticle($this->location->add(0.5, 0.5, 0.5), new DestroyBlockParticle(VanillaBlocks::OAK_PLANKS()));
|
||||
$this->getWorld()->addParticle($this->location->add(0.5, 0.5, 0.5), new BlockBreakParticle(VanillaBlocks::OAK_PLANKS()));
|
||||
}
|
||||
|
||||
protected function recalculateBoundingBox() : void{
|
||||
|
@ -82,7 +82,7 @@ use pocketmine\world\generator\PopulationTask;
|
||||
use pocketmine\world\light\BlockLightUpdate;
|
||||
use pocketmine\world\light\LightPopulationTask;
|
||||
use pocketmine\world\light\SkyLightUpdate;
|
||||
use pocketmine\world\particle\DestroyBlockParticle;
|
||||
use pocketmine\world\particle\BlockBreakParticle;
|
||||
use pocketmine\world\particle\Particle;
|
||||
use pocketmine\world\sound\BlockPlaceSound;
|
||||
use pocketmine\world\sound\Sound;
|
||||
@ -1699,7 +1699,7 @@ class World implements ChunkManager{
|
||||
|
||||
private function destroyBlockInternal(Block $target, Item $item, ?Player $player = null, bool $createParticles = false) : void{
|
||||
if($createParticles){
|
||||
$this->addParticle($target->getPos()->add(0.5, 0.5, 0.5), new DestroyBlockParticle($target));
|
||||
$this->addParticle($target->getPos()->add(0.5, 0.5, 0.5), new BlockBreakParticle($target));
|
||||
}
|
||||
|
||||
$target->onBreak($item, $player);
|
||||
|
@ -28,7 +28,7 @@ use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\convert\RuntimeBlockMapping;
|
||||
use pocketmine\network\mcpe\protocol\LevelEventPacket;
|
||||
|
||||
class DestroyBlockParticle implements Particle{
|
||||
class BlockBreakParticle implements Particle{
|
||||
|
||||
/** @var Block */
|
||||
private $block;
|
Loading…
x
Reference in New Issue
Block a user