? Economy Craft
一个为你的 Minecraft 世界添加完整货币系统的数据包!
通过 Economy Craft,你可以使用实体货币或银行账户在玩家之间转移金钱。
截图
使用方法
? 发送金钱
要发送金钱,只需输入:
/trigger ec.pay
然后按照提示操作。
? 取款和存款
要从游戏内的银行账户取款,请使用此命令:
/trigger ec.withdraw set $amount$
$amount$ 可以是任意数字 — 数据包会给你相应的现金。
例如,如果你输入 /trigger ec.withdraw set 19302,你将获得 3×5000、4×2000、3×100 和 2×1 的钞票组合。
你也可以反过来操作,将现金存入你的银行账户。只需输入:
/trigger ec.deposit
管理员指南
如果你是管理员并希望安装此数据包,只需将 zip 压缩包放入你世界的 datapacks 文件夹中即可。
你可以直接使用记分板修改玩家余额:
/scoreboard players set $player$ ec.money $amount$ # 设置玩家余额
/scoreboard players add @a ec.money $amount$ # 为所有玩家增加一定金额的金钱
/scoreboard objectives setdisplay sidebar ec.money # 显示余额(对所有玩家可见)
如果你想卸载该数据包,请运行以下命令:
/function sc_economycraft:uninstall
然后删除数据包的 zip 文件。
⚙ 自定义配置
该数据包完全支持自定义。你可以更改现有面额纸币的纹理 — 甚至可以直接添加或删除面额。
? 更改货币名称
你可能还想重命名你的货币 — 这很容易实现。
在你的资源包中找到以下文件:
/assets/sc_economycraft/lang/en_us.json // 以及你需要的所有语言文件
"scec.money":"金币",
"scec.moneyformat":"%s 枚金币",
"item.scec.cash_1":"1 枚金币",
"item.scec.cash_10":"10 枚金币",
"item.scec.cash_50":"50 枚金币",
"item.scec.cash_100":"100 枚金币",
"item.scec.cash_200":"200 枚金币",
"item.scec.cash_500":"500 枚金币",
"item.scec.cash_1000":"1000 枚金币",
"item.scec.cash_5000":"5000 枚金币",
? 更改面额的纹理
只需在资源包中替换纹理文件即可。
它们位于:
/assets/sc_economycraft/textures/item/
? 移除和添加面额
移除或添加入面额需要更多的设置。
打开以下文件:
/data/sc_economycraft/functions/settings.mcfunction
找到以下行:
# 默认纸币面额
# 所有值必须唯一且按升序排列
data modify storage sc_economycraft:banknotes values set value [{v:1}, {v:10}, {v:50}, {v:100}, {v:200}, {v:500}, {v:1000}, {v:5000}]
data modify storage sc_economycraft:banknotes length_minus_one set value 7
# 默认超时持续时间(以刻为单位)
scoreboard players set timeout_duration ec.SETTINGS 600
要添加或移除面额:
-
修改 values set value [...] 内部的列表。
- 每个条目的格式为
{v:<面额>}。
- 示例:若要移除 5000 并添加 2000,请将其更改为
data modify storage sc_economycraft:banknotes values set value [{v:1}, {v:10}, {v:50}, {v:100}, {v:200}, {v:500}, {v:1000}, {v:2000}]
-
更新 length_minus_one 以匹配面额数量减一。
提示
如果您添加了默认配置中不存在的新的面额,您还需要在您的资源包中创建相应的文件:
/assets/items/cash_$your_value$.json:
{
"model": {
"type":"minecraft:model",
"model": "sc_economycraft:item/cash_$your_value$"
}
}
/assets/models/cash_$your_value$.json
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "sc_economycraft:item/cash_$your_value$"
}
}
```
- `/assets/textures/cash_$your_value$.png`
(这是你的新纸币的实际纹理图片。)
- 同时,你还需要为你的新面额制作本地化文本(参见[这里](#-change-curency-name))
## 此数据包遵循惯例
您可以在[这里](https://mc-datapacks.github.io/en/index.html)阅读它们
? Economy Craft
A Datapack that adds a complete money system to your Minecraft world!
With Economy Craft, you can transfer money between players using physical currency or your bank account.
Screenshots
Using
? Sending Money
To send money, just type:
/trigger ec.pay
and follow the instructions.
? Withdraw and Deposit
To withdraw money from your in-game bank account, use this command:
/trigger ec.withdraw set $amount$
$amount$ can be any number — the datapack will give you your money.
For example, if you type /trigger ec.withdraw set 19302, you’ll get 3×5000, 4×2000, 3×100, and 2×1.
You can also do the opposite and deposit your cash into your bank account. Just type:
/trigger ec.deposit
For Admins
If you're an admin and want to install this datapack, simply place the zip archive into your world’s datapacks folder.
You can modify player balances directly using the scoreboard:
/scoreboard players set $player$ ec.money $amount$ # Sets a player's balance
/scoreboard players add @a ec.money $amount$ # Adds an amount of money to all players
/scoreboard objectives setdisplay sidebar ec.money # Displays balances (visible to all players)
If you want to uninstall the datapack, run this command:
/function sc_economycraft:uninstall
Then delete the datapack archive file.
⚙ Customization
The datapack is fully customizable. You can change textures for existing banknote denominations — or even add or remove denominations entirely.
? Changing the Currency Name
You may also want to rename your currency — and you can easily do that.
Locate the file in your resource pack:
/assets/sc_economycraft/lang/en_us.json // And all languages you need
"scec.money":"Money",
"scec.moneyformat":"%s Coins",
"item.scec.cash_1":"1 Coin",
"item.scec.cash_10":"10 Coins",
"item.scec.cash_50":"50 Coins",
"item.scec.cash_100":"100 Coins",
"item.scec.cash_200":"200 Coins",
"item.scec.cash_500":"500 Coins",
"item.scec.cash_1000":"1000 Coins",
"item.scec.cash_5000":"5000 Coins",
? Change Texture for present denominations
Simply replace the texture files in your resource pack.
They are located in:
/assets/sc_economycraft/textures/item/
? Remove and add denominations
Removing or adding denominations requires a bit more setup.
Open the file:
/data/sc_economycraft/functions/settings.mcfunction
Find the following lines:
# Default banknote denominations
# All value must be unique and in ascending order
data modify storage sc_economycraft:banknotes values set value [{v:1}, {v:10}, {v:50}, {v:100}, {v:200}, {v:500}, {v:1000}, {v:5000}]
data modify storage sc_economycraft:banknotes length_minus_one set value 7
# Default timeout duration (in ticks)
scoreboard players set timeout_duration ec.SETTINGS 600
To add or remove denominations:
- Modify the list inside
values set value [...].
- Each entry has the format
{v:<denomination>}.
- Example: to remove 5000 and add 2000, change it to
data modify storage sc_economycraft:banknotes values set value [{v:1}, {v:10}, {v:50}, {v:100}, {v:200}, {v:500}, {v:1000}, {v:2000}]
- Update
length_minus_one to match the number of denominations minus one.
Tipp
If you add new denominations that don’t exist in the default setup,
you’ll also need to create corresponding files in your resource pack:
/assets/items/cash_$your_value$.json:
{
"model": {
"type":"minecraft:model",
"model": "sc_economycraft:item/cash_$your_value$"
}
}
/assets/models/cash_$your_value$.json
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "sc_economycraft:item/cash_$your_value$"
}
}
/assets/textures/cash_$your_value$.png
(This is the actual texture image for your new banknote.)
- And also you need to make localization for your new denominations (see here)
This Datapack Follows Conventions
You can read them here
评论 0
登录后参与评分
还没有评论,来抢沙发吧