You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The creative inventory currently lacks essential features related to item creation and destruction. Unlike other inventories, there is no existing handler interface or methods specifically designed to manage these actions within the creative inventory.
// Handler is a type that may be used to handle actions performed on an inventory by a player.typeHandlerinterface {
// HandleTake handles an item.Stack being taken from a slot in the inventory. This item might be the whole stack or// part of the stack currently present in that slot.HandleTake(ctx*event.Context, slotint, it item.Stack)
// HandlePlace handles an item.Stack being placed in a slot of the inventory. It might either be added to an empty// slot or a slot that contains an item of the same type.HandlePlace(ctx*event.Context, slotint, it item.Stack)
// HandleDrop handles the dropping of an item.Stack in a slot out of the inventory.HandleDrop(ctx*event.Context, slotint, it item.Stack)
}
This existing interface can be extended to include methods specifically tailored for creative mode, addressing the unique actions associated with item creation and destruction. Alternatively, a new interface dedicated to the creative inventory can be created to ensure it accommodates the distinct functionalities required in creative mode.
Expected Outcome
Implementing a mechanism to handle actions within the creative inventory will significantly enhance the overall functionality of the server software. This enhancement will provide a more comprehensive set of features for efficiently managing items in creative mode, thereby improving the developer experience and expanding the capabilities of the server.
The text was updated successfully, but these errors were encountered:
Description
The creative inventory currently lacks essential features related to item creation and destruction. Unlike other inventories, there is no existing handler interface or methods specifically designed to manage these actions within the creative inventory.
Proposed Solution
To address this deficiency, I recommend to extend the current handler interface to incorporate functions related to item creation and destruction. The existing handler interface for actions performed by a player on an inventory is defined as follows:
https://github.com/df-mc/dragonfly/blob/master/server/item/inventory/handler.go#L8-L18
This existing interface can be extended to include methods specifically tailored for creative mode, addressing the unique actions associated with item creation and destruction. Alternatively, a new interface dedicated to the creative inventory can be created to ensure it accommodates the distinct functionalities required in creative mode.
Expected Outcome
Implementing a mechanism to handle actions within the creative inventory will significantly enhance the overall functionality of the server software. This enhancement will provide a more comprehensive set of features for efficiently managing items in creative mode, thereby improving the developer experience and expanding the capabilities of the server.
The text was updated successfully, but these errors were encountered: