跳到正文

CacheUtils

作者:SMILEZYd

A client side debugging tool for data pack and mod developers alike that adds commands for interacting with the texture cache

收藏

介绍

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

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 [] 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.

常见问题

CacheUtils 支持哪些 Minecraft 版本?

CacheUtils 支持 Minecraft Java 版 1.21.4–1.21.8,共 5 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

CacheUtils 怎么安装?

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

评论

登录后评论和评分