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

Uncompability with Campfire Plugin #24

Closed
TheLemzz opened this issue Apr 17, 2024 · 3 comments
Closed

Uncompability with Campfire Plugin #24

TheLemzz opened this issue Apr 17, 2024 · 3 comments
Labels
bug Something isn't working Invalid This doesn't seem right

Comments

@TheLemzz
Copy link

TheLemzz commented Apr 17, 2024

  1. Install a third-party plugin that will add a working campfire
  2. start the server
THIS CRASH WAS CAUSED BY A PLUGIN
BAD PLUGIN: DummyItemsBlocks

Thread: AsyncWorker#0
Error: diamondgold\DummyItemsBlocks\util\BlockStateRegistration::diamondgold\DummyItemsBlocks\util\{closure}(): Argument #1 ($block) must be of type pocketmine\block\SimplePillar, pocketmine\block\UnknownBlock given, called in /root/MerryWorld/src/data/bedrock/block/convert/BlockObjectToStateSerializer.php on line 270
File: plugins/DummyItemsBlocks/src/diamondgold/DummyItemsBlocks/util/BlockStateRegistration
Line: 211
Type: TypeError
Backtrace:
#0 pmsrc/src/data/bedrock/block/convert/BlockObjectToStateSerializer(270): diamondgold\DummyItemsBlocks\util\BlockStateRegistration::diamondgold\DummyItemsBlocks\util\{closure}(object pocketmine\block\UnknownBlock#167248)
#1 pmsrc/src/data/bedrock/block/convert/BlockObjectToStateSerializer(214): pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer->serializeBlock(object pocketmine\block\UnknownBlock#167248)
#2 pmsrc/src/network/mcpe/convert/BlockTranslator(61): pocketmine\data\bedrock\block\convert\BlockObjectToStateSerializer->serialize(int 21975721)
#3 pmsrc/src/network/mcpe/serializer/ChunkSerializer(148): pocketmine\network\mcpe\convert\BlockTranslator->internalIdToNetworkId(int 21975721)
#4 pmsrc/src/network/mcpe/serializer/ChunkSerializer(94): pocketmine\network\mcpe\serializer\ChunkSerializer::serializeSubChunk(object pocketmine\world\format\SubChunk#33861, object pocketmine\network\mcpe\convert\BlockTranslator#49166, object pocketmine\network\mcpe\protocol\serializer\PacketSerializer#167349, false)
#5 pmsrc/src/network/mcpe/ChunkRequestTask(74): pocketmine\network\mcpe\serializer\ChunkSerializer::serializeFullChunk(object pocketmine\world\format\Chunk#49173, int 0, object pocketmine\network\mcpe\convert\BlockTranslator#49166, string[0] )
#6 pmsrc/src/scheduler/AsyncTask(81): pocketmine\network\mcpe\ChunkRequestTask->onRun()
#7 (): pocketmine\scheduler\AsyncTask->run()

Code:
[202]     {
[203]         $block = new SimplePillar(new BlockIdentifier(BlockTypeIds::newId()), Utils::generateNameFromId($id), new BlockTypeInfo(BlockBreakInfo::instant()));
[204]         self::register($block, [$id]);
[205] 
[206]         GlobalBlockStateHandlers::getDeserializer()->map($id,
[207]             fn(Reader $reader): SimplePillar => (clone $block)
[208]                 ->setAxis($reader->readPillarAxis())
[209]         );
[210]         GlobalBlockStateHandlers::getSerializer()->map($block,
[211]             fn(SimplePillar $block) => Writer::create($id)
[212]                 ->writePillarAxis($block->getAxis())
[213]         );
[214]     }
[215] 
[216]     public static function sign(string $standingId, string $wallId, FloorSign $floor, WallSign $wall): void
[217]     {
[218]         self::register($floor, [$standingId], false);
[219] 
[220]         GlobalBlockStateHandlers::getDeserializer()->map($standingId,
[221]             fn(Reader $reader): FloorSign => BlockStateDeserializerHelper::decodeFloorSign(clone $floor, $reader)
@TheLemzz TheLemzz added bug Something isn't working TBC To Be Confirmed labels Apr 17, 2024
@diamond-gold
Copy link
Owner

Could you test on a server with only DummyItemsBlocks and that plugin?
It seems like something is messing with the block serializer

@TheLemzz
Copy link
Author

without a plugin(https://github.com/nicholass003/Campfire/tree/main/src ) everything is working well. When installing the Campfire plugin, DummyItems starts crashing when trying to join into the server

@diamond-gold
Copy link
Owner

I am not able to reproduce this bug on a server with only the two plugins. Most likely another plugin is messing with the block serializer.

@diamond-gold diamond-gold closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2024
@diamond-gold diamond-gold added Invalid This doesn't seem right and removed TBC To Be Confirmed labels Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants