Skip to content

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.

Forge
Loaders
Forge
Downloads on Modrinth
18.3K
Followers on Modrinth
2
version
1
Updated
June 20, 2026Jun 20
Published
in 2026

At a glance

Runs on Forge
For Minecraft 1.20.1
Needed in the game and on the server
Latest version — 1.0.0-Forge1.20.1 from June 20, 2026
Requires KubeJS
License BSD-2-Clause — free
Where it's needed
In gamerequiredOn serverrequired

Needed both in the game and on the server

Game versions1.20.1

这是一个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.

  1. Preview your custom KubeJS structures during development.
  2. Show structures to players so they can see what they look like.
  3. 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) } })

FAQ

How to install kubejs_structure_preview?

Install Forge for your Minecraft version, download kubejs_structure_preview for the same version and loader, put the file into the mods folder and launch the game with the loader profile.

Which Minecraft versions does kubejs_structure_preview support?

kubejs_structure_preview has builds for Minecraft 1.20.1.

Is kubejs_structure_preview needed on the server?

Needed in the game and on the server

License and source
BSD 2-Clause "Simplified" Licensefree to use and share with credit to the author
Original — Modrinth↗Files unchanged, verified with SHA-512Is this your mod? For rights holders

The site uses cookies: the necessary ones for sign-in and the theme, plus the Yandex Metrica and LiveInternet visit counters — they show us how the site is used. We have no advertising cookies. More