Closed DanteDEVS closed 7 months ago
Can you show how you're using MobEquipmentPacket?
Is your pocketmine installation operating onthe src directory with composer for dependencies? If so, make sure you updated the composer dependencies after you updated your pocketmine source.
I don't think this is a PM sided error, its a user sided error, something within the users code
`
$pk = new MobEquipmentPacket();
$pk->actorRuntimeId = $player->getId();
$pk->item = ItemStackWrapper::legacy(new ItemStack(20138, 0, 1, 0, null, [], []));
$pk->inventorySlot = 0;
$pk->hotbarSlot = 0;
$player->sendData($this->getViewers(), [$pk]);
`
try and see if the error presists after using this:
$pk = MobEquipmentPacket::create(
$this->getId(),
ItemStackWrapper::legacy(TypeConverter::getInstance()->coreItemStackToNet(VanillaItems::IRON_SWORD())),
0,
0,
ContainerIds::INVENTORY
);
$player->getNetworkSession()->sendDataPacket($pk);
Wow it works know, but know, u see the code is for throwable sword entity that i attempted to convert from pm3 to pm5, but know its not moving like the thing just stands still, then despawns because of a despawn sword task, and ive tried mostly everything i can do with my knowledge with pm5
[21:12:21.288] [Server thread/CRITICAL]: Error: "Call to undefined method pocketmine\network\mcpe\protocol\MobEquipmentPacket::getTypeId()" (EXCEPTION) in "pmsrc/vendor/pocketmine/bedrock-protocol/src/serializer/PacketSerializer" at line 453
Thats exact error
im not sure if its a problem with my code but its only giving out that.