?️ 想象一下: 你已经在矿道里挖了三个小时。主手拿着方块,副手拿着火把。你按住右键想筑起一堵墙——恭喜你,你现在把整条隧道都贴满了火把,就像一棵圣诞树。这场景熟悉吗?NoLightPlace 就是为了杜绝这种肌肉记忆导致的失误。
NoLightPlace 是一款仅适用于 Fabric 的纯客户端模组。它防止你在副手持握光源时将其放置。再也不用担心不小心放出的火把,或者从地上捡起几十个火把了——让矿道保持整洁干净。
⚡ 功能介绍
- ? 仅阻止副手放置光源 —— 你的主手从未受到影响,行为完全如原版。
- ? 是切换开关,而非按住不放。 按一次键 → 锁定。再按一次 → 解锁。你不需要在挖矿时一直盯着一个按钮。
- ? 状态栏提示 位于快捷栏上方,可一目了然地显示当前状态(
LOCKED / UNLOCKED),让你无需怀疑模组是否已开启。
- ⌨️ 按键完全可自定义 在控制菜单中设置(默认为
Left Alt)。
? 切换机制的行为逻辑
核心在于精准控制:它仅在 副手 + 光源 + 已锁定 同时满足时才取消操作。其他情况均不受影响。
| ? 锁定状态 |
? 副手持物 |
✊ 主手持物 |
?️ 右键结果 |
| OFF |
火把 |
泥土 |
两者均可正常放置(原版) |
| ON |
火把 |
泥土 |
泥土可放置 ✅ · 火把被阻止 ? |
| ON |
泥土 |
镐子 |
泥土可放置 ✅(副手的泥土不是光源) |
| ON |
牛排 |
剑 |
牛排可食用 ✅(食物不是光源) |
| OFF |
灯笼 |
圆石 |
两者均可正常放置(原版) |
注意这个规律:模组仅在 所有三项条件 都满足时才会说“不”——即副手、已锁定,且为光源。只要缺少其中任何一项,Minecraft 就会照常运行。
? 哪些物品会被阻止
仅限明显的发光源。方块、工具、食物、桶等——全部忽略。
| 类别 |
物品 |
| ? 火把类 |
火把 · 灵魂火把 · 红石火把 |
| ? 灯笼类 |
灯笼 · 灵魂灯笼 |
⚠️ 目前列表仅限原版。来自其他模组的火把/灯笼尚未被阻止——如果你希望添加特定物品,请提交 Issue,我会将其加入。
? 底层原理
好奇“阻止”在代码层面究竟长什么样?整个决策逻辑非常简短——模组只是问了三个问题,并在任何一个答案为“否”时立即退出:
if (hand != Hand.OFF_HAND) return PASS; // 主手?绝不触碰
if (!isLocked) return PASS; // 切换关闭?纯原版行为
if (!LIGHT_SOURCES.contains(item)) return PASS; // 不是火把/灯笼/灯?忽略
return FAIL; // 副手 + 已锁定 + 光源 → 取消放置
就是这样。没有对放置逻辑的 Mixin 注入,也没有与服务器的往返交互——仅仅是两个 Fabric 事件(UseBlockCallback / UseItemCallback)在条件吻合时返回 FAIL。设计上极其轻量。
? 安装方法
- 为 Minecraft 安装 Fabric Loader
- 将 Fabric API 放入
mods/ 文件夹
- 将 nolightplace 放入同一个
mods/ 文件夹
- 启动游戏——搞定。✅
? 仅客户端。服务器不需要此模组。它在任何服务器(原版、Paper、整合包)上都能正常工作,无需任何人安装额外内容。
❓ 常见问题
它在多人游戏/服务器上能用吗?
可以。它是纯客户端模组——在你的客户端安装即可正常运行,无需服务器端模组支持。
我可以更改按键吗?
可以。选项 → 控制 → 按键绑定 → NoLightPlace。将其重新绑定到你觉得合适的按键;无需重启游戏。
它会阻止我的主手操作吗?
不会。设计上主手完全被忽略。仅限副手,仅限已锁定时,仅限光源。
它会阻止副手中的方块/食物/桶吗?
不会。仅限上述列出的光源。你的副手泥土、牛排和水桶将继续像以前一样正常工作。
为什么用切换开关而不是“按住以阻止”?
因为你可以只在挖矿开始时设置一次,然后就不再理会。一边按住右键一边按住某个键正是本模组旨在消除的那种别扭操作。
? 链接与联系方式
如果 NoLightPlace 让你的矿道免于火把泛滥,一个 ❤️ 和一个关注对我来说意义重大。?️
发现了错误或想添加模组中的火把?提交 Issue —— 我确实会看。
?️ Picture this: you're three hours into a strip mine. Block in the main hand, torch in the offhand. You hold right-click to lay down a wall and — congratulations — you just wallpapered the entire tunnel in torches like it's a Christmas tree. Sound familiar? NoLightPlace exists to kill that exact muscle-memory accident.
NoLightPlace is a tiny client-side-only mod for Fabric. It prevents you from placing light sources while holding them in your off-hand. No more accidentally placed torches or having to pick dozens of them up off the floor—just neat, clean tunnels.
⚡ What it does
- ? Blocks placement of light sources from the offhand only — your main hand is never touched and behaves like pure vanilla.
- ? It's a toggle, not a hold. Press the key once → locked. Press again → unlocked. You don't babysit a button while mining.
- ? On-screen status line above the hotbar tells you the current state at a glance (
LOCKED / UNLOCKED), so you never wonder whether the mod is on.
- ⌨️ Fully rebindable keybind in the Controls menu (defaults to
Left Alt).
? How the toggle behaves
The whole point is surgical precision: it only ever cancels offhand + light + locked. Everything else is untouched.
| ? Lock state |
? Offhand item |
✊ Main hand |
?️ Right-click result |
| OFF |
torch |
dirt |
both place normally (vanilla) |
| ON |
torch |
dirt |
dirt places ✅ · torch is blocked ? |
| ON |
dirt |
pickaxe |
dirt places ✅ (offhand dirt isn't a light) |
| ON |
steak |
sword |
steak eats ✅ (food isn't a light) |
| OFF |
lantern |
cobble |
both place normally (vanilla) |
Notice the pattern: the mod only says "no" when all three line up — offhand, locked, and a light source. Miss any one, and Minecraft does its normal thing.
? What gets blocked
Only the obvious light sources. Blocks, tools, food, buckets — all ignored.
| Category |
Items |
| ? Torches |
Torch · Soul Torch · Redstone Torch |
| ? Lanterns |
Lantern · Soul Lantern |
⚠️ The list is vanilla-only right now. Torches/lanterns from other mods aren't blocked yet — if you want a specific one added, open an issue and I'll throw it in.
? Under the hood
Curious what "blocking" actually looks like in code? The entire decision is this short — the mod literally just asks three questions and bails out the moment any answer is "no":
if (hand != Hand.OFF_HAND) return PASS; // main hand? never touch it
if (!isLocked) return PASS; // toggle off? pure vanilla
if (!LIGHT_SOURCES.contains(item)) return PASS; // not a torch/lantern/lamp? ignore
return FAIL; // offhand + locked + light → cancel the placement
That's it. No mixins into placement logic, no server round-trips — just two Fabric events (UseBlockCallback / UseItemCallback) returning FAIL when the stars align. Lightweight by design.
? Installation
- Install Fabric Loader for Minecraft
- Drop Fabric API into your mods/ folder
- Drop nolightplace into the same mods/ folder
- Launch the game — that's it. ✅
? Client-only. The server does not need this mod. It works on any server (vanilla, Paper, modded) without anyone installing anything.
❓ FAQ
Does it work on multiplayer / servers?
Yes. It's purely client-side — install it on your client and it just works, no server mod required.
Can I change the key?
Yes. Options → Controls → Key Binds → NoLightPlace. Rebind it to whatever feels right; no restart needed.
Will it ever block my main hand?
No. By design the main hand is completely ignored. Only the offhand, only when locked, only light sources.
Does it block blocks / food / buckets in the offhand?
No. Only the light sources listed above. Your offhand dirt, steak and water bucket keep working exactly as before.
Why a toggle and not "hold to block"?
Because you set it once at the start of a mining trip and forget about it. Holding a key while also holding right-click is exactly the kind of awkwardness this mod is meant to remove.
? Links & contact
If NoLightPlace saved your tunnel from a torch infestation, a ❤️ and a follow mean the world. ?️
Found a bug or want a modded torch added? Open an issue — I actually read them.
评论 0
登录后参与评分
还没有评论,来抢沙发吧