跳到正文

economymod

作者:Gaozx12

A NeoForge Minecraft mod with a simple emerald-based economy system, featuring in-game commands for deposits, withdrawals, balances, and transfers, plus persistent storage.

收藏

介绍

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

EconomyMod

Overview

EconomyMod is a NeoForge-based Minecraft mod designed to introduce a lightweight in-game economy system, using emeralds as the primary currency. It enables players to manage virtual balances through intuitive commands, with persistent data storage to maintain progress across server restarts or player sessions. The mod is compatible with Minecraft 1.21.1 and integrates seamlessly with NeoForge’s modding ecosystem.

Core Features

1. Currency & Balance Management

  • Emeralds as Currency: Uses Minecraft’s vanilla emeralds (Items.EMERALD) as the base currency, bridging in-game items with virtual balances.
  • Virtual Balance: Players can store emeralds in a persistent virtual balance, separate from their inventory, to avoid inventory clutter.

2. In-Game Commands

All interactions with the economy system are handled via chat commands:

| Command | Syntax | Description |
|———|——–|————-|
| Deposit | /deposit <amount> | Converts <amount> emeralds from the player’s inventory to virtual balance. Fails if the player has insufficient emeralds. |
| Withdraw | /withdraw <amount> | Converts <amount> emeralds from virtual balance to the player’s inventory. Fails if balance is insufficient or inventory is full. |
| Check Balance | /balance | Shows the player’s current virtual balance. |
| Check Others’ Balance | /balance <player> | (Admin-only, requires permission level 2) Shows the virtual balance of a specified player. |
| Transfer | /pay <target> <amount> | Transfers <amount> emeralds from the sender’s virtual balance to the target player’s balance. Fails if the sender’s balance is insufficient. |
|Settings|/setbalance <player> <amount> |command to set a player’s emerald amount (admin)|

3. Persistent Data Storage

  • Player balances are saved locally in the economy_data/ directory (created automatically) as .dat files, using Minecraft’s NBT (Named Binary Tag) format for reliable serialization.
  • Data is loaded when a player logs in and saved when they log out, ensuring balances persist across server restarts or player sessions.

常见问题

economymod 支持哪些 Minecraft 版本?

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

economymod 怎么安装?

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

评论

登录后评论和评分

Gaozx12 的其他作品

查看全部 →