Auto Torch
English | 简体中文
适用于 Minecraft 1.7.10~26.3 的自动放置火把与光照等级叠加层模组,支持 NeoForge、Forge 和 Fabric。
动机
挖掘区域非常繁琐,手动放置火把容易遗漏角落。现有的光照等级叠加层也无法处理溺尸和史莱姆的特殊生成条件,这使得建造沼泽生物农场或为河床照明变得不便。这就是本模组诞生的原因。
概览
- 默认按下
G 键打开选择面板,您可以在其中配置区域内或玩家附近的自动火把放置。
- 默认按下
F7 键切换光照等级叠加层,包括针对溺尸和史莱姆的特殊检查。
| 附近火把放置 |
光照等级叠加层 |
区域内火把放置 |
| 仅客户端 |
仅客户端 |
客户端和服务器 |
截图

用法
- 默认按下
G 键打开选择面板,按 F7 切换光照等级叠加层。这两个按键绑定均可更改。
- 光照等级叠加层:
支持
X 标记、数字光照等级以及带框的数字光照等级。显示范围为水平方向 1-64 个方块,垂直方向上下各最多 64 个方块(共 64 个方块最大值),并进行了性能优化。
| 颜色 |
含义 |
| 红色 |
任何时间都可以生成生物 |
| 黄色 |
夜间可以生成生物 |
| 绿色 |
无法生成生物 |
| 紫色 |
可以生成史莱姆 |
| 青色 |
可以生成溺尸 |
- 附近自动火把放置:
在玩家周围两个方块范围内搜索有效位置,并使用右键交互从物品栏中放置火把。只有当光照等级低于阈值时才会放置火把;您可以选择是否在计算中包含天空光。
- 区域内自动火把放置:
选择点 A 和 B 定义一个长方体(对角顶点)或球体(中心和半径),支持选择工具。将选择设置为照明区域(绿色)或排除区域(红色),调整方块光阈值,然后点击“开始任务”。支持一个照明区域和多个排除区域。
- 所有功能均在上述设置面板中可用。
详细说明
附近自动火把放置
- 启用后,模组会在玩家周围水平半径 2 个方块、垂直范围 -2 到 +1 个方块的区域内,每 10 刻(0.5 秒)扫描一次。火把由近及远放置;失败的位置会在 40 刻(2 秒)后重试。
- 火把仅放置在无流体的空气方块中,且火把放置后不会与玩家发生碰撞。
- 快捷栏或副手必须有可用的火把。
- 您可以设置触发放置的光照等级阈值(1-16),并选择在计算中是否包含天空光。
光照等级叠加层
- 默认按下
F7 键切换,或在 G 面板中进行配置。
- 以当前视角为中心,水平显示范围可设置为 1-64 个方块。垂直方向每个方向最多可选择 64 个方块(最大 64 个方块)。支持自由视角等模组。
- 支持
X 标记、数字光照等级以及带框的数字光照等级。
- 支持半透明渲染,数字可随视角旋转。
- 标记会检查当前位置是否可以生成生物,包括史莱姆和溺尸的特殊生成条件,并使用不同颜色标识结果。
区域内自动火把放置
- 输入坐标或使用选择工具左键和右键选择两个点。
- 长方体使用 A 和 B 作为对角顶点。球体使用 A 作为中心,A 到 B 的直线距离作为半径。
- 您可以配置一个绿色照明区域和多个红色排除区域。提供多种显示模式。
- 设置任务的最大方块光(0-15)。任务会处理方块光等于或低于该值的位置,放置位置需满足:上方有两个方块高度的空气、有可站立的方块、且方块光为 0。可以跳过有天空光的位置。
- 模组优先在黑暗位置下方放置火把。如果不可能,则随机搜索附近的有效位置。仅处理已加载的区块;绝不会强制加载区块。
- 扫描分两遍运行:第一遍使用配置的最低间距,第二遍使用较小的间距以填补剩余空隙。
- 您可以限制单个任务放置的火把最大数量;
0 表示无限制。您还可以选择是否消耗物品栏中的普通火把。
- 每位玩家同时只能有一个任务。新任务会替换旧任务。
配置文件
首次启动后会自动生成两种类型的配置文件。
配置文件中的布尔选项使用 true 或 false,不带引号。
客户端配置
文件:config/autotorch-client.toml
[nearbyAutoTorch]
# 是否启用附近的自动火把放置。
enabled = false
# 当光照等级低于此值时尝试放置火把。范围:1-16。
lightThreshold = 4
# true:使用方块光照和天空光照中的较大值;false:仅使用方块光照。
includeSkyLight = true
# 扫描间隔:1-40 刻。
scanIntervalTicks = 10
# 持续黑暗确认时间:5-40 刻,步长为 5。
darkConfirmTicks = 10
# 相同位置的重试延迟:10-100 刻,步长为 10。
retryDelayTicks = 40
# 水平扫描半径:1-4 个方块;垂直范围固定为 -2 到 +1。
horizontalRadius = 2
# 要放置的方块物品;请将其放在副手或快捷栏中。
item = "minecraft:torch"
[lightOverlay]
# 是否启用光照等级覆盖层。
enabled = false
# 是否启用穿透渲染,以便透过方块看到标记。
renderThrough = false
# true:数字随视角旋转;false:数字保持固定。
numberRotation = true
# 以当前相机为中心的水平显示范围。范围:1-64 个方块。
horizontalRange = 16
# 从当前相机向下扫描的方块数量。范围:0-64;与 upRange 之和不得超过 64。
downRange = 16
# 从当前相机向上扫描的方块数量。范围:0-64;与 downRange 之和不得超过 64。
upRange = 4
# 显示样式:0 = X 标记,1 = 数字,2 = 带框数字。
mode = 0
# 是否标记地下史莱姆区块(Y 40 以下的史莱姆区块内部)。
detectSlimes = true
# 独立显示史莱姆区块边界(默认关闭)。
slimeChunkBoundaries = false
# 是否标记满足原版溺尸生成条件的位置。
detectDrowned = false
# 每刻扫描预算:2000-48000,步长 2000。
scanBudgetPerTick = 12000
# 定期刷新间隔:20-400 刻,步长 20。
refreshIntervalTicks = 100
# 每帧溺尸遮挡检查次数:16-256,步长 16;用于 26.2 及更高版本。
drownedBudgetPerFrame = 64
# 近处线宽:0.25-8.0;最小远处线宽:0.75-2.5。
nearLineWidth = 2.5
farLineWidth = 0.75
# 标记颜色:六位十六进制 RGB,不含 #。
alwaysRiskColor = "FF3030"
nightRiskColor = "FFD23C"
safeColor = "50E060"
slimeColor = "E050E0"
drownedColor = "40D8E8"
# 标记不透明度:0-255。
markerAlpha = 224
[selectionOverlay]
# 是否显示光照区域和排除区域。
enabled = true
# true:仅显示轮廓;false:显示半透明面。
linesOnly = false
# 是否为球形选择使用更平滑的渲染。
smoothSpheres = false
# 近处线宽:0.25-8.0;最小远处线宽:0.75-3.0。
nearLineWidth = 3.0
farLineWidth = 0.75
# 草稿、光照区域和排除区域颜色:六位十六进制 RGB。
draftColor = "70A0FF"
mainColor = "50FF70"
exclusionColor = "FF5050"
# 选择面和排除面的不透明度:0-255。
faceAlpha = 40
exclusionFaceAlpha = 48
# 球体经度和纬度分段数:12-48,步长 4。
sphereLongitudeSegments = 24
sphereLatitudeSegments = 12
# 选择工具:任何有效的非空气方块物品 ID。
toolItem = "minecraft:wooden_axe"
# 是否使用选择工具左键和右键选择 A 点和 B 点;禁用后,该物品恢复其正常交互功能。
selectionToolEnabled = true
# 区间屏幕中的转换和交换按钮是否使用符号;false 显示文本。
symbolButtons = false
[lightingTaskDefaults]
# 每个任务默认的最大火把数量。范围:0-4096,步长 128;0 表示无限制。
maxTorches = 0
# 火把之间的默认最小间距。范围:1-12 个方块。
minSpacing = 8
# 处理方块光照等于或低于此值的位置。范围:0-15;0 表示仅处理方块光照为 0 的位置。
lightThreshold = 0
# 是否默认包含有天空光照的位置;false 表示仅包含没有天空光照的位置。
includeSkyLight = false
# 创造模式是否默认从库存中消耗火把。
creativeConsumeTorches = false
# 单人游戏中生存模式是否默认从库存中消耗火把。
# 在多人游戏中,服务器的 gameplay.survivalConsumesTorches 设置优先。
survivalConsumeTorches = true
# 进度更新间隔:10-40 刻,步长 10。
progressIntervalTicks = 10
# 区域任务放置的方块物品。
placementItem = "minecraft:torch"
服务器配置
文件:<world directory>/serverconfig/autotorch-server.toml
单人游戏位置:config/autotorch-server.toml
26.3 版在 NeoForge 中将配置文件重命名为 autotorch-synced.toml。
[lightingTask]
# 允许区域放置任务;禁用此项将停止现有任务并拒绝新任务。
enabled = true
[limits]
# 长方体任意一侧允许的最大长度。范围:1-321 个方块。
maxBoxAxisLength = 321
# 球形选择允许的最大半径。范围:1-160 个方块。
maxSphereRadius = 160
# 单个任务中允许的最大排除区域数量。范围:0-32。
maxExclusions = 32
# 单个任务可设置的最大火把数量。范围:1-4096;0 表示无限制。
maxTorchesPerTask = 4096
# 是否允许客户端将最大火把数量设置为 0(无限制)。
allowUnlimitedTorches = true
# 客户端可配置的火把间距下限和上限。两者范围均为 1-12。
minSpacing = 1
maxSpacing = 12
# 服务器上可同时运行的最大任务数量。范围:1-1024。
maxConcurrentTasks = 64
[gameplay]
# 生存模式任务是否必须从玩家库存中消耗普通火把。
survivalConsumesTorches = true
[性能]
每个任务每刻扫描的最大方块数。范围:1-120000。
scanBudgetPerTaskTick = 12000
每个任务每刻放置的最大火把数量。范围:1-64。
placeBudgetPerTaskTick = 8
所有任务每刻扫描的总最大方块数。范围:1-240000。
globalScanBudgetPerTick = 24000
所有任务每刻放置的总最大火把数量。范围:1-256。
globalPlaceBudgetPerTick = 16
在每个黑暗位置附近寻找有效火把位置的最大尝试次数。范围:1-128。
randomPlacementAttempts = 32
## 其他
- “可生成”使用保守的检查方法,适用于常见的原版敌对生物,不包含对其他模组的特殊处理。
- 不支持领地插件。放置操作使用原版的 `/setblock` 命令。
- 由于未发现显示天空光照具有实际用途,因此目前暂无添加该功能的计划。
Auto Torch
English | 简体中文
An automatic torch placement and light level overlay mod for Minecraft 1.7.10~26.3 on NeoForge, Forge, and Fabric.
Motivation
Digging out an area is tedious, and placing torches by hand makes it easy to miss spots. Existing light level overlays also do not handle the special spawning conditions of drowned and slimes, which makes building swamp mob farms or lighting riverbeds inconvenient. That is why this mod was created.
Overview
- Press
G by default to open the selection panel, where you can configure automatic torch placement within an area or near the player.
- Press
F7 by default to toggle the light level overlay, including special checks for drowned and slimes.
| Nearby Torch Placement |
Light Level Overlay |
Area Torch Placement |
| Client-side only |
Client-side only |
Client and server |
Screenshots

