Currency Pouch Mod
一个功能全面的 Minecraft 经济系统,包含金币、商店和游戏内管理功能!
? 概览
Currency Pouch Mod 为 Minecraft 添加了一个完整的虚拟货币系统,允许玩家赚取、存储和花费金币。该模组具备美观的商店图形用户界面(GUI)、强大的管理员命令以及完整的配置支持——且无需任何外部依赖!
✨ 主要特性
? 虚拟货币系统
- 持久化金币存储:每位玩家拥有独立的金币余额,并在会话之间保持持久化
- 大数值支持:使用
long 数据类型,支持高达 9,223,372,036,854,775,807 枚金币的余额
- 自动同步:在以下情况下自动同步金币:
? 商店系统
- 精美 GUI:现代风格、无纹理界面,带有渐变背景和金色点缀
- 分类组织:物品按可自定义的分类整理(资源、装备、食物、魔法等)
- 视觉反馈:悬停效果、动画按钮以及清晰的价格显示
- 余额显示:在商店和库存界面中实时显示金币余额
- 智能验证:在购买前检查是否有足够的金币和背包空间
? 游戏内商店管理
通过强大的命令在游戏内管理商店,无需重启服务器:
- 添加物品:
/coins shop add <category> <itemId> <price> <name> <description>
- 移除物品:
/coins shop remove <category> <itemId>
- 列出物品:
/coins shop list [category]
- 重载配置:
/coins shop reload(更改生效而无需重启!)
- 调试工具:
/coins debug <modid>(查找来自任何模组的物品 ID)
⚙️ 配置系统
- 基于 JSON:易于编辑配置文件
- 热重载:更改即时生效,无需重启服务器
- 默认物品:预配置了商店物品
- 模组支持:可与任何模组的物品配合使用!
? 用户界面
- 库存显示:在玩家库存中显示金币余额,数字已格式化(如 1K, 1M 等)
- 商店分类:带有物品数量的可视化分类图标
- 物品卡片:美观的物品展示,包含图标、名称、价格和描述
- 响应式设计:悬停效果和点击反馈
?️ 合成配方
商店方块
[Gold] [Emerald] [Gold]
[Diamond] [Chest] [Diamond]
[Iron Block] [Iron Block] [Iron Block]
针对服务器管理员:
- 给自己发放金币:
/coins add @p 1000
- 在出生点放置一个商店方块
- 通过命令或配置文件自定义商店物品
- 更改后使用
/coins shop reload
? 配置
商店配置存储在 config/currency_pouch_mod-shop.json 中
示例配置:
{
"categories": [
{
"name": "Resources",
"icon": "⛏",
"items": [
{
"itemId": "minecraft:diamond",
"price": 100,
"name": "Diamond",
"description": "Precious gem"
}
]
}
]
}
添加其他模组的物品:
- 查找物品 ID:
/coins debug modname
- 添加到商店:
/coins shop add "Category" "modname:item" 100 "Name" "Description"
- 重载:
/coins shop reload
重要提示:对于包含冒号的物品 ID,请使用引号将其括起来!
? 应用场景
生存服务器
- 创建由玩家驱动的经济体系
- 奖励完成特定任务的玩家
- 设置包含基础物品的出生点商店
- 通过金币购买平衡游戏进程
小游戏服务器
- 为获胜者发放金币奖励
- 创建外观装饰商店
- 实施下注系统
- 追踪玩家财富
RPG 服务器
- 任务以金币形式奖励
- 提供区域特色物品的城镇商店
- 通过金币进行玩家交易
- 经济进度系统
创造服务器
? 技术细节
特性:
- 能力系统(Capabilities):高效的玩家数据存储
- 网络同步:客户端与服务器之间的金币同步
- NBT 持久化:数据在服务器重启后依然保留
- 命令系统:基于 Brigadier 的命令及权限管理
- 事件处理:死亡或切换维度时自动复制数据
性能:
- 极低的服务器开销
- 高效的 NBT 序列化
- 客户端渲染优化
- 无外部依赖
? 命令参考
玩家命令:
无——所有命令均需 OP 等级 2
管理员命令:
金币管理:
/coins add <player> <amount> - 向玩家添加金币
/coins set <player> <amount> - 设置玩家的余额
/coins get <player> - 查看玩家的余额
商店管理:
/coins shop add <category> <itemId> <price> <name> <description>
- 将物品添加到商店
/coins shop remove <category> <itemId>
- 从商店移除物品
/coins shop list [category]
- 列出所有分类或指定分类中的物品
/coins shop reload
- 无需重启即可重载配置
调试:
/coins debug <modid>
- 列出指定模组的所有物品
? 自定义
商店分类:
- 创建无限数量的分类
- 自定义图标(Unicode 符号)
- 逻辑化组织物品
- 可视化的分类选择
物品配置:
- 设置自定义价格
- 添加描述
- 使用任何模组的物品
- 从配置动态加载
视觉自定义:
- 颜色编码的用户界面元素
- 渐变背景
- 用于提升高级感的金色点缀
- 响应式悬停效果
? 权限
所有命令默认需要 OP 等级 2。
授予权限的方法:
/op <player>
? 故障排除
商店为空:
- 检查
config/currency_pouch_mod-shop.json 是否存在
- 验证物品 ID 是否正确
- 使用
/coins debug <modid> 查找正确的 ID
- 运行
/coins shop reload
未找到物品:
- 确保相关模组已加载
- 检查物品 ID 格式:
modname:itemname
- 模组 ID 请使用小写
- 对于包含冒号的 ID,请使用引号将其括起来
金币未保存:
- 确认服务器对世界文件夹具有写入权限
- 检查日志中的错误信息
- 确保 Forge 版本兼容
更改未生效:
- 配置更改后运行
/coins shop reload
- 玩家必须重新打开商店才能看到更新
- 检查日志中的配置错误
? 示例
设置初始商店:
/coins shop add "Starter" "minecraft:wooden_sword" 10 "Wooden Sword" "Basic weapon"
/coins shop add "Starter" "minecraft:bread" 5 "Bread" "Restores hunger"
/coins shop add "Starter" "minecraft:torch" 1 "Torch" "Provides light"
/coins shop reload
添加模组物品(以 Mekanism 为例):
/coins debug mekanism
/coins shop add "Tech" "mekanism:ingot_osmium" 50 "Osmium Ingot" "Advanced material"
/coins shop add "Tech" "mekanism:energy_tablet" 100 "Energy Tablet" "Stores power"
/coins shop reload
发放奖励:
/coins add @a[tag=winner] 1000
/coins add @p 500
? 兼容性
支持:
- ✅ 所有 Forge 模组(物品可添加到商店)
- ✅ 多人服务器
- ✅ 单人世界
- ✅ 整合包
已测试:
- Mekanism
- Applied Energistics 2
- Tinkers' Construct
- Thermal Expansion
- 以及更多!
? 许可证
本模组按原样提供,适用于 Minecraft 1.19.2 与 Forge。
Currency Pouch Mod
A comprehensive economy system for Minecraft with coins, shops, and in-game management!
? Overview
Currency Pouch Mod adds a complete virtual currency system to Minecraft, allowing players to earn, store, and spend coins. The mod features a beautiful shop GUI, powerful admin commands, and full configuration support - all without requiring any external dependencies!
✨ Key Features
? Virtual Currency System
- Persistent Coin Storage: Each player has their own coin balance that persists across sessions
- Large Number Support: Uses
long data type to support balances up to 9,223,372,036,854,775,807 coins
- Automatic Synchronization: Coins sync automatically when:
- Joining the server
- Respawning after death
- Changing dimensions
- Making purchases
? Shop System
- Beautiful GUI: Modern, texture-free interface with gradient backgrounds and golden accents
- Category Organization: Items organized into customizable categories (Resources, Equipment, Food, Magic, etc.)
- Visual Feedback: Hover effects, animated buttons, and clear pricing display
- Balance Display: Real-time coin balance shown in both shop and inventory screens
- Smart Validation: Checks for sufficient coins and inventory space before purchase
? In-Game Shop Management
Powerful commands to manage your shop without restarting the server:
- Add Items:
/coins shop add <category> <itemId> <price> <name> <description>
- Remove Items:
/coins shop remove <category> <itemId>
- List Items:
/coins shop list [category]
- Reload Config:
/coins shop reload (applies changes without restart!)
- Debug Tool:
/coins debug <modid> (find item IDs from any mod)
⚙️ Configuration System
- JSON-based: Easy to edit configuration file
- Hot-reload: Changes apply without server restart
- Default Items: Comes with pre-configured shop items
- Mod Support: Works with items from any mod!
? User Interface
- Inventory Display: Coin balance shown in player inventory with formatted numbers (1K, 1M, etc.)
- Shop Categories: Visual category icons with item counts
- Item Cards: Beautiful item display with icons, names, prices, and descriptions
- Responsive Design: Hover effects and click feedback
?️ Crafting Recipe
Shop Block
[Gold] [Emerald] [Gold]
[Diamond] [Chest] [Diamond]
[Iron Block] [Iron Block] [Iron Block]
For Server Admins:
- Give yourself coins:
/coins add @p 1000
- Place a Shop Block in spawn
- Customize shop items via commands or config file
- Use
/coins shop reload after making changes
? Configuration
The shop configuration is stored in config/currency_pouch_mod-shop.json
Example Configuration:
{
"categories": [
{
"name": "Resources",
"icon": "⛏",
"items": [
{
"itemId": "minecraft:diamond",
"price": 100,
"name": "Diamond",
"description": "Precious gem"
}
]
}
]
}
Adding Items from Other Mods:
- Find the item ID:
/coins debug modname
- Add to shop:
/coins shop add "Category" "modname:item" 100 "Name" "Description"
- Reload:
/coins shop reload
Important: Use quotes around item IDs with colons!
? Use Cases
Survival Servers
- Create player-driven economies
- Reward players for completing tasks
- Set up spawn shops with essential items
- Balance progression with coin-based purchases
Mini-game Servers
- Award coins for winning games
- Create cosmetic shops
- Implement betting systems
- Track player wealth
RPG Servers
- Quest rewards in coins
- Town shops with regional items
- Player trading via coins
- Economic progression system
Creative Servers
- Reward building competitions
- Plot purchase systems
- Resource distribution control
? Technical Details
Features:
- Capabilities System: Efficient player data storage
- Network Synchronization: Client-server coin sync
- NBT Persistence: Data survives server restarts
- Command System: Brigadier-based commands with permissions
- Event Handling: Automatic data copying on death/dimension change
Performance:
- Minimal server overhead
- Efficient NBT serialization
- Client-side rendering optimizations
- No external dependencies
? Command Reference
Player Commands:
None - all commands require OP level 2
Admin Commands:
Coin Management:
/coins add <player> <amount> - Add coins to player
/coins set <player> <amount> - Set player's balance
/coins get <player> - Check player's balance
Shop Management:
/coins shop add <category> <itemId> <price> <name> <description>
- Add item to shop
/coins shop remove <category> <itemId>
- Remove item from shop
/coins shop list [category]
- List all categories or items in category
/coins shop reload
- Reload configuration without restart
Debug:
/coins debug <modid>
- List all items from specified mod
? Customization
Shop Categories:
- Create unlimited categories
- Custom icons (Unicode symbols)
- Organize items logically
- Visual category selection
Item Configuration:
- Set custom prices
- Add descriptions
- Use items from any mod
- Dynamic loading from config
Visual Customization:
- Color-coded UI elements
- Gradient backgrounds
- Golden accents for premium feel
- Responsive hover effects
? Permissions
All commands require OP level 2 by default.
To grant permissions:
/op <player>
? Troubleshooting
Shop is empty:
- Check
config/currency_pouch_mod-shop.json exists
- Verify item IDs are correct
- Use
/coins debug <modid> to find correct IDs
- Run
/coins shop reload
Items not found:
- Ensure the mod is loaded
- Check item ID format:
modname:itemname
- Use lowercase for mod IDs
- Use quotes around IDs with colons
Coins not saving:
- Verify server has write permissions to world folder
- Check logs for errors
- Ensure Forge version is compatible
Changes not applying:
- Run
/coins shop reload after config changes
- Players must reopen shop to see updates
- Check logs for configuration errors
? Examples
Setting up a starter shop:
/coins shop add "Starter" "minecraft:wooden_sword" 10 "Wooden Sword" "Basic weapon"
/coins shop add "Starter" "minecraft:bread" 5 "Bread" "Restores hunger"
/coins shop add "Starter" "minecraft:torch" 1 "Torch" "Provides light"
/coins shop reload
Adding mod items (Mekanism example):
/coins debug mekanism
/coins shop add "Tech" "mekanism:ingot_osmium" 50 "Osmium Ingot" "Advanced material"
/coins shop add "Tech" "mekanism:energy_tablet" 100 "Energy Tablet" "Stores power"
/coins shop reload
Giving rewards:
/coins add @a[tag=winner] 1000
/coins add @p 500
? Compatibility
Works with:
- ✅ All Forge mods (items can be added to shop)
- ✅ Multiplayer servers
- ✅ Single-player worlds
- ✅ Modpacks
Tested with:
- Mekanism
- Applied Energistics 2
- Tinkers' Construct
- Thermal Expansion
- And many more!
? License
This mod is provided as-is for Minecraft 1.19.2 with Forge.
评论 0
登录后参与评分
还没有评论,来抢沙发吧