跳到正文

Food Timer

作者:Mahghuuuls

Adds configurable consumption cooldowns to foods, preventing food spamming.

收藏

截图

介绍

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

AI usage disclaimer: This mod was developed with AI-agent assistance using this agent workflow. The project owner reviewed the work during development.

Adds server-enforced consumption cooldowns, with duration tooltips and cooldown overlays in the hotbar and inventory.

By default, only standard Golden Apples and Enchanted Golden Apples receive cooldowns of 1 minute and 5 minutes. Server owners can instead apply one fixed cooldown to every standard food, or scale each food’s cooldown by the amount of hunger it restores. Per-item rules become overrides in either all-food mode, and a zero-second rule can exclude an item.

Required on both client and server.

View the source on GitHub.

Configuration

The configuration file is config/foodtimer.cfg. Changes require a restart.

Choose one cooldownPolicy:

  • CONFIGURED_ONLY: Only matching foodCooldowns entries receive cooldowns. This is the default and preserves the original behavior.
  • FIXED_ALL_FOODS: Every standard food uses fixedFoodCooldownSeconds, unless a foodCooldowns rule overrides it.
  • SCALED_ALL_FOODS: Every standard food uses restored hunger points multiplied by secondsPerHungerPoint, unless a foodCooldowns rule overrides it.

Rules use modid:item[:metadata]=seconds. Exact metadata rules win over wildcard rules. Omit metadata or use * to match every variant. Use 0 seconds to exclude a matching item from cooldowns.

general {
    S:cooldownPolicy=CONFIGURED_ONLY
    I:fixedFoodCooldownSeconds=30
    I:secondsPerHungerPoint=5

    S:foodCooldowns <
        minecraft:golden_apple:0=60
        minecraft:golden_apple:1=300
     >

    B:enableTooltips=true
    S:tooltipPrefix=Cooldown: 
    B:enableDebugLogging=false
}

Examples:

# Override every metadata variant of bread with 20 seconds.
minecraft:bread=20

# Give normal Golden Apples 60 seconds but exclude Enchanted Golden Apples.
minecraft:golden_apple:0=60
minecraft:golden_apple:1=0

The server controls gameplay cooldowns and sends its active policy to connected clients. Each client still controls whether tooltips are visible and what tooltip prefix is displayed.

常见问题

Food Timer 支持哪些 Minecraft 版本?

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

Food Timer 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

Mahghuuuls 的其他作品

查看全部 →