Particle no longer extends Vector3

This commit is contained in:
Dylan K. Taylor
2018-12-16 14:15:41 +00:00
parent ebf9cb3e62
commit 3c520aa786
40 changed files with 122 additions and 186 deletions

View File

@ -108,7 +108,7 @@ class Painting extends Entity{
//non-living entities don't have a way to create drops generically yet
$this->level->dropItem($this, ItemFactory::get(Item::PAINTING));
}
$this->level->addParticle(new DestroyBlockParticle($this->add(0.5, 0.5, 0.5), BlockFactory::get(Block::PLANKS)));
$this->level->addParticle($this->add(0.5, 0.5, 0.5), new DestroyBlockParticle(BlockFactory::get(Block::PLANKS)));
}
protected function recalculateBoundingBox() : void{

View File

@ -35,7 +35,7 @@ class Egg extends Throwable{
protected function onHit(ProjectileHitEvent $event) : void{
for($i = 0; $i < 6; ++$i){
$this->level->addParticle(new ItemBreakParticle($this, ItemFactory::get(Item::EGG)));
$this->level->addParticle($this, new ItemBreakParticle(ItemFactory::get(Item::EGG)));
}
}
}

View File

@ -31,7 +31,7 @@ class Snowball extends Throwable{
protected function onHit(ProjectileHitEvent $event) : void{
for($i = 0; $i < 6; ++$i){
$this->level->addParticle(new SnowballPoofParticle($this));
$this->level->addParticle($this, new SnowballPoofParticle());
}
}
}