VoxelCleaner
VoxelCleaner 是一款 Minecraft 模组,旨在通过游戏内命令提供强大的基于体素(voxel)的编辑功能。它具备房间生成、区域空心化、历史记录追踪(撤销/重做)、战利品管理和方块保护等功能,是创作者、地图建造者和服务器管理员的必备工具。
目录
功能特性
- ? 房间生成:通过单一命令生成指定宽度、高度和深度的房间。
- ?️ 区域空心化:清除内部体积,同时保留外壳方块。
- ♻️ 撤销/重做:通过历史记录追踪功能恢复或重新应用世界更改。
- ? 战利品管理:破坏方块、生成箱子并自动分配战利品。
- ? 方块保护:防止修改受保护的方块,如刷怪笼和包含实体的方块。
- ? 命令工具:提供辅助方法,帮助在命令中定位玩家和方块。
安装
- 为 Minecraft 安装 Fabric Loader。
- 安装 Fabric API。
- 下载
VoxelCleaner 模组的 JAR 文件并将其放入 mods 文件夹。
- 使用 Fabric 配置文件启动游戏。
使用方法
主要命令
/voxelcleaner
别名: /vc
在玩家前方清除(空心化)一个矩形区域。
/voxelcleaner <width> <height> <depth>
/voxelcleaner <width> <height> <depth> <material>
/voxelcleaner <width> <height> <depth> <material> <force>
/voxelcleaner <width> <height> <depth> <material> <force> <loot>
参数:
width – 区域的内部宽度
height – 区域的内部高度
depth – 区域的内部深度
material (可选) – 用于外壳的方块
force (可选,布尔值) – 移除受保护的方块
loot (可选,布尔值) – 将掉落物收集到箱子中
/voxelroom
别名: /vr
创建一个完整的房间,包括墙壁、地板和天花板。
/voxelroom <width> <height> <depth> <walls> <floor> <ceiling>
/voxelroom <width> <height> <depth> <walls> <floor> <ceiling> <force>
/voxelroom <width> <height> <depth> <walls> <floor> <ceiling> <force> <loot>
参数:
width – 房间的内部宽度
height – 房间的内部高度
depth – 房间的内部深度
walls – 墙壁方块
floor – 地板方块
ceiling – 天花板方块
force (可选,布尔值) – 覆盖受保护的方块
loot (可选,布尔值) - 将移除的方块收集到箱子中
历史命令
/voxelundo
别名: /vcu
撤销上一次体素操作。
/voxelundo
/voxelundo <count>
/voxelredo
别名: /vcr
重做之前已撤销的体素操作。
/voxelredo
/voxelredo <count>
/voxelhistory
别名: /vch
显示当前玩家的操作历史记录。
/voxelhistory
/voxelhistory <count>
注意事项
- 所有命令仅限玩家执行(无法从控制台执行)。
- 撤销/重做功能按玩家和维度独立工作。
- 如果未指定,
force 和 loot 默认为 false。
- 除非
force = true,否则受保护的方块(方块实体、刷怪笼)将被保留。
配置
所有常量集中在 VoxelConfig.java 文件中。主要的配置选项如下:
public static final int MAX_W = 64;
public static final int MAX_H = 64;
public static final int MAX_D = 64;
public static final int MAX_ACTIONS_PER_PLAYER = 10;
public static final int MAX_HISTORY_LINES = 20;
public static final String TIMEZONE = "America/New_York";
调整这些值以微调玩家限制、历史深度和尺寸约束。
示例
# 使用默认材料空心化 10x5x10 的区域
/voxelcleaner 10 5 10
# 空心化 10x5x10 的区域,使用石头作为外壳并收集战利品
/voxelcleaner 10 5 10 minecraft:stone true true
# 创建 7x4x7 的房间,墙壁、地板和天花板使用不同的方块
/voxelroom 7 4 7 minecraft:oak_planks minecraft:birch_planks minecraft:glass
# 创建 7x4x7 的房间并覆盖受保护的方块
/voxelroom 7 4 7 minecraft:oak_planks minecraft:birch_planks minecraft:glass true
# 撤销最后 2 个体素操作
/voxelundo 2
# 重做上次撤销的体素操作
/voxelredo 1
# 查看当前玩家最近的 5 个体素操作
/voxelhistory 5
故障排除
- ❗ 命令未被识别? 请确保模组已加载且您使用的是 Fabric 配置文件。
- ❗ 方块编辑无效? 请确保您没有 targeting 受保护的方块(例如刷怪笼、包含实体的方块)。
- ❗ 撤销栈无效? 请检查
VoxelConfig.MAX_ACTIONS_PER_PLAYER 以确保玩家启用了历史记录。
依赖项
贡献者
许可证
本作品根据 Creative Commons CC0 1.0 Universal (CC0 1.0) Public Domain Dedication 发布。
VoxelCleaner
VoxelCleaner is a Minecraft mod designed to provide powerful voxel-based editing capabilities via in-game commands. With features like room generation, area hollowing, history tracking (undo/redo), loot management, and block protection, it is an essential tool for creators, map builders, and server admins.
Table of Contents
Features
- ? Room Generation: Generate rooms of specified width, height, and depth with a single command.
- ?️ Area Hollowing: Clear out volumes while preserving outer shell blocks.
- ♻️ Undo/Redo: Revert or reapply world changes with history tracking.
- ? Loot Management: Break blocks, spawn chests, and auto-distribute loot.
- ? Block Protection: Prevents modification of protected blocks like spawners and blocks with entities.
- ? Command Utilities: Utility methods to assist with player and block targeting in commands.
Installation
- Install Fabric Loader for Minecraft.
- Install the Fabric API.
- Download the
VoxelCleaner mod JAR and place it in your mods folder.
- Launch the game using the Fabric profile.
Usage
Main Commands
/voxelcleaner
Alias: /vc
Clears (hollows) a rectangular area in front of the player.
/voxelcleaner <width> <height> <depth>
/voxelcleaner <width> <height> <depth> <material>
/voxelcleaner <width> <height> <depth> <material> <force>
/voxelcleaner <width> <height> <depth> <material> <force> <loot>
Parameters:
width – Inner width of the area
height – Inner height of the area
depth – Inner depth of the area
material (optional) – Block used for the outer shell
force (optional, boolean) – Removes protected blocks
loot (optional, boolean) – Collects drops into chests
/voxelroom
Alias: /vr
Creates a fully built room with walls, floor, and ceiling.
/voxelroom <width> <height> <depth> <walls> <floor> <ceiling>
/voxelroom <width> <height> <depth> <walls> <floor> <ceiling> <force>
/voxelroom <width> <height> <depth> <walls> <floor> <ceiling> <force> <loot>
Parameters:
width – Inner width of the room
height – Inner height of the room
depth – Inner depth of the room
walls – Wall block
floor – Floor block
ceiling – Ceiling block
force (optional, boolean) – Overrides protected blocks
loot (optional, boolean) – Collects removed blocks into chests
History Commands
/voxelundo
Alias: /vcu
Undoes the last voxel action.
/voxelundo
/voxelundo <count>
/voxelredo
Alias: /vcr
Redoes previously undone voxel actions.
/voxelredo
/voxelredo <count>
/voxelhistory
Alias: /vch
Displays the command history for the current player.
/voxelhistory
/voxelhistory <count>
Notes
- All commands are player-only (cannot be executed from console).
- Undo/redo works per player and per dimension.
force and loot default to false if not specified.
- Protected blocks (block entities, spawners) are preserved unless
force = true.
Configuration
All constants are centralized in VoxelConfig.java. Notable configuration options:
public static final int MAX_W = 64;
public static final int MAX_H = 64;
public static final int MAX_D = 64;
public static final int MAX_ACTIONS_PER_PLAYER = 10;
public static final int MAX_HISTORY_LINES = 20;
public static final String TIMEZONE = "America/New_York";
Adjust these values to fine-tune player limits, history depth, and size constraints.
Examples
# Hollow out a 10x5x10 area using default material
/voxelcleaner 10 5 10
# Hollow out a 10x5x10 area with stone shell and collect loot
/voxelcleaner 10 5 10 minecraft:stone true true
# Create a 7x4x7 room using different blocks for walls, floor, and ceiling
/voxelroom 7 4 7 minecraft:oak_planks minecraft:birch_planks minecraft:glass
# Create a 7x4x7 room and override protected blocks
/voxelroom 7 4 7 minecraft:oak_planks minecraft:birch_planks minecraft:glass true
# Undo the last 2 voxel actions
/voxelundo 2
# Redo the last undone voxel action
/voxelredo 1
# View the last 5 voxel actions for the current player
/voxelhistory 5
Troubleshooting
- ❗ Commands not recognized? Make sure the mod is loaded and you're using the Fabric profile.
- ❗ Block edits not working? Ensure you're not targeting protected blocks (e.g., spawners, blocks with entities).
- ❗ Undo stack not working? Check
VoxelConfig.MAX_ACTIONS_PER_PLAYER to ensure history is enabled for players.
Dependencies
Contributors
- Jason Oltzen – Author and core developer
License
This work is released under the Creative Commons CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.
评论 0
登录后参与评分
还没有评论,来抢沙发吧