Open EmporiumPvP opened 1 year ago
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()); }
@Muqsit pls update the wiki
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()); }