Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Muqsit opened this issue Sep 21, 2023 · 2 comments
Open

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

Muqsit opened this issue Sep 21, 2023 · 2 comments

Comments

@Muqsit
Copy link

Muqsit commented Sep 21, 2023

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

@TwistedAsylumMC
Copy link
Collaborator

Looks like there was some changes related to the component in the 1.20.30 changelogs, I'll take a look to see if SLOT_WEAPON_MAIN_HAND was also changed

@nightdooms
Copy link

Is it fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants