Muqsit / InvMenu

A PocketMine-MP virion to create and manage virtual inventories!
https://poggit.pmmp.io/ci/Muqsit/InvMenu/~
GNU General Public License v3.0
203 stars 76 forks source link

Question/Feature Custom inventory sizes #201

Open EmporiumPvP opened 1 year ago

EmporiumPvP commented 1 year ago

is it possible to create GUI's with a custom amount of slots e.g. A single chest with 18 slots instead of 27, if not would it be possible for you to implement this if you choose to

Muqsit commented 1 year ago

It isn't possible to create dynamically-sized inventories through InvMenu directly. You may be able to play with texture packs and register a custom InvMenuType that can handle dynamic inventory sizes. tedo0627's InventoryUI library has done it using texture packs.

I am fairly new to texture packs and therefore wouldn't be able to maintain it if this feature were to be directly ported from tedo0627/InventoryUI, nor am I aware of any repo maintainers who understand this.

Muqsit commented 1 year ago

I've written an example plugin as proof of implementation: https://github.com/Muqsit/CustomSizedInvMenu.

It lets building custom-sized InvMenu instances using the entity definition in InventoryUI resource pack.

However, I am skeptical about the sustainability of integrating this into InvMenu (e.g., is Mojang likely to introduce changes that affect behaviour the resource pack offers?). Perhaps someone more knowledgeable can share insights.