Перейти к содержимому
Mineforgian

Shop 'n Trade

Setup easy container shops people can trade with. Shop keeps can easily manage shops and collect profits.

Загрузки
853
Подписчики
3
Обновлён
2 сентября 2024 г.
Лицензия
CC-BY-NC-SA-4.0

Опубликован 24 августа 2023 г.

Shop 'n Trade

The Shop 'n Trade datapack enhances in-game trading by providing a streamlined system for shop creation and management. As a shopkeeper, you can efficiently set up and manage your shop with automated processes and user-friendly features.

Shop Creation and Setup

To create a shop, place a sign on a chest, barrel, or shulker box. The sign must include the shop owner’s name, the quantity of items available, and the pricing details. The system automatically detects and validates these details, determining the item to be sold based on the container’s contents. This setup eliminates the need for manual item configuration.

When you walk into the sign, the system automatically detects and sets up the shop based on these details and the container's contents.

Sign Format:

  • 1: In-game username (must be exact).
  • 2: Amount (number of items sold per batch).
  • 3: Item (automatically detected based on container).
  • 4: Price (in diamonds; starts with a number; additional letters optional; 0 means free).

Example:

image

Managing the Shop

  • First Click: Unlocks the shop, allowing inventory management or even destroying the shop with the red chat message that appears. The shop updates automatically with any changes in the container.
  • Second Click: Collects profits and waste items.
  • Third Click: Relocks the shop, or it auto-relocks when the shopkeeper leaves the area.

Shop Maintenance and Notifications

Regularly restock items while the shop is unlocked. The system automatically updates the shop’s inventory with new items. If the shop runs out of stock, the shopkeeper is notified when online and not AFK. The scoreboard snt_total_profits stores the total amount of diamonds someone has ever made from their shops. /trigger view_shop_profit_scores_toggle toggles being able to view those total profits on the sidebar.

Automated Systems

Shops and inventories are automatically created and updated based on container contents. The system includes robust validation for items and stock levels, filtering out invalid entries and performing NBT data checks to ensure smooth operation.

Buying

Players purchase items by right-clicking the shop sign. For items with NBT data, a confirmation message with detailed information is provided before completing the transaction, ensuring accurate and transparent purchases.

Security and Anti-Griefing

Players near a shop are placed in Adventure mode to prevent unintended interactions. If trapped, use the /trigger trapped_in_shop command to escape. Shops are locked by default; the shop owner can unlock the shop by clicking the sign to manage it.

In-game help

running /trigger shop_help in-game will show a guide in chat with a link to the full wiki page.

The admin command /function shop:uninstall will give a chat message that when pressed removes scoreboards and breaks all shop functionality, so you can remove the data pack without bloat to your world (consider making a backup and be careful who you hand admin permissions on your server).

notice

  • If you want to support small creators like me, you can turn off ad blocker.
  • Check out my profile for more creations: https://modrinth.com/user/TQNL
  • Follow the link to the full wiki and issues pages, please report issues with detail

Keep in mind:

  • Ensure you're familiar with installing data packs. Verify compatibility with your Minecraft version.

Terms of use:

Do:

  • Use and modify the data pack for private use.
  • Credit me (ThijquintNL) as the creator when using the data pack in public, such as in video showcases, or when editing and redistributing the original material.

Don't:

  • Redistribute the data pack for commercial purposes.

Under CC-BY-NC-SA 4.0 license

Ченджлог

2.3.0+1.21(.1)Релиз1.21, 1.21.1 · 2 сентября 2024 г.

Important security patch + instead of destroying shops by mining, click on the dark red chat message that appears when unlocking your shop.

2.2.0-beta+1.21(.1)Бета1.21, 1.21.1 · 31 августа 2024 г.
  • The admin command /function shop:uninstall will give a chat message that when pressed removes scoreboards and breaks all shop functionality, so you can remove the data pack without bloat to your world (consider making a backup and be careful who you hand admin permissions on your server).
  • unneeded piece of data is now wiped after collecting profits
  • new scoreboard: snt_total_profits
    • stores the total amount of diamonds someone has ever made from their shops
  • /trigger view_shop_profit_scores_toggle toggles being able to view those total profits on the sidebar
2.1.0-beta+1.21(.1)Бета1.21, 1.21.1 · 24 августа 2024 г.
  • line on the sign where the item is supposed to go can now be empty
  • shop owner mode gets removed when no shop is nearby (which helps when destroying your shop)
  • improvements to anti griefing system

see wiki for V2

2.0.0-beta+1.21(.1)Бета1.21, 1.21.1 · 23 августа 2024 г.

Shopkeeper Guide

The Shopkeeper role in the Shop 'n Trade datapack allows players to create, manage, and maintain in-game shops efficiently. This guide provides detailed information on how to perform key actions, including setting up and managing shops, collecting profits, and handling inventory.

Shop Creation and Setup

Shops are automatically created when a player interacts with a sign placed on a chest, barrel, or shulker box. The sign must include the shop owner's name, the quantity of items available, and the pricing details. The item to be sold is determined based on the contents of the shop container, eliminating the need for manual item setup and simplifying the shop creation process.

When you walk into the sign, the system automatically detects and sets up the shop based on these details and the container's contents.

Sign format

1 In-game username Must be spelled exactly correctly.
2 Amount Number of items sold per batch; must strictly be a number on this line.
3 Item The item sold is written on the sign automatically, make sure to have items in the shop first.
4 Price The format of the price can be pretty loose, line must start with a number and then any letters can come after that. 0 means it's free.

