APDevTeam / Movecraft

The original movement plugin for Paper. Reloaded. Again.
GNU General Public License v3.0
121 stars 76 forks source link

Crafting tables on moving crafts #562

Closed TrollyLoki closed 1 year ago

TrollyLoki commented 1 year ago

Is your feature request related to a problem? Please describe. Containers like chests and furnaces and be opened and interacted with as a craft is moving (which is very cool), but the same does not extend to GUIs that aren't containers. This is very frustrating because you can access items while another player is flying the ship, but you can't craft anything.

Describe the solution you'd like Extend whatever allows containers to stay open as crafts move to any GUI attached to a block.

TylerS1066 commented 1 year ago

This would be neat, but I've got no clue how to add it or why it doesn't currently work.

TrollyLoki commented 1 year ago

It seems inventories that aren't associated with tile entities use something called ContainerLevelAccess which stores the location of the block that opened the inventory, I tried having the plugin update that value as the craft moves and it seems to work. So far I've only tried it with crafting tables on 1.19, but I imagine something similar will work on other versions and with other similar blocks like anvils. (See my fork for experimental implementation details)