Prefab Deploy

Player can preview and build saved structures with a Building Tool. Configure building libraries, unlock requirements and costs through datapacks.

Prefab Deploy

Prefab Deploy is a mod that makes it easy for modpack authors to provide players with prefabricated buildings. Players can use the Building Tool to select a building template and construct it after meeting the required conditions and paying the specified costs.

Use

Craft a Building Tool, or take one from the Prefab Deploy creative tab.

Hold the tool and right-click to open the building library. Select a building. Drag the preview on the right to rotate it, or scroll to zoom.

Crosshair placement

Press R to rotate clockwise by 90°.

Right-click inside the preview frame to fix the position and wait for validation. Once validation passes, right-click inside the frame again to build.

Right-click outside the frame to cancel placement. While holding the Building Tool or a Positioning Beacon, use Shift+right-click to cancel in any direction. Construction cannot be cancelled after it starts.

Doors, windows, and empty spaces inside the preview frame also count as valid targets. Normal right-click confirmation is unavailable while the preview is loading. Yellow means validation is pending, green means it passed, and red means it failed. If validation fails, right-click inside the frame to reposition the building.

Three-beacon placement

This mode uses actual Positioning Beacons. Place A, B, and C in that order. All three must be at the same height. B defines the positive X direction, and C defines the positive Z direction. The boundary distance from A to B must equal the building width. The boundary distance from A to C must equal the building depth.

Hold a beacon and right-click a block to place it normally. Right-click in the air to place a floating beacon. Use Shift+scroll to adjust the floating distance. After placing all three beacons, switch back to the Building Tool. Two right-click confirmations are still required. If you switch back to the tool and right-click before all three beacons have been placed, placement is cancelled.

In survival mode, the costs defined for the building are charged. Creative mode does not consume resources or require other payments, but rules and position permissions are still checked. After successful construction, the Positioning Beacons are removed and the beacons actually consumed are returned. If placement is cancelled, placed beacons can be broken and recovered manually.

While idle, hold the Building Tool and Shift+right-click a container to bind it as a material source. The item tooltip shows a gray usage hint and, after binding, the source coordinates and dimension. Each Building Tool stores its own binding. While idle, Shift+right-click in the air to clear the binding; during placement, the same action still cancels placement. Supported sources include vanilla chests and barrels, Sophisticated Storage, and the entire ME network connected through an AE2 terminal or interface.

Adding buildings

Blueprints

Click Open blueprint folder in the building library. Put files in the instance's prefabdeploy/blueprints/ directory. Reopen the building library to load new or modified files. Subdirectories are also scanned.

Supported formats are .litematic versions 5–7 and vanilla structure .nbt. Create files must follow the vanilla structure NBT format. Files must use Minecraft 1.21.1 DataVersion 3955. .schem is not supported, and older blueprints are not converted.

Local buildings use the filename as their default name. The lowest layer is used as the ground reference. Air overwrites existing blocks. In survival mode, building material costs are calculated automatically. For buildings with underground sections, the ground reference can be adjusted through datapacks or KubeJS. Manual costs and rules can also be configured through these interfaces.

Local imports are available only in singleplayer or to the LAN host. LAN guests cannot see the host's local buildings. When connected to a dedicated server, the folder button is disabled. Only server-provided blueprints are available.

Datapacks

Put building datapacks in the world's datapacks/ folder. Administrators can run /prefab reload in game. From the server console, run prefab reload.

The command requires permission level 2. It discovers newly added datapacks and reloads building definitions, blueprints, costs, and conditions. KubeJS registry events are applied again. The new catalog is used for later selections. Active placement sessions and construction tasks keep their existing snapshots.

The command reports when reloading starts, completes, or fails. When it completes, it displays the number of buildings and unavailable entries. Invalid blueprints become unavailable entries without preventing other buildings from loading. Failure details are written to the server log. Another reload cannot be started while one is already running.

In singleplayer or on a LAN host, running this command also refreshes local blueprints, but it does not reload the server TOML configuration.

Mod integrations

FTB Quests and FTB Chunks(unlocking buildings and land claim protection)

ViScriptShop currency

