
Staminafy
Staminafy 是一个简单的模组,为 Minecraft 添加了耐力系统。
你可以使用四条游戏内规则(gamerules)来控制耐力的行为:
- 启用 Staminafy (
staminafy) [true/false] - 设为 true 时激活耐力系统。
- 最大耐力 (
maxStamina) [任意小于 1,000,000 的数字,负数将移除耐力] - 控制玩家/实体被动获得的最大耐力值。
- 耐力恢复速度 (
staminaRegen) [任意数字] - 控制玩家/实体每刻(tick)恢复的耐力量(1 秒等于 20 刻)。
- 移除饥饿 (
removeFood) [true/false] - 设为 true 时将移除 Minecraft 原有的饥饿系统,改为食物直接用于治疗(即旧版 Minecraft 的食物系统)。
系统运作方式如下:如果玩家正在奔跑,每刻会消耗 1 点耐力。因此,当最大耐力设置为 20 时,玩家可以持续奔跑一秒钟。在停止奔跑时,耐力会逐渐恢复;但在刚停止奔跑后的接下来 15 刻内,不会恢复耐力。如果耐力降至 0,玩家将强制停止奔跑,且在接下来的 60 刻内无法恢复耐力。
要更改耐力条的位置,可以使用以下命令:
/staminafyswap [true/false],其中 true 表示屏幕中央,false 表示物品栏右侧。
默认游戏规则值:
启用 Staminafy - `true`
最大耐力 - `300`
耐力恢复速度 - `4`
移除饥饿 - `false`
面向开发者/美术人员的 Staminafy
耐力作为一个属性存在,ID 为 attribute.staminafy.stamina。
若要更改耐力条的默认纹理,你可以创建一个资源包,并生成一张尺寸为 90x16* 的纹理图片:
assets/staminafy/textures/screens/staminacenter.png
* - 你可以更改尺寸,但不推荐这样做,因为在 GUI 缩放比例过低时可能会显得不协调。
此部分功能将在未来进一步完善。

Staminafy
Staminafy is a simple mod that adds a stamina system to minecraft.
You can use four gamerules to control how stamina acts:
- Use Staminafy (
staminafy) [true/false] - when set to true stamina system is active.
- Max Stamina (
maxStamina) [any number below 1,000,000, negative will remove stamina] - controls the max stamina a player/entity can passively get.
- Stamina Regeneration (
staminaRegen) [any number] - controls how much stamina player/entity regains per tick (1 second has 20 ticks)
- Remove Food (
removeFood) [true/false] - when set to true removes the Minecraft hunger system making food heal instead (aka the old Minecraft food system)
How the system works is if player is running it will drain 1 stamina per tick, so when Max Stamina is set to 20 - player will be able to run for one second. While not running stamina will be regenerated, but while stopping running you won't regain stamina for the next 15 ticks. If you reach 0 stamina, you are forced to stop running and won't regain stamina for the next 60 ticks.
To change Stamina Bar position you can use:
/staminafyswap [true/false] where true is center of the screen and false is right side of the inventory.
Default Gamerule Values:
Use Staminafy - `true`
Max Stamina - `300`
Stamina Regeneration - `4`
Remove Food - `false`
Staminafy for Devs/Artists
Stamina is an Attribute attribute.staminafy.stamina.
To change default texture of the Stamina Bar you can make a resource pack and create a 90x16* texture:
assets/staminafy/textures/screens/staminacenter.png
* - you can change the size but it is not recommended since it might look weird if GUI Scale is too low.
This will be extended in the future.
评论 0
登录后参与评分
还没有评论,来抢沙发吧