建筑法杖(Builder’s Wands)

基本信息

属性 值
注册名 builders_wand / super_builders_wand
共用类 com.fouristhenumber.utilitiesinexcess.common.items.ItemBuildersWand(2 个注册共用同一个类)
数量 2
开关 BuildersWandsConfig.INSTANCE.enableBuildersWand / enableSuperBuildersWand(2 个独立开关)
显示名 两者共用 item.builders_wand.name

功能

两把法杖共用 ItemBuildersWand 一个类,靠构造参数 buildLimit 区分建造上限。普通法杖一次放置 9 个方块(3×3),超级法杖一次放置 49 个(7×7)。

法杖还有一个创造模式建造上限(buildersWandCreativeBuildLimit),只在创造模式下放宽——生存模式仍用 buildLimit。

法杖支持用**铲子(trowel)**做伤害,伤害值由 damageTrowelWithBuildersWand 控制。铲子的来源有两条:Tinkers’ Construct(Mods.Tinkers)与 Backhand 副手模组(Mods.Backhand)。建造器还支持识别 GregTech 5 的 MetaGeneratedTool + ToolTrowel 工具类型(BuildersSelection.java:98-99)。

数值

配置项 默认值 说明
buildersWandBuildLimit 9 普通法杖建造上限(3×3)
superBuildersWandBuildLimit 49 超级法杖建造上限(7×7)
buildersWandCreativeBuildLimit 200 创造模式建造上限
damageTrowelWithBuildersWand 100 铲子伤害(1.0 = 1 颗心)

来源:BuildersWandsConfig.java:16-41。两个 enable 开关默认全为 true。

显示名缺陷(可核实):ItemBuildersWand 构造函数无条件调用 setUnlocalizedName("builders_wand")(ItemBuildersWand.java:43),而 en_US.lang 中没有 item.super_builders_wand.name 条目。因此两把法杖在游戏内显示同一个名字 “Builder’s Wand”,只能靠材质(super_builders_wand 独立纹理)和 tooltip 中的建造上限数字(uie.desc.item.builders_wand.1)区分。超级法杖通过 setTextureName("utilitiesinexcess:super_builders_wand") 获得独立纹理(ModItems.java:75)。

tooltip 使用 EnumChatFormatting.AQUA 着色并本地化键 uie.desc.item.builders_wand.1(ItemBuildersWand.java:49-53)。

交互

触发 行为
右键方块 以法杖为中心放置 buildLimit 个方块(3×3 或 7×7)
创造模式 建造上限放宽到 buildersWandCreativeBuildLimit(200)
客户端 tick onUpdate 中在客户端处理预览(ItemBuildersWand.java:58)
装备铲子 按 damageTrowelWithBuildersWand 造成伤害

耐久:setMaxDamage(0)(ItemBuildersWand.java:44),可确认两把法杖都不消耗耐久。

合成配方

产物 开关
builders_wand RecipeConfig.enableBuildersWandRecipe
super_builders_wand RecipeConfig.enableSuperBuildersWandRecipe

两个开关默认全为 true。

相关条目