Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register custom menu PM5 #239

Open
EmporiumPvP opened this issue Oct 26, 2023 · 1 comment
Open

Register custom menu PM5 #239

EmporiumPvP opened this issue Oct 26, 2023 · 1 comment

Comments

@EmporiumPvP
Copy link

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());
}

@SwiftyMCPE
Copy link

@Muqsit pls update the wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants