Skip to content

Commit f469432

Browse files
committed
Properly mark firework as non-saveable with chunk
1 parent 6b0486f commit f469432

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/entity/object/FireworkRocket.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
use pocketmine\entity\Explosive;
3030
use pocketmine\entity\Living;
3131
use pocketmine\entity\Location;
32+
use pocketmine\entity\NeverSavedWithChunkEntity;
3233
use pocketmine\event\entity\EntityDamageByEntityEvent;
3334
use pocketmine\event\entity\EntityDamageEvent;
3435
use pocketmine\item\FireworkRocket as FireworkItem;
@@ -46,7 +47,7 @@
4647
use function count;
4748
use function sqrt;
4849

49-
class FireworkRocket extends Entity implements Explosive{
50+
class FireworkRocket extends Entity implements Explosive, NeverSavedWithChunkEntity{
5051

5152
public static function getNetworkTypeId() : string{ return EntityIds::FIREWORKS_ROCKET; }
5253

@@ -113,14 +114,6 @@ public function setExplosions(array $explosions) : self{
113114
return $this;
114115
}
115116

116-
/**
117-
* TODO: The entity should be saved and loaded, but this is not possible.
118-
* @see https://bugs.mojang.com/browse/MCPE-165230
119-
*/
120-
public function canSaveWithChunk() : bool{
121-
return false;
122-
}
123-
124117
protected function onFirstUpdate(int $currentTick) : void{
125118
parent::onFirstUpdate($currentTick);
126119

0 commit comments

Comments
 (0)