KubeJS provides additional customization interfaces.

Most of the work on this mod was done by AI, so compatibility or stability issues may occur. To create or edit building datapacks more quickly, ask an AI agent to read the repository's AGENTS.md.

预制建筑

Prefab Deploy 是一个方便整合包作者给玩家提供预制建筑的mod。玩家可用建筑建造工具选择满足一定条件/消耗一定资源用预制的建筑模板进行建造。

使用

合成建筑建造工具,或从创造模式的“预制建筑”标签页取出工具。

持工具右键打开建筑库。选择建筑。拖动右侧预览可旋转,滚轮可缩放。

准星定位

按 R 顺时针旋转 90°。

对着预览外框内右键,固定位置并等待验证。验证通过后,再对外框内右键建造。

对外框外右键取消定位。持工具或信标时,Shift+右键 可向任意方向取消。施工开始后不能取消。

预览外框内的门窗和空隙也算命中。预览加载期间不接受普通右键确认。黄色表示等待验证,绿色表示通过,红色表示失败。验证失败时,对外框内右键可重新定位。

三点信标定位

使用实际的位置信标定位。依次放置 A、B、C。三点必须同高。B 指定正 X 方向,C 指定正 Z 方向。A 到 B 的边界距离等于建筑宽度。A 到 C 的边界距离等于建筑深度。

持信标对方块右键可常规放置。对空气右键可浮空放置。Shift+滚轮 调整浮空距离。放完三点后换回工具,仍需两次右键确认。三点尚未放完时,换回工具右键会取消定位。

生存模式按建筑定义收取费用。创造模式无需消耗资源或支付其他费用,但仍检查规则和位置权限。建造成功后移除位置信标,并返还实际消耗的信标。取消定位后,已放置的信标可手动拆回。

空闲时,持建筑建造工具对容器 Shift+右键 绑定材料来源。物品提示显示灰色操作说明,绑定后显示坐标和维度。每把工具保存自己的绑定。空闲时对空气 Shift+右键 清除绑定;定位期间仍用于取消定位。支持原版箱子、木桶、精妙储存和 AE2 终端或接口连接的整个 ME 网络。

添加建筑

蓝图

在建筑库点击“打开蓝图文件夹”。将文件放入实例目录的 prefabdeploy/blueprints/。重新打开建筑库后读取新增或修改的文件。子目录也会读取。

支持 .litematic 格式版本 5–7 和原版结构 .nbt。Create 文件必须符合原版结构 NBT 格式。文件必须使用 Minecraft 1.21.1 的 DataVersion 3955。不支持 .schem,也不转换旧版蓝图。

本地建筑默认使用文件名作为名称。参考层为最低层。空气会覆盖原方块。生存模式自动计算建筑材料。有地下结构时,可通过数据包或 KubeJS 调整参考层。手动费用和规则也可通过这些接口配置。

本地导入仅向单人玩家或局域网主机开放。局域网加入者看不到主机的本地建筑。连接服务器时,文件夹按钮禁用。只能使用服务端蓝图。

数据包

将建筑数据包放入世界的 datapacks/。管理员在游戏中执行 /prefab reload。服务器控制台执行 prefab reload。

该命令需要权限等级 2。它发现新增数据包,并重读建筑定义、蓝图、费用和条件。KubeJS 注册事件会重新应用。新目录供后续选择使用。活动定位和建造保留原快照。

命令执行会显示开始、完成或失败状态。完成时显示建筑数量和不可用数量。坏蓝图会成为不可用条目,不阻止其他建筑读取。失败细节写入服务器日志。重载期间不能再次启动同一命令。(单人世界或局域网主机执行该命令时,也会刷新本地蓝图,但不会重读服务器 TOML 配置。)

联动mod

FTB 任务和区块(任务解锁建筑和区块保护)

ViScriptShop 货币

Kubejs 提供了部分可编辑接口

本mod大部分工作由ai完成,可能存在兼容性或稳定性问题。为方便快速编辑数据包可让agent读取仓库agent.md

Prefab Deploy Team

profile avatar
  • 2
    Projects
  • 130
    Downloads

More from wuhanhao