Skip to content

Bedrock 1.12.30: Kicked due to "Server sent broken packet." #104

@Muqsit

Description

@Muqsit

After upgrading to Bedrock Edition v1.12.30, the client disconnects when logging in and the client-side message "Server sent broken packet." is displayed. Other WearableComponent::SLOT_ constants function correctly, however WearableComponent::SLOT_WEAPON_MAIN_HAND appears to be causing this issue. I'm defining the wearable component only for completeness, so I've resorted to removing the wearable definition when registering weapons.

<?php

declare(strict_types=1);

namespace muqsit\testswords;

use customiesdevs\customies\item\component\WearableComponent;
use customiesdevs\customies\item\CustomiesItemFactory;
use customiesdevs\customies\item\ItemComponents;
use customiesdevs\customies\item\ItemComponentsTrait;
use pocketmine\event\Listener;
use pocketmine\item\Item;
use pocketmine\item\ItemIdentifier;
use pocketmine\plugin\PluginBase;

final class Loader extends PluginBase implements Listener{

	protected function onEnable() : void{
		$this->getServer()->getPluginManager()->registerEvents($this, $this);
		CustomiesItemFactory::getInstance()->registerItem(CustomSword::class, "custom:sword", "Custom Sword");
	}
}

final class CustomSword extends Item implements ItemComponents{
	use ItemComponentsTrait;

	public function __construct(ItemIdentifier $identifier, string $name){
		parent::__construct($identifier, $name);
		$this->initComponent("stick");
		$this->addComponent(new WearableComponent(WearableComponent::SLOT_WEAPON_MAIN_HAND));
	}
}

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions