HimmelKreis4865 / JavaGen

A PocketMine-MP plugin that generates vanilla terrain based on a java server
Apache License 2.0
23 stars 1 forks source link

Error: JavaGen\tile\JavaTileMappings::JavaGen\tile\{closure}() #2

Closed TheLemzz closed 3 months ago

TheLemzz commented 3 months ago

Thread: Main Error: JavaGen\tile\JavaTileMappings::JavaGen\tile{closure}(): Argument #3 ($chunk) must be of type pocketmine\world\format\Chunk, null given, called in /root/PocketMine-MP/plugins/JavaGen-main/src/JavaGen/EventListener.php on line 65 File: plugins/JavaGen-main/src/JavaGen/tile/JavaTileMappings Line: 36 Type: TypeError Backtrace:

0 plugins/JavaGen-main/src/JavaGen/EventListener(65): JavaGen\tile\JavaTileMappings->JavaGen\tile{closure}(object JavaGen\tile\JavaTile#74251, object pocketmine\world\World#136310, null)

1 pmsrc/src/scheduler/AsyncPool(280): pocketmine\scheduler\AsyncTask@anonymous

When a some chunks loading. Installed plugins: DummyItemsBlocks.

HimmelKreis4865 commented 3 months ago

Didn't think that this would happen, what exactly did you do, so I can reproduce the error

TheLemzz commented 3 months ago

Just load some chunks. By the way, I didn't get this error anymore, but I don't rule out that it exists

HimmelKreis4865 commented 3 months ago

Never got this error, I think this is pretty rare, so I simply added a check to check if the chunk is null. This may result in a few tiles not being placed in the world, the crash should not happen anymore though