Cache Utils 文档
描述
Cache Utils 是一个轻量级的客户端工具模组,专为资源包制作者和模组开发者设计,用于实时调试和可视化缓存资产。
它添加了一个核心命令及其多个子命令,允许你与缓存进行交互。
命令:
/cacheutils delete <target> [<protectUI>]
功能:移除所有键包含指定<target>字符串的缓存条目。
使用注意:<target>决定删除哪些条目——任何包含该子字符串的条目都将被删除;请谨慎使用。<protectUI>(默认:true)可防止删除与字体相关的缓存条目。禁用此选项可能导致可见 UI 元素损坏,直到玩家使用 F3+T 恢复字体,但其他资产不会恢复。
/cacheutils info <target> [<ordinal>]
功能:显示指定<target>的完整缓存值。如果有多个条目匹配,可选择性地包含 <ordinal> 以选择确切的条目。
使用注意:使用此命令检查目标的原始存储数据。当你需要关于条目的技术信息时非常有用。
/cacheutils length
功能:显示当前存储在缓存中的条目总数。
使用注意:不接受参数——它仅返回计数。非常适合快速 sanity check(常规检查)。
/cacheutils list <chat|log> [<searchTerm>]
功能:列出所选输出模式下的缓存条目:chat(打印到玩家聊天框)或 log(写入服务器日志)。可选择提供 <searchTerm> 以过滤结果。
使用注意:使用 chat 获取快速的交互式结果,使用 log 当你需要长输出或与开发者共享时。
警告
delete 子命令实际上会删除 vanilla Minecraft 纹理,如果你告诉它这样做。这不是 bug,这是模组的有意设计。有一些纹理被强制阻止删除:minecraft:missingno,还有一些被置于安全保护下 - 字体 - 要删除这些纹理,你必须将 [<protectUI>] 设置为 false。
注意:刷新纹理 (F3+T) 将恢复文本。
开发
此模组仍在开发中,并将获得新功能并移植到新版本和旧版本 除非有人为 Forge 或 NeoForge 编写移植版并在我的 git 仓库提交拉取请求,否则它将不会被移植到 Forge 或 NeoForge。
Cache Utils Documentation
Description
Cache Utils is a lightweight, client-side utility mod designed for resource pack creators and mod developers to debug and visualize cached assets in real-time.
It adds a single core command with multiple sub-commands that allow you to interact with the cache
Commands:
/cacheutils delete <target> [<protectUI>]
What it does: Removes all cache entries whose keys contain the specified <target> string.
Usage notes: <target> determines which entries get deleted — anything containing that substring will be deleted; use with caution. <protectUI> (default: true) prevents deleting font-related cache entries. Disabling this may break visible UI elements until the player uses F3+T, which restores fonts but not other assets.
/cacheutils info <target> [<ordinal>]
What it does: Shows the full cached value for the specified <target>. If multiple entries match, optionally include <ordinal> to pick the exact entry.
Usage notes: Use this to inspect the raw stored data for a target. Helpful when you need technical information about an entry.
/cacheutils length
What it does: Displays the total number of entries currently stored in the cache.
Usage notes: No parameters accepted — it simply returns the count. Great for quick sanity checks.
/cacheutils list <chat|log> [<searchTerm>]
What it does: Lists cached entries from the chosen output mode: chat (prints to player chat) or log (writes to the server log). Optionally provide <searchTerm> to filter results.
Usage notes: Use chat for quick interactive results, and log when you need long output or for sharing with devs.
Warning
The delete sub-command will in fact delete vanilla Minecraft textures if you tell it to do so. This is not a bug, this is by design of the mod. There are some textures that have been forcefully prevented from being deleted: minecraft:missingno, and there are some that have been put under security - fonts - to delete these textures you must set [<protectUI>] to false.
NOTE: refresing textures (F3+T) will restore text.
Development
This mod is still under development, and will be getting new features and ported to new and old versions IT WILL NOT BE PORTED TO FORGE OR NEOFORGE unless some writes it for that mod loader and makes a pull request on my git repo.
评论 0
登录后参与评分
还没有评论,来抢沙发吧