pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.28k stars 1.55k forks source link

Custom Crafting Recipes doesn't work #5036

Closed Crasher508 closed 2 years ago

Crasher508 commented 2 years ago

Issue description

Steps to reproduce the issue

  1. create a custom shapedrecipe (like: https://pastebin.com/J4wpXTam)
  2. put all items correct in the crafting table
  3. start to craft
  4. look in the videos, there you see everythink

OS and versions

Plugins

Crashdump, backtrace or other files

dktapps commented 2 years ago

It won't work unless you do it before the player joins. You can't register recipes during gameplay.

Side note: You can get a block as an item by VanillaBlocks::CHEST()->asItem(); it's not necessary to use ItemFactory.

Crasher508 commented 2 years ago

https://pastebin.com/xhH1HnMN will called in onEnable(), it works fine before a small time