Example:

image

Managing the Shop

Once the shop is set up, the shopkeeper can manage it using a series of clicks on the shop sign. The first click on the shop sign unlocks the shop, allowing the shopkeeper to access and manage the inventory and settings. While the shop is unlocked, if any items in the container are changed, the shop automatically updates to reflect the new items. This feature ensures that the shop’s inventory remains accurate without requiring the shopkeeper to manually update the shop.

The second click on the shop sign allows the shopkeeper to collect profits and any waste items, which are items not intended for sale. This double-click mechanism simplifies the process of managing the shop’s earnings.

After collecting profits and managing the inventory, the shop can be relocked with a third click on the sign, which secures the shop from unauthorized access. The shop also automatically relocks when the shopkeeper leaves the area, further enhancing security.

Shop Maintenance and Notifications

Maintaining a shop involves regularly restocking items to ensure continuous operation. When the shop is unlocked, the shopkeeper can add new items to the container. If the stocked item in a shop's inventory is changed while the shop is unlocked, the system automatically updates the shop with the new item, ensuring the shop's inventory remains accurate.

If the shop runs out of stock, the buyer is notified. The system alerts the shopkeeper when they are online and not AFK. This notification feature is crucial for keeping the shop operational and ensuring that customers always have access to the items they wish to purchase.

Automated and Improved Systems

The datapack includes several automated systems designed to reduce manual intervention and improve shop management. Shops are created and updated automatically based on the items in the container, simplifying the process. The system also includes robust algorithms for validating items and stock levels, which automatically flag any invalid entries and put them in waste storage. A strict NBT data check is included in this validation. This ensures that shops operate smoothly and accurately.

Buying

Purchasing items is streamlined through a right-click purchase mechanism, where players can buy items by right-clicking the shop sign. If the item being sold contains additional NBT data, such as enchantments or nested items within a shulker box, the system provides a confirmation message with detailed information before completing the transaction, or cancelling it when the buyer moves away. This ensures that items with NBT data are accurately detected and processed, resulting in a reliable and transparent transaction experience. The NBT data should be intuitive to read, with a little critical thinking, but again, invalid entries are filtered out.

Security and Anti-Griefing Measures

To prevent griefing, players near a shop are automatically placed in Adventure mode, which prevents them from breaking or interacting with the shop in unintended ways. If a player becomes trapped due to this feature, they can escape using the /trigger trapped_in_shop command. Shops are locked by default to prevent unauthorized access. When a shop owner clicks on their shop sign, the shop unlocks, allowing them to manage the shop in the ways detailed earlier.

1.0.1-alpha+1.20.2-1.20.4Альфа1.20.2 · 11 сентября 2023 г.

Adapted to data pack version 18


Introducing "Shop 'n Trade" - Revolutionize your gameplay with the ultimate trading enhancement data pack. Immerse yourself in a dynamic trading experience that brings unprecedented convenience and security to your Minecraft world.

Players can create a shop by placing a sign on a (double) chest, barrel or shulker box and then doing /trigger make_shop_here to convert the structure into a shop. Players can right-click the sign to buy, and if the item sold has additional nbt data (like enchantments or items in a shulker box), a confirmation message will appear in chat with that information.

Sign Format:

  • Shopkeeper's Name
  • Quantity Available
  • Item ID (Accessible via f3+H, without minecraft:)
  • Price in Diamonds*

*a number, followed by a space, followed by any spelling or shortening of the word 'diamonds'.

See gallery images for examples.

If a shop is empty, the player and the shop keep will get alerted, even when the shop keep is currently offline. The coordinates and specifications of the empty shop are also gives.

Shopkeepers are equipped with the power to effortlessly collect profits at any moment through the "/trigger collect_shop_profits" command. Additionally, assistance is just a command away with "/trigger shop_help".

Shops are protected against griefing, by putting players into adventure mode when near them. To avoid getting trapped by this feature, you can do /trigger trapped_in_shop

1.0.0-alpha+1.20.2Альфа23w31a, 23w32a, 23w33a · 24 августа 2023 г.

Introducing "Shop 'n Trade" - Revolutionize your gameplay with the ultimate trading enhancement data pack. Immerse yourself in a dynamic trading experience that brings unprecedented convenience and security to your Minecraft world.

Players can create a shop by placing a sign on a (double) chest, barrel or shulker box and then doing /trigger make_shop_here to convert the structure into a shop. Players can right-click the sign to buy, and if the item sold has additional nbt data (like enchantments or items in a shulker box), a confirmation message will appear in chat with that information.

Sign Format:

  • Shopkeeper's Name
  • Quantity Available
  • Item ID (Accessible via f3+H, without minecraft:)
  • Price in Diamonds*

*a number, followed by a space, followed by any spelling or shortening of the word 'diamonds'.

See gallery images for examples.

If a shop is empty, the player and the shop keep will get alerted, even when the shop keep is currently offline. The coordinates and specifications of the empty shop are also gives.

Shopkeepers are equipped with the power to effortlessly collect profits at any moment through the "/trigger collect_shop_profits" command. Additionally, assistance is just a command away with "/trigger shop_help".

Shops are protected against griefing, by putting players into adventure mode when near them. To avoid getting trapped by this feature, you can do /trigger trapped_in_shop

Комментарии

Загружаем…