-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add support for entity inventories #144
Comments
Since v4.5.0, it is possible to register entity inventories by using the // make InvMenu::create(InvMenu::TYPE_CHEST) create a minecart with chest inventory:
InvMenuHandler::getTypeRegistry()->register(InvMenu::TYPE_CHEST, InvMenuTypeBuilders::ACTOR_FIXED()
->setActorIdentifier(EntityIds::CHEST_MINECART)
->setNetworkWindowType(WindowTypes::CONTAINER)
->setSize(27)
->build()); Actor/entity-backed inventories offer several advantages over block-backed inventories:
However, replacing block-backed inventories with entity-backed inventories increases the maintenance cost of this library. From BedrockProtocol's commit history, AddActorPacket underwent changes during 1.19.10, 1.19.20, and 1.19.40 (most recent change was 4 months ago). In contrast, BlockActorDataPacket's property list has remained unchanged for more than a year (in fact, the last change was a property being renamed). |
@dries-c This might be interesting for @NetherGamesMC As for the maintenance cost, i am surprised they still change stuff around. Depending on the scale of changes and my spare time i might be able to coauthor some updates in the future. |
As talked about on Discord
The following "prevents" it since https://github.com/Muqsit/InvMenu/blob/4.0/src/muqsit/invmenu/inventory/InvMenuInventory.php implements a block inventory:
https://github.com/Muqsit/InvMenu/blob/4.0/src/muqsit/invmenu/InvMenu.php#L150
The text was updated successfully, but these errors were encountered: