
Modern, automated electrical grids for NeoForge.
NeoGrid registers a neogrid:electric_pole block builder type for KubeJS. Place scripts in kubejs/startup_scripts/.
StartupEvents.registry('block', event => {
event.create('kubejs:my_pole', 'neogrid:electric_pole')
.transferRate(5000) // FE/tick, default 1000
.connectionRange(20) // blocks, default 10
.wireColorHex(0xFF3333) // hex color
.displayName('My Pole')
})
| Method | Params | Description |
|---|---|---|
transferRate(rate) |
int |
Max energy transfer rate (FE/tick) |
connectionRange(range) |
int |
Auto-connection scan radius (blocks) |
wireColor(r, g, b) |
float, float, float (0.0~1.0) |
Wire color as RGB floats |
wireColorHex(hex) |
int (e.g. 0xFF0000) |
Wire color as hex |
All standard KubeJS BlockBuilder methods (displayName, hardness, resistance, mapColor, tag, etc.) are also available.
See docs/kubejs-integration.md for full examples.
NeoForge 平台的现代化自动化电网模组。
NeoGrid 注册了 neogrid:electric_pole 方块构建器类型。将脚本放在 kubejs/startup_scripts/ 下。
StartupEvents.registry('block', event => {
event.create('kubejs:my_pole', 'neogrid:electric_pole')
.transferRate(5000) // FE/tick,默认 1000
.connectionRange(20) // 方块数,默认 10
.wireColorHex(0xFF3333) // 十六进制颜色
.displayName('My Pole')
})
| 方法 | 参数 | 说明 |
|---|---|---|
transferRate(rate) |
int |
最大能量传输速率(FE/tick) |
connectionRange(range) |
int |
自动连接扫描半径(方块数) |
wireColor(r, g, b) |
float, float, float(0.0~1.0) |
RGB 浮点值设置电线颜色 |
wireColorHex(hex) |
int(如 0xFF0000) |
十六进制设置电线颜色 |
所有 KubeJS 标准 BlockBuilder 方法(displayName、hardness、resistance、mapColor、tag 等)均可使用。