Skip to content

Commit

Permalink
Use null itemstack
Browse files Browse the repository at this point in the history
  • Loading branch information
dries-c committed Aug 13, 2024
1 parent 5e7605b commit 0e78556
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/network/mcpe/StandardEntityEventBroadcaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
use pocketmine\network\mcpe\protocol\types\entity\Attribute as NetworkAttribute;
use pocketmine\network\mcpe\protocol\types\entity\PropertySyncData;
use pocketmine\network\mcpe\protocol\types\inventory\ContainerIds;
use pocketmine\network\mcpe\protocol\types\inventory\ItemStack;
use pocketmine\network\mcpe\protocol\types\inventory\ItemStackWrapper;
use pocketmine\network\mcpe\protocol\UpdateAttributesPacket;
use function array_map;
Expand Down Expand Up @@ -133,7 +134,7 @@ public function onMobArmorChange(array $recipients, Living $mob) : void{
ItemStackWrapper::legacy($converter->coreItemStackToNet($inv->getChestplate())),
ItemStackWrapper::legacy($converter->coreItemStackToNet($inv->getLeggings())),
ItemStackWrapper::legacy($converter->coreItemStackToNet($inv->getBoots())),
ItemStackWrapper::legacy($converter->coreItemStackToNet(VanillaItems::AIR()))
new ItemStackWrapper(0, ItemStack::null())
));
}

Expand Down

5 comments on commit 0e78556

@Zwuiix-cmd
Copy link

Choose a reason for hiding this comment

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

It can't unmap minecraft:dirt
[AsyncWorker#4 thread/CRITICAL]: pocketmine\utils\AssumptionFailedError: "Unmapped blockstate returned by blockstate serializer: TAG_Compound={ "name" => TAG_String="minecraft:dirt" "version" => TAG_Int=18224128 "states" => TAG_Compound={ } "PMMPDataVersion" => TAG_Long=1 }" (EXCEPTION) in "pmsrc/src/network/mcpe/convert/BlockTranslator" at line 65
--- Stack trace ---
#0 pmsrc/src/network/mcpe/serializer/ChunkSerializer(148): pocketmine\network\mcpe\convert\BlockTranslator->internalIdToNetworkId(int 20742760)
pmmp#1 pmsrc/src/network/mcpe/serializer/ChunkSerializer(94): pocketmine\network\mcpe\serializer\ChunkSerializer::serializeSubChunk(object pocketmine\world\format\SubChunk#38, object pocketmine\network\mcpe\convert\BlockTranslator#5543, object pocketmine\network\mcpe\protocol\serializer\PacketSerializer#134415, false)
pmmp#2 pmsrc/src/network/mcpe/ChunkRequestTask(74): pocketmine\network\mcpe\serializer\ChunkSerializer::serializeFullChunk(object pocketmine\world\format\Chunk#70, int 0, object pocketmine\network\mcpe\convert\BlockTranslator#5543, string[0] )
pmmp#3 pmsrc/src/scheduler/AsyncTask(81): pocketmine\network\mcpe\ChunkRequestTask->onRun()
pmmp#4 (): pocketmine\scheduler\AsyncTask->run()
--- End of exception information ---

@dries-c
Copy link
Owner Author

Choose a reason for hiding this comment

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

You've to manually update the protocol & bedrock-data for now, since it's not tagged for release yet

@Zwuiix-cmd
Copy link

Choose a reason for hiding this comment

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

I use your bedrock-protocol, don't you have a repo for your bedrock-data?

@dries-c
Copy link
Owner Author

Choose a reason for hiding this comment

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

@Zwuiix-cmd
Copy link

Choose a reason for hiding this comment

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

Thanks

Please sign in to comment.