Selling banner
Selling icon

Selling

Create a Fabric mod for Minecraft 1.21.1. Add /sell command that opens a GUI where players can sell Coal, Copper Ingots, and Gold Ingots for Diamond Ore as...

00
fabricBoth1.21.1mod

Selling adds a simple /sell command that opens a 3x3 shop menu. Drop Coal, Copper Ingots, or Gold Ingots into the top grid, then click “Sell Items” to convert them into Diamond Ore (payouts per item: Coal = 1, Copper Ingot = 2, Gold Ingot = 4). The currency is credited to your inventory and any overflow is dropped nearby.

The GUI runs on the server: only the listed items are accepted, and nothing is sold unless you press the button. Closing the menu without selling drops any deposited items back at your feet, so nothing disappears if you cancel.

Known limitations and ideas: prices are fixed in code and not configurable, and the sale menu is purely functional (no sounds or particles). Let me know if you want configurable rates or extra feedback effects when selling.

Server Validation

Server validation passed - The mod was tested on a real Minecraft server and loaded successfully.