Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/slapper/entities/SlapperEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace slapper\entities;

use pocketmine\entity\Entity;
use pocketmine\item\Item;
use pocketmine\item\ItemFactory;
use pocketmine\item\ItemIds;
use pocketmine\level\Level;
Expand Down Expand Up @@ -60,7 +59,7 @@ protected function sendSpawnPacket(Player $player): void {
$pk2->uuid = UUID::fromRandom();
$pk2->username = $this->getDisplayName($player);
$pk2->position = $this->asVector3()->add(0, static::HEIGHT);
$pk2->item = ItemStackWrapper::legacy(Item::get(Item::AIR));
$pk2->item = ItemStackWrapper::legacy(Item::get(ItemIds::AIR));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also change Item::get back to ItemFactory::get

$pk2->metadata = [self::DATA_SCALE => [self::DATA_TYPE_FLOAT, 0.0]];

$player->dataPacket($pk2);
Expand Down