
kubejs_structure_preview
KubeJS 6 is an accessory module, which previews the. nbt structure file in real time with translucent texture box in MC 1.20.1 Forge.
About this Mod
这是一个KubeJS 6 的附属模组
功能:以半透明纹理方块实时预览 .nbt 结构
1.可以方便你展示预览你用kubejs自定义的预制结构。
2.能方便你向玩家展示结构,了解结构样子。
3.展示你设计的多方块结构,方便玩家搭建,类似蓝图。
提供的方法
// 显示预览
StructurePreview.show("minecraft:igloo/top", x, y, z)
// 完整参数
StructurePreview.show("minecraft:end_city/ship", x, y, z, "clockwise_90", 0.7)
// rotation: "none" | "clockwise_90" | "clockwise_180" | "counterclockwise_90"
// alpha: 0.05 ~ 1.0
StructurePreview.hide()
StructurePreview.rotate(90)
StructurePreview.setAlpha(0.5)
StructurePreview.isActive()
兼容性
Embeddium / Oculus / Rubidium — 等兼容
代码案例
// server_scripts
// 手持木棍右键方块 → 渲染原版冰屋结构幽灵预览
// Ctrl+滚轮旋转 | 再右键切换隐藏
let STRUCTURE = "minecraft:igloo/top"
BlockEvents.rightClicked(event => {
let player = event.player
let item = event.item
if (event.hand !== "MAIN_HAND" || !item || item.id !== "minecraft:stick") return
let pos = event.block.pos.above()
if (StructurePreview.isActive()) {
StructurePreview.hide()
player.displayClientMessage("预览已隐藏", true)
return
}
if (StructurePreview.show(STRUCTURE, pos.getX(), pos.getY(), pos.getZ())) {
player.displayClientMessage(`${STRUCTURE} 预览 | Ctrl+滚轮旋转`, true)
}
})
Structure Preview —— KubeJS 6 Addon for Ghost Structure Previews
This is an addon for KubeJS 6.
Function: Real-time preview of .nbt structures with semi-transparent ghost blocks.
- Preview your custom KubeJS structures during development.
- Show structures to players so they can see what they look like.
- Display multiblock designs as blueprints for players to build.
Available Methods:
// Show preview
StructurePreview.show("minecraft:igloo/top", x, y, z)
// Full parameters
StructurePreview.show("minecraft:end_city/ship", x, y, z, "clockwise_90", 0.7)
// rotation: "none" | "clockwise_90" | "clockwise_180" | "counterclockwise_90"
// alpha: 0.05 ~ 1.0
StructurePreview.hide()
StructurePreview.rotate(90)
StructurePreview.setAlpha(0.5)
StructurePreview.isActive()
Compatibility:
Embeddium / Oculus / Rubidium compatible.
Code Example:
// server_scripts
// Right-click a block with a stick -> renders igloo ghost preview
// Ctrl+Scroll to rotate | Right-click again to toggle hiding
let STRUCTURE = "minecraft:igloo/top"
BlockEvents.rightClicked(event => {
let player = event.player
let item = event.item
if (event.hand !== "MAIN_HAND" || !item || item.id !== "minecraft:stick") return
let pos = event.block.pos.above()
if (StructurePreview.isActive()) {
StructurePreview.hide()
player.displayClientMessage("Preview hidden", true)
return
}
if (StructurePreview.show(STRUCTURE, pos.getX(), pos.getY(), pos.getZ())) {
player.displayClientMessage(${STRUCTURE} preview | Ctrl+Scroll to rotate, true)
}
})
Available Versions
How to Install kubejs_structure_preview on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set forge Loader
In the panel under "Egg", select the forge loader and matching Minecraft version (1.20.1).
Install Mod
Open the mod browser in the dashboard and search for "kubejs_structure_preview". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
1.20.1
Server-side
✓ RequiredRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
kubejs_structure_preview server crashes on startup – what to do?
Most common cause: wrong forge version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.20.1). You can switch loaders with one click in the panel.
Is kubejs_structure_preview compatible with forge?
kubejs_structure_preview officially supports forge for Minecraft 1.20.1. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with kubejs_structure_preview – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if kubejs_structure_preview consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install kubejs_structure_preview with just one click on your server.