Skip to content

Commit

Permalink
FIX LỖI KHI QUAY RƯƠNG THÌ BỊ CRASH SERVER
Browse files Browse the repository at this point in the history
CẢM ƠN BẠN GRIZZLY GAMING ĐÃ GÓP LỖI
  • Loading branch information
HUYDGD authored Aug 24, 2020
1 parent baef5dd commit 8f89e7c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/mysterybox/entity/MysterySkull.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@

use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
use pocketmine\network\mcpe\protocol\AddItemActorPacket as AddItemEntityPacket;
use pocketmine\network\mcpe\protocol\RemoveEntityPacket;
use pocketmine\network\mcpe\protocol\DataPacket;
use pocketmine\network\mcpe\protocol\RemoveActorPacket as RemoveEntityPacket;

use mysterybox\tile\MysteryTile;

Expand Down Expand Up @@ -120,7 +121,7 @@ public function entityBaseTick(int $diff = 1) : bool{
}

if($this->item_eid !== -1){
$pk = new RemoveEntityPacket;
$pk = new RemoveEntityPacket();
$pk->entityUniqueId = $this->item_eid;

$this->getLevel()->addChunkPacket($this->x >> 4, $this->z >> 4, $pk);
Expand Down Expand Up @@ -163,7 +164,7 @@ public function entityBaseTick(int $diff = 1) : bool{
$this->ftp->setInvisible(true);

if($this->item_eid !== -1){
$pk = new RemoveEntityPacket;
$pk = new RemoveEntityPacket();
$pk->entityUniqueId = $this->item_eid;

$this->getLevel()->addChunkPacket($this->x >> 4, $this->z >> 4, $pk);
Expand All @@ -187,7 +188,7 @@ public function entityBaseTick(int $diff = 1) : bool{

$this->item_eid = Entity::$entityCount++;

$pk = new AddItemEntityPacket;
$pk = new AddItemEntityPacket();
$pk->entityRuntimeId = $this->item_eid;
$pk->item = $data[0];
$pk->position = $this->ftp->asVector3();
Expand Down

0 comments on commit 8f89e7c

Please sign in to comment.