火把变体(Torch Variants)
Chisel 注册 10 个可雕刻火把方块 chisel:torch1 … chisel:torch10,全部并入 torch 雕刻组,与原版火把一起循环。
基本信息
| 属性 | 值 |
|---|---|
| 注册名 | chisel:torch1 … chisel:torch10 |
| 类 | team.chisel.block.BlockCarvableTorch extends BlockTorch |
| 发光等级 | setLightLevel(0.9375F) ⇒ 实际 15(与原版火把相同) |
| 方块名 | setBlockName("torch") —— 10 个方块共用同一个未本地化名 |
| 构造签名 | BlockCarvableTorch(int idx, String tex),idx 即 0–9 |
| 贴图 | chisel:torch/<tex>,其中 tex 就是注册名("torch" + (type + 1)) |
| 创意标签 | ChiselTabs.tabOtherChiselBlocks |
| 数组字段 | ChiselBlocks.torches = new BlockCarvableTorch[16] |
| 雕刻组 | torch(11 成员:原版 + 10 个) |
| ItemBlock | 有 ForgeMultipart 时为 ItemBlockChiselTorchPart,否则默认 |
数值
| 属性 | 值 | 来源 |
|---|---|---|
| 注册方块数 | 10(for (int type = 0; type < 10; type++)) |
Features.java TORCH 常量 |
| 数组长度 | 16 ⇒ torches[10]–torches[15] 永远为 null |
init/ChiselBlocks.java |
| 组内 order | 原版火把 0,torch1–torch10 为 1–10 |
Carving.chisel.addVariation("torch", …, 0, type + 1) |
| 发光等级 | 0.9375F(= 光照 15) | BlockCarvableTorch 构造器 |
| 关闭粒子的变体 | torch9(type 8)与 torch10(type 9) |
if (type == 8 || type == 9) t.disableParticles(); |
⚠️
ChiselBlocks.torches数组声明为 16 但只填 10 个。torches[10]到torches[15]恒为null。数组长度是@ObjectHolder时代的历史遗留,源码里没有任何代码读这 6 个空位。这是上游行为,本条目如实记录。
粒子
BlockCarvableTorch.randomDisplayTick(客户端)根据 方块 metadata 决定火焰/烟的偏移方向:
| metadata | 偏移方向 |
|---|---|
| 1 | -x(d0 - d4) |
| 2 | +x(d0 + d4) |
| 3 | -z(d2 - d4) |
| 4 | +z(d2 + d4) |
| 其它(含 0 / 5–15) | 正上方(d0, d1, d2) |
每个偏移方向同时生成一对 smoke 与 flame 粒子。torch9 / torch10 的 emitsParticles = false,整个 randomDisplayTick 不执行。
交互
| 触发 | 行为 |
|---|---|
| 左键雕刻刀点击原版火把 | 在 11 个贴图间循环 |
| 放置 | 沿用 BlockTorch 的全部行为(贴墙判定、掉落火把物品) |
| ForgeMultipart 存在 | 用 GameRegistry.registerBlock(t, ItemBlockChiselTorchPart.class, name, t) 注册,物品可拆成 multipart 部件 |
| ForgeMultipart 不存在 | GameRegistry.registerBlock(t, name),普通方块物品 |
合成配方
TORCH 常量没有 addRecipes() ⇒ Chisel 不提供任何合成配方。组内只通过 Carving.chisel.registerOre("torch", "torch") 注册 OreDict 名 torch。