APDevTeam / Movecraft

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

Update menu access locations when crafts move #588

Closed TrollyLoki closed 1 year ago

TrollyLoki commented 1 year ago

Describe in detail what your pull request accomplishes

(Re-opened #563) At the same time as players are teleported by moving crafts, my code checks if their currently opened inventory is attached to a block on the craft. If it is, the ContainerLevelAccess of the menu is updated based on the motion of the craft. This means that when the server checks if the block is still there on the next tick, it will check the new location of the block and keep the inventory open for the player, which enables usage of crafting tables, anvils, looms, enchantment tables, ect. on moving crafts.

Related issues:

Checklist

TylerS1066 commented 1 year ago

Works on 1.16.5 as well.