A Watched Pot 图标

A Watched Pot

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/watched-pot
资源信息

Minecraft 版本: 1.21.4

平台: forge

标签: cursed optimization

资源介绍

A Watched Pot Logo

A watched pot never boils. A watched furnace never... ticks?

A Watched Pot is a fully configurable mod for both Neoforge/Forge and Fabric/Quilt that either stops blocks from ticking when they're looked at or restricts them to only tick when they are looked at, based on a block tag.

Requires Fabric API on Fabric/Quilt.

Usage

On Forge, A Watched Pot can be configured through Forge's normal server configuration systems. There are currently two configuration options:

  • The mod can use either a whitelist or a blacklist, which can be toggled via the use_whitelist option. If the option is enabled, only blocks in the watchedpot:whitelist block tag will be affected. If it's disabled (which it is by default), all blocks will be affected except those in the watchedpot:blacklist tag.
  • The mod's behavior can be inverted via the invert_behavior option. If enabled, only blocks that are looked at will tick (of those affected); if disabled, all blocks will tick unless they are looked at.

By default, both options are set to false - that is, no block will tick while a player is looking at it.

To recap:

  • use_whitelist=true, invert_behavior=false - blocks in the whitelist tag will not tick if they are looked at; all other blocks remain unchanged.

  • use_whitelist=false, invert_behavior=false - all blocks will not tick if they are looked at, unless they are in the blacklist tag (in which case they remain unchanged).

  • use_whitelist=true, invert_behavior=true - blocks in the whitelist tag will only tick if they are looked at; all other blocks remain unchanged.

  • use_whitelist=false, invert_behavior=true - all blocks will only tick if they are looked at, unless they are in the blacklist tag (in which case, again, they remain unchanged).
    On Fabric, the same options can be set via gamerules (watchedpot_useWhitelist and watchedpot_invertBehavior) to avoid an extra config dependency. This is unfortunately not quite as robust but it keeps the mod lightweight on both platforms. If you need to set default values (such as for a modpack) you can emulate that behavior with a KubeJS server_script, like so:

    // For 1.18.2 change the line below to onEvent('server.load', event => {
    ServerEvents.loaded(event => {
    if (event.server.persistentData.gameRules) return
    event.server.gameRules.set("watchedpot_useWhitelist", true)
    event.server.gameRules.set("watchedpot_invertBehavior", false)
    
    event.server.persistentData.gameRules = true
    })

    You can also use datapacks to achieve the same effect with a .mcfunction running the /gamerule command. See the Minecraft Wiki for information on that.

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Magic Bundle

价格:0 墨喵币
下载量:0

查看详情
Tag Tooltips

价格:0 墨喵币
下载量:0

查看详情
Block Image

价格:0 墨喵币
下载量:0

查看详情
Cultural Delights

价格:0 墨喵币
下载量:0

查看详情