跳到正文

SF: Shops

作者:HLTaka

🛒 Block shops for Minecraft: sell items for money (CobbleDollars) or barter. Player shops and infinite-stock admin shops. Fabric and NeoForge.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

🛒 Shops you can place anywhere: sell for money or swap items.

SkyFramework Shops adds two kinds of shop blocks to Minecraft 1.21.1: player shops with real stock that anyone can craft, and admin shops with infinite stock for lobbies and spawns. Every offer is paid either with money (from an economy mod, if you have one) or by bartering items.

It works with and without Cobblemon: no economy mod is required, and with none installed the shops simply use barter.

ℹ️ This is a third-party mod made by SkyFramework. It is not an official Cobblemon or CobbleDollars project.

✨ Features

  • 🧑‍🌾 Player shops: craftable and placeable anywhere. The player who places one is the owner, and only the owner (or an admin) can open its management panel or break it.
  • ♾️ Admin shops: infinite stock, not craftable (given with a command or from the creative tab). Perfect for spawn and lobby shops.
  • 💰 Money or barter, per offer: pay with money (CobbleDollars and other supported economy mods) or with up to 3 different items per offer.
  • 📦 Real stock: the owner fills a 54-slot stock. When an offer runs out, customers still see it but the button is locked with "Sin stock" / "Out of stock", and the owner gets a chat warning if they are online.
  • 🔢 Buy several at once: pick how many purchases you want with −, + and Max, and see the total cost before paying.
  • ✅ Confirm before you pay: nothing is charged until you press Confirm purchase, so you never buy by accident.
  • 🗃️ Income box: what customers pay (money and bartered items) is saved in the shop even when the owner is offline. The owner collects the items and withdraws the money. The box holds 54 slots.
  • 🛡️ Nothing is lost when you break a shop: the shop item keeps its offers, stock and income inside (like a shulker box) and goes straight to your inventory. Placing it again restores everything.
  • 🌍 English and Spanish translations.

🎮 How to use

Owner (player shop)

  1. Craft a shop and place it.
  2. Right-click it to open the management panel.
  3. Create an offer with +. Put the item you want to sell in the top slot (it is a template, so it does not use up your item).
  4. Choose the price: money (type an amount and press Fix) or items (up to 3 template slots).
  5. Fill the stock: Shift + click items from your inventory to send them to the stock.
  6. Open the income box whenever you want to collect your earnings.

Customer

  1. Right-click a shop to see everything it sells.
  2. Press Buy on an offer, choose how many with − / + / Max, and check the total.
  3. Press Confirm purchase.

🛠️ Crafting recipe (player shop)

 E      E = emerald
PCP     P = any planks, C = wooden chest, G = glass block
PGP

The recipe can be changed with a datapack (data/sf_shops/recipe/player_shop.json).

💬 Commands (permission level 2)

Command What it does
/sf_shops give admin [players] [amount] Gives admin shops
/sf_shops give player [players] [amount] Gives player shops
/sf_shops reload Reloads the config and picks the economy mod again
/sf_shops economy Shows which economy mod is being used

Admin shops: right-click to browse, Shift + right-click with an empty hand to manage them (admins only).

⚙️ Configuration

Config file: config/sf_shops.json (same format on Fabric and NeoForge).

Option What it does
maxOffers Maximum offers per shop
moneyEnabled false disables paying with money completely
economy auto, cobbledollars, common_economy_api, numismatic or none
commonEconomyCurrency Currency id when using Common Economy API
barterMatchComponents Exact barter (item + components) or item type only
notifyOwnerOutOfStock Chat warning to the owner when an offer runs out
explosionProof Player shops resist explosions (admin shops always do)
purchaseCooldownTicks Minimum ticks between two purchases by the same player

💱 Supported economy mods

All of them are optional and detected automatically:

  • CobbleDollars (Fabric and NeoForge)
  • Common Economy API (Fabric): any money mod that implements it works
  • Numismatic Overhaul (NeoForge)

🔒 Safe purchases

  • Everything is calculated and checked on the server. The client only asks "buy offer N, quantity Q".
  • Every purchase is atomic: it either goes through completely or changes nothing.
  • If the buyer’s inventory is full, the purchase is blocked and nothing is dropped on the ground.
  • Rapid-click protection, and shops survive restarts and chunk unloads.
  • Hoppers cannot insert or extract items. Pistons never move shops, and the Wither and Ender Dragon cannot break them.

📦 Requirements

Minecraft 1.21.1 and Java 21. Install on both server and clients. Separate files for Fabric and NeoForge.

🧵 Fabric

  • Fabric Loader 0.19.3+
  • Fabric API

🔥 NeoForge

  • NeoForge 21.1+

No other mod is required. Cobblemon and economy mods are optional.

📝 Notes

  • Without an economy mod, the money option is hidden and only barter is available.
  • Both versions behave the same and share the same config format.

📄 License

GPL-3.0.

常见问题

SF: Shops 支持哪些 Minecraft 版本?

SF: Shops 支持 Minecraft Java 版 1.21.1,可用的加载器:Fabric / NeoForge。下载时注意选择和你游戏版本一致的文件。

SF: Shops 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

HLTaka 的其他作品

查看全部 →