Skip to content
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

Rewrite inventory transaction system to an instruction-based model (like ItemStackRequest) instead of slot-change model (legacy) #6505

Open
dktapps opened this issue Nov 15, 2024 · 0 comments
Labels
BC break Breaks API compatibility Category: API Related to the plugin API Type: Enhancement Contributes features or other improvements to PocketMine-MP

Comments

@dktapps
Copy link
Member

dktapps commented Nov 15, 2024

Description

ItemStackRequest was implemented as a shim on top of our existing InventoryTransaction API to get the benefits of the new protocol without BC breaks for plugins.

However, since the ItemStackRequest protocol includes a ton of information that the old system didn't, we can build a new API that exposes this information to plugins.

Since the old system focused on slot changes (old/new), it didn't provide any way to track movements of an item, which is something plugin devs want to know about frequently. The new system is instruction-based rather than just "change this slot to this thing".

Make no mistake: This is a big project that will likely take a lot of time and effort to complete. The concept is fundamentally different from the legacy system.

Justification

Improve plugins' ability to understand what players are doing to inventories

@dktapps dktapps added Category: API Related to the plugin API Type: Enhancement Contributes features or other improvements to PocketMine-MP labels Nov 15, 2024
@dktapps dktapps moved this to Todo in Inventories rework Nov 15, 2024
@dktapps dktapps added the BC break Breaks API compatibility label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC break Breaks API compatibility Category: API Related to the plugin API Type: Enhancement Contributes features or other improvements to PocketMine-MP
Projects
Development

No branches or pull requests

1 participant