diamond-gold / DummyItemsBlocks

🗿 Adds items and blocks for decoration purposes
https://poggit.pmmp.io/p/DummyItemsBlocks
MIT License
24 stars 10 forks source link

Uncompability with Campfire Plugin #24

Closed TheLemzz closed 6 months ago

TheLemzz commented 6 months ago
  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)

diamond-gold commented 6 months ago

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

TheLemzz commented 6 months ago

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 commented 6 months ago

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.