ItemCleaner - Minecraft 物品清理模组
ItemCleaner 是一款基于 Fabric 的 Minecraft 模组,旨在提供灵活且可配置的物品实体清理功能。它具备定时自动清理、自定义清理范围、物品白名单管理以及直观的聊天反馈等功能。适用于服务器和单人游戏世界。
特性
核心清理功能
- ✅ 定时自动清理:可配置的清理间隔(默认:20 分钟),自动移除指定的物品
- ✅ 实时阈值检测:当物品实体数量达到配置的阈值时显示警告,让玩家决定是否进行清理
- ✅ 以玩家为中心的半径清理:在每个在线玩家的可配置半径内清理物品实体
- ✅ 手动清理命令:通过命令即时执行清理,满足按需操作需求
- ✅ 管理员工具:管理员可以从创造模式物品栏或通过命令
/give @s itemcleaner:cleanup_hoe 获取清理锄。手持该物品并右键点击,即可立即移除配置中列出的所有掉落物
- ✅ 单人游戏支持:在单人游戏世界中完全可用
灵活的配置系统
- ✅ 精确配置:微调设置,如清理开关、间隔、范围、物品阈值和语言
- ✅ 自定义清理半径:设置水平清理半径(默认:48 格,即 3 个区块)和垂直范围(默认:Y=-64 至 Y=320)
- ✅ 物品白名单管理:精确指定需要清理的物品(支持物品 ID)
- ✅ 多列表管理:创建和管理多个清理列表;通过命令添加或移除物品
- ✅ 可自定义消息:自定义清理倒计时文本和颜色(支持 Minecraft 颜色代码
§)
- ✅ 多语言支持:包含英文和中文;支持自定义语言包
清晰的用户反馈
- ✅ 聊天通知:清理前的倒计时警告(1 分钟、30 秒、5 秒)
- ✅ 详细的清理统计:清理后,显示已移除的物品总数以及按物品名称、ID 和数量的分类统计
安装
将下载的模组 JAR 文件放入你的 mods 文件夹中。
安装步骤
- 下载对应 Minecraft 版本的模组 JAR 文件
- 将 JAR 文件放入
mods 文件夹:
- 客户端:放入客户端的
mods 文件夹;支持单人游戏
- 服务器:放入服务器的
mods 文件夹;所有玩家共享相同的清理规则
- 启动游戏/服务器;模组会自动生成默认配置文件
命令
- /cleandrops:显示命令概览
- /cleandrops help:显示详细帮助
- /cleandrops clean:即时清理物品实体(基于当前活动的清理列表)
- /cleandrops add:将当前手持物品添加到清理列表
- /cleandrops remove <itemID>:从清理列表中移除指定完整 ID 的物品
- /cleandrops list:显示当前清理列表中的所有物品
- /cleandrops toggle auto:开启/关闭自动定时清理
- /cleandrops toggle threshold:开启/关闭物品阈值警告功能
- /cleandrops setinterval <ticks>:设置自动清理间隔(1 秒 = 20 tick)
- /cleandrops language <langCode>:更改模组的显示语言(例如,
en_us 表示英文,zh_cn 表示中文)
- /cleandrops listmanager create <name>:创建新的清理列表
- /cleandrops listmanager switch <name>:切换到指定列表
- /cleandrops listmanager delete <name>:删除列表(必须至少保留一个列表)
- /cleandrops listmanager current:显示当前激活的列表
- /cleandrops listmanager all:列出所有可用的清理列表
- /cleandrops listmanager list:显示所有列表及其内容
配置
配置文件路径:./config/itemcleaner.json(首次启动时自动生成)
核心配置参数
{
"enableAutoCleanup": true, // 启用自动清理 (true = 开启, false = 关闭)
"enableThresholdCheck": true, // 启用物品数量阈值检查 (true = 开启, false = 关闭)
"cleanupInterval": 12000, // 自动清理间隔(单位:tick)
"thresholdCheckInterval": 100, // 物品阈值检查间隔(单位:tick)
"warningCooldown": 1200, // 清理前警告的冷却时间(单位:tick)
"cleanRadius": 48, // 水平清理半径(单位:格)
"yMin": -64, // 清理的最小 Y 轴高度
"yMax": 320, // 清理的最大 Y 轴高度
"itemThreshold": 100, // 触发清理警告的物品数量阈值
"language": "en_us", // 显示语言(例如,"en_us" 表示英文)
"currentCleanupList": "default", // 当前活动的清理列表
"cleanupLists": { // 存储多个独立的清理列表(键 = 列表名称,值 = 物品 ID 数组)
"NowClean": [
"minecraft:gravel",
"minecraft:sand"
],
"default": [
"minecraft:cobblestone",
"minecraft:dirt",
"minecraft:bone",
"minecraft:rotten_flesh",
"minecraft:spider_eye",
"minecraft:string",
"minecraft:feather",
"minecraft:gunpowder",
"minecraft:flint",
"minecraft:gravel",
"minecraft:sand",
"minecraft:clay_ball",
"minecraft:snowball",
"minecraft:egg",
"minecraft:cod",
"minecraft:salmon",
"minecraft:pufferfish",
"minecraft:tropical_fish",
"minecraft:beef",
"minecraft:porkchop",
"minecraft:chicken",
"minecraft:rabbit",
"minecraft:mutton",
"minecraft:leather",
"minecraft:wool",
"minecraft:stick",
"minecraft:stone",
"minecraft:cobblestone",
"minecraft:grass_block",
"minecraft:dead_bush",
"minecraft:brown_mushroom",
"minecraft:red_mushroom",
"minecraft:lily_pad",
"minecraft:seagrass",
"minecraft:kelp"
]
}
}
ItemCleaner - Minecraft Item Cleanup Mod
ItemCleaner is a Fabric-based Minecraft mod designed to provide flexible and configurable item entity cleanup. It features scheduled automatic cleanup, customizable cleanup ranges, item whitelist management, and intuitive chat feedback. Suitable for both servers and single-player worlds.
Features
Core Cleanup Features
- ✅ Scheduled Auto Cleanup: Configurable cleanup intervals (default: 20 minutes) to automatically remove specified items
- ✅ Real-time Threshold Detection: Displays a warning when item entities reach a configured threshold, allowing players to decide whether to clean
- ✅ Player-Centric Range Cleanup: Cleans up item entities around each online player within a configurable radius
- ✅ Manual Cleanup Command: Execute cleanup instantly via commands for on-demand operations
- ✅ Admin Tool: Admins can obtain the Cleanup Hoe from the creative inventory or by using the command
/give @s itemcleaner:cleanup_hoe. Hold it in hand and right-click to instantly remove all item drops listed in the cleanup configuration
- ✅ Single-Player Support: Fully functional in single-player worlds
Flexible Configuration System
- ✅ Precise Configuration: Fine-tune settings like cleanup toggle, interval, range, item threshold, and language
- ✅ Custom Cleanup Radius: Set horizontal cleanup radius (default: 48 blocks, i.e., 3 chunks) and vertical range (default: Y=-64 to Y=320)
- ✅ Item Whitelist Management: Precisely specify which items to clean (supports item IDs)
- ✅ Multiple List Management: Create and manage multiple cleanup lists; add or remove items via commands
- ✅ Customizable Messages: Customize cleanup countdown text and colors (supports Minecraft color codes
§)
- ✅ Multi-Language Support: Includes English and Chinese; supports custom language packs
Clear User Feedback
- ✅ Chat Notifications: Countdown warnings before cleanup (1 minute, 30 seconds, 5 seconds)
- ✅ Detailed Cleanup Stats: After cleanup, shows total items removed and breakdown by item name, ID, and quantity
Installation
Place the downloaded mod JAR file into your mods folder.
Installation Steps
- Download the mod JAR file for your Minecraft version
- Place the JAR file into the
mods folder:
- Client: Place in the client's
mods folder; supports single-player
- Server: Place in the server's
mods folder; all players share the same cleanup rules
- Launch the game/server; the mod will generate a default config file automatically
Commands
- /cleandrops: Shows command overview
- /cleandrops help: Displays detailed help
- /cleandrops clean: Instantly cleans up item entities (based on the active cleanup list)
- /cleandrops add: Adds the currently held item to the cleanup list
- /cleandrops remove <itemID>: Removes an item by its full ID from the cleanup list
- /cleandrops list: Shows all items in the current cleanup list
- /cleandrops toggle auto: Toggles automatic scheduled cleanup on/off
- /cleandrops toggle threshold: Toggles the item threshold warning feature on/off
- /cleandrops setinterval <ticks>: Sets the auto-cleanup interval (1 second = 20 ticks)
- /cleandrops language <langCode>: Changes the mod's display language (e.g.,
en_us for English, zh_cn for Chinese)
- /cleandrops listmanager create <name>: Creates a new cleanup list
- /cleandrops listmanager switch <name>: Switches to the specified list
- /cleandrops listmanager delete <name>: Deletes a list (must keep at least one list)
- /cleandrops listmanager current: Shows the currently active list
- /cleandrops listmanager all: Lists all available cleanup lists
- /cleandrops listmanager list: Shows all lists and their contents
Configuration
Config file path: ./config/itemcleaner.json (generated automatically on first launch)
Core Configuration Parameters
{
"enableAutoCleanup": true, // Enable automatic cleanup (true = on, false = off)
"enableThresholdCheck": true, // Enable item count threshold check (true = on, false = off)
"cleanupInterval": 12000, // Auto-cleanup interval (in ticks)
"thresholdCheckInterval": 100, // Item threshold check interval (in ticks)
"warningCooldown": 1200, // Cooldown for pre-cleanup warnings (in ticks)
"cleanRadius": 48, // Horizontal cleanup radius (in blocks)
"yMin": -64, // Minimum Y-level for cleanup
"yMax": 320, // Maximum Y-level for cleanup
"itemThreshold": 100, // Item count threshold to trigger cleanup warnings
"language": "en_us", // Display language (e.g., "en_us" for English)
"currentCleanupList": "default", // Currently active cleanup list
"cleanupLists": { // Stores multiple independent cleanup lists (key = list name, value = array of item IDs)
"NowClean": [
"minecraft:gravel",
"minecraft:sand"
],
"default": [
"minecraft:cobblestone",
"minecraft:dirt",
"minecraft:bone",
"minecraft:rotten_flesh",
"minecraft:spider_eye",
"minecraft:string",
"minecraft:feather",
"minecraft:gunpowder",
"minecraft:flint",
"minecraft:gravel",
"minecraft:sand",
"minecraft:clay_ball",
"minecraft:snowball",
"minecraft:egg",
"minecraft:cod",
"minecraft:salmon",
"minecraft:pufferfish",
"minecraft:tropical_fish",
"minecraft:beef",
"minecraft:porkchop",
"minecraft:chicken",
"minecraft:rabbit",
"minecraft:mutton",
"minecraft:leather",
"minecraft:wool",
"minecraft:stick",
"minecraft:stone",
"minecraft:cobblestone",
"minecraft:grass_block",
"minecraft:dead_bush",
"minecraft:brown_mushroom",
"minecraft:red_mushroom",
"minecraft:lily_pad",
"minecraft:seagrass",
"minecraft:kelp"
]
}
}
评论 0
登录后参与评分
还没有评论,来抢沙发吧