Hi! I'm currently developping a plugin adding new block, and having no knowledge on this I started looking on the github. I saw I first needed an item for this block so I'm currently doing a Test item. For this test Item I made a Test class : PHP: <?phpdeclare(strict_types=1);namespace Baleine\CoffresPlusPlus\Items;use pocketmine\item\item;class Test extends Item{ public function __construct(int $meta = 0){ parent::__construct(900, $meta, "Test"); }}?> And in my Main class I register this Item : PHP: <?phpnamespace Baleine\CoffresPlusPlus;use Baleine\CoffresPlusPlus\Items\Test;use pocketmine\plugin\PluginBase;use pocketmine\inventory\transaction\action\SlotChangeAction;use pocketmine\Player;use pocketmine\item\item;use pocketmine\event\Listener;use pocketmine\event\player\PlayerInteractEvent;use pocketmine\Item\ItemFactory;class Main extends PluginBase implements Listener{ public function onEnable() { $this->getLogger()->notice("Made with love by Baleine !"); $this->getServer()->getPluginManager()->registerEvents($this, $this); ItemFactory::registerItem(new Test()); Item::addCreativeItem(Item::get(900)); }}?> I also made a Texture pack with Item.png as a texture. Then pocketmine launches fine but my game crashes every time I try to connect. Did I missed something ?
I believe you need to use a behaviour pack and the resource pack to register the custom item with the client For examples you can search google for "How to create custom blocks on bedrock"