Usage
- Press
G by default to open the selection panel and F7 to toggle the light level overlay. Both key bindings can be changed.
- Light level overlay:
Supports
X markers, numeric light levels, and boxed numeric light levels. The display range is 1-64 blocks horizontally and up to 64 blocks both above and below vertically (64 blocks maximum), with performance optimizations.
| Color |
Meaning |
| Red |
Mobs can spawn at any time |
| Yellow |
Mobs can spawn at night |
| Green |
Mobs cannot spawn |
| Purple |
Slimes can spawn |
| Cyan |
Drowned can spawn |
- Nearby automatic torch placement:
Searches for valid positions within two blocks of the player and uses right-click interaction to place torches from the inventory. A torch is placed only when the light level is below the threshold; you can choose whether sky light is included in the calculation.
- Area automatic torch placement:
Select points A and B to define a cuboid (opposite corners) or sphere (center and radius), with selection-tool support. Set the selection as a lighting area (green) or exclusion area (red), adjust the block-light threshold, and click
Start Task. One lighting area and multiple exclusion areas are supported.
- All features are available in the settings panel shown above.
Detailed Description
Nearby Automatic Torch Placement
- When enabled, the mod scans every 10 ticks (0.5 seconds) within a horizontal radius of 2 blocks and a vertical range of -2 to +1 blocks around the player. It places torches from near to far; a failed position is retried after 40 ticks (2 seconds).
- Torches are placed only in air blocks without fluid, where a torch can remain in place and will not collide with the player.
- A torch must be available in the hotbar or offhand.
- You can set the light level threshold that triggers placement (1-16) and choose whether sky light is included in the calculation.
Light Level Overlay
- Press
F7 by default to toggle it, or configure it in the G panel.
- Centered on the current view, the horizontal display range can be set to 1-64 blocks. Vertically, up to 64 blocks can be selected in each direction (64 blocks maximum). Free-camera and similar mods are supported.
X markers, numeric light levels, and boxed numeric light levels are supported.
- See-through rendering is supported, and numbers can rotate with the view.
- Markers check whether mobs can spawn at the current position, including the special spawning conditions of slimes and drowned, and use different colors to identify the results.
Area Automatic Torch Placement
- Enter coordinates or select two points by left- and right-clicking with the selection tool.
- A cuboid uses A and B as opposite corners. A sphere uses A as its center and the straight-line distance from A to B as its radius.
- You can configure one green lighting area and multiple red exclusion areas. Several display modes are available.
- Set the task's maximum block light (0-15). The task processes positions whose block light is at or below that value, with air at two blocks of height, a block that can be stood on, and block light 0 at the placement position. Positions with sky light can be skipped.
- The mod first prefers placing a torch beneath a dark position. If that is not possible, it randomly searches nearby for a valid position. Only loaded chunks are processed; chunks are never force-loaded.
- Scanning runs in two passes: the first uses the configured minimum spacing, and the second uses a smaller spacing to fill remaining gaps.
- You can limit the maximum number of torches placed by a task;
0 means unlimited. You can also choose whether regular torches in the inventory are consumed.
- Each player can have only one task at a time. A new task replaces the old one.
Configuration Files
Two types of configuration files are generated automatically after the first launch.
Boolean options in configuration files use true or false without quotation marks.
Client Configuration
File: config/autotorch-client.toml
[nearbyAutoTorch]
# Whether nearby automatic torch placement is enabled.
enabled = false
# Attempt to place a torch when the light level is below this value. Range: 1-16.
lightThreshold = 4
# true: use the greater of block light and sky light; false: use block light only.
includeSkyLight = true
# Scan interval: 1-40 ticks.
scanIntervalTicks = 10
# Continuous darkness confirmation: 5-40 ticks, step 5.
darkConfirmTicks = 10
# Retry delay for the same position: 10-100 ticks, step 10.
retryDelayTicks = 40
# Horizontal scan radius: 1-4 blocks; vertical range is fixed at -2 to +1.
horizontalRadius = 2
# Block item to place; keep it in your offhand or hotbar.
item = "minecraft:torch"
[lightOverlay]
# Whether the light level overlay is enabled.
enabled = false
# Whether see-through rendering is enabled so markers can be seen through blocks.
renderThrough = false
# true: numbers rotate with the view; false: numbers remain fixed.
numberRotation = true
# Horizontal display range centered on the current camera. Range: 1-64 blocks.
horizontalRange = 16
# Number of blocks scanned downward from the current camera. Range: 0-64; the sum with upRange must not exceed 64.
downRange = 16
# Number of blocks scanned upward from the current camera. Range: 0-64; the sum with downRange must not exceed 64.
upRange = 4
# Display style: 0 = X markers, 1 = numbers, 2 = boxed numbers.
mode = 0
# Whether to mark underground slime chunks (below Y 40 inside a slime chunk).
detectSlimes = true
# Independently display slime chunk boundaries (off by default).
slimeChunkBoundaries = false
# Whether to mark locations that meet the vanilla spawning conditions for drowned.
detectDrowned = false
# Scan budget per tick: 2000-48000, step 2000.
scanBudgetPerTick = 12000
# Periodic refresh interval: 20-400 ticks, step 20.
refreshIntervalTicks = 100
# Drowned occlusion checks per frame: 16-256, step 16; used on 26.2 and later.
drownedBudgetPerFrame = 64
# Near line width: 0.25-8.0; minimum far line width: 0.75-2.5.
nearLineWidth = 2.5
farLineWidth = 0.75
# Marker colors: six-digit hexadecimal RGB, without #.
alwaysRiskColor = "FF3030"
nightRiskColor = "FFD23C"
safeColor = "50E060"
slimeColor = "E050E0"
drownedColor = "40D8E8"
# Marker opacity: 0-255.
markerAlpha = 224
[selectionOverlay]
# Whether to display the lighting area and exclusion areas.
enabled = true
# true: show outlines only; false: show translucent faces.
linesOnly = false
# Whether to use smoother rendering for spherical selections.
smoothSpheres = false
# Near line width: 0.25-8.0; minimum far line width: 0.75-3.0.
nearLineWidth = 3.0
farLineWidth = 0.75
# Draft, lighting area and exclusion colors: six-digit hexadecimal RGB.
draftColor = "70A0FF"
mainColor = "50FF70"
exclusionColor = "FF5050"
# Selection face and exclusion face opacity: 0-255.
faceAlpha = 40
exclusionFaceAlpha = 48
# Sphere longitude and latitude segments: 12-48, step 4.
sphereLongitudeSegments = 24
sphereLatitudeSegments = 12
# Selection tool: any valid non-air item ID.
toolItem = "minecraft:wooden_axe"
# Whether left- and right-clicking with the selection tool selects points A and B; when disabled, the item regains its normal interaction.
selectionToolEnabled = true
# Whether the convert and swap buttons in the interval screen use symbols; false shows text.
symbolButtons = false
[lightingTaskDefaults]
# Default maximum number of torches per task. Range: 0-4096, step 128; 0 means unlimited.
maxTorches = 0
# Default minimum spacing between torches. Range: 1-12 blocks.
minSpacing = 8
# Process positions whose block light is at or below this value. Range: 0-15; 0 means block light 0 only.
lightThreshold = 0
# Whether positions with sky light are included by default; false means only positions without sky light.
includeSkyLight = false
# Whether Creative mode consumes torches from the inventory by default.
creativeConsumeTorches = false
# Whether Survival mode consumes torches from the inventory by default in single-player.
# In multiplayer, the server's gameplay.survivalConsumesTorches setting takes precedence.
survivalConsumeTorches = true
# Progress update interval: 10-40 ticks, step 10.
progressIntervalTicks = 10
# Block item placed by area tasks.
placementItem = "minecraft:torch"
Server Configuration
File: <world directory>/serverconfig/autotorch-server.toml
Single-player location: config/autotorch-server.toml
26.3 renamed the configuration to autotorch-synced.toml in NeoForge.
[lightingTask]
# Allow area placement tasks; disabling this stops existing tasks and rejects new ones.
enabled = true
[limits]
# Maximum allowed length of any side of a cuboid. Range: 1-321 blocks.
maxBoxAxisLength = 321
# Maximum allowed radius of a spherical selection. Range: 1-160 blocks.
maxSphereRadius = 160
# Maximum number of exclusion areas allowed in a single task. Range: 0-32.
maxExclusions = 32
# Maximum number of torches that can be set for a single task. Range: 1-4096; 0 means unlimited.
maxTorchesPerTask = 4096
# Whether clients may set the maximum torch count to 0 (unlimited).
allowUnlimitedTorches = true
# Lower and upper bounds for torch spacing configurable by clients. Both range from 1-12.
minSpacing = 1
maxSpacing = 12
# Maximum number of tasks that can run concurrently across the server. Range: 1-1024.
maxConcurrentTasks = 64
[gameplay]
# Whether Survival mode tasks must consume regular torches from the player's inventory.
survivalConsumesTorches = true
[performance]
# Maximum number of blocks scanned by each task per tick. Range: 1-120000.
scanBudgetPerTaskTick = 12000
# Maximum number of torches placed by each task per tick. Range: 1-64.
placeBudgetPerTaskTick = 8
# Maximum total number of blocks scanned by all tasks per server tick. Range: 1-240000.
globalScanBudgetPerTick = 24000
# Maximum total number of torches placed by all tasks per server tick. Range: 1-256.
globalPlaceBudgetPerTick = 16
# Maximum number of attempts to find a valid torch position near each dark position. Range: 1-128.
randomPlacementAttempts = 32
Other
- "Can spawn" uses conservative checks suitable for common vanilla hostile mobs and does not include special handling for other mods.
- Land-claim plugins are not supported. Placement uses the vanilla
/setblock command.
- No practical use has been found for displaying sky light, so there are currently no plans to add it.
评论 0
登录后参与评分
还没有评论,来抢沙发吧