InvMenu icon indicating copy to clipboard operation
InvMenu copied to clipboard

Register custom menu PM5

Open EmporiumDevelopment opened this issue 2 years ago • 1 comments

I was wondering how we would be able to register custom menus now since they removed BlockFactory and BlockLegacyIds

it still has the old way on the wiki.

public const TYPE_DISPENSER = "myplugin:dispenser";

protected function onEnable() : void{ InvMenuHandler::getTypeRegistry()->register(self::TYPE_DISPENSER, InvMenuTypeBuilders::BLOCK_ACTOR_FIXED() ->setBlock(BlockFactory::getInstance()->get(BlockLegacyIds::DISPENSER, 0)) ->setBlockActorId("Dispenser") ->setSize(9) ->setNetworkWindowType(WindowTypes::DISPENSER) ->build()); }

EmporiumDevelopment avatar Oct 26 '23 20:10 EmporiumDevelopment

@Muqsit pls update the wiki

SwiftyMCPE avatar Nov 16 '23 03:11 SwiftyMCPE