window
context(tileEntity: TileEntity)
fun window(texture: RegistryEntry.Nova<GuiTexture>? = null, bounds: AABBdc = tileEntity.block.toAABBd(), window: NormalSplitWindowDsl.() -> Unit): TileEntityMenu
fun window(texture: RegistryEntry.Nova<GuiTexture>? = null, bounds: AABBdc = tileEntity.block.toAABBd(), window: NormalSplitWindowDsl.() -> Unit): TileEntityMenu
Shortcut for creating a TileEntityMenu using the standard WindowDsl with an optional texture that automatically sets the title text to the tile entity's block name. Any window opened under the menu will be automatically closed once the viewer is out of the interaction range with bounds.
Equivalent to:
MenuContainer.from { viewer ->
window(viewer) {
if (texture != null) {
title by texture.getTitle([tileEntity.block.name], locale)
} else {
title by tileEntity.block.name
}
window()
}
}Content copied to clipboard
context(tileEntity: TileEntity)
fun <T : WindowDsl> window(windowDsl: (Player, T.() -> Unit) -> Window, texture: RegistryEntry.Nova<GuiTexture>? = null, bounds: AABBdc = tileEntity.block.toAABBd(), window: T.() -> Unit): TileEntityMenu
fun <T : WindowDsl> window(windowDsl: (Player, T.() -> Unit) -> Window, texture: RegistryEntry.Nova<GuiTexture>? = null, bounds: AABBdc = tileEntity.block.toAABBd(), window: T.() -> Unit): TileEntityMenu
Shortcut for creating a TileEntityMenu using WindowDsl of a custom type with an optional texture that automatically sets the title text to the tile entity's block name. Any window opened under the menu will be automatically closed once the viewer is out of the interaction range with bounds.
Equivalent to:
MenuContainer.from { viewer ->
windowDsl(viewer) {
if (texture != null) {
title by texture.getTitle([tileEntity.block.name], locale)
} else {
title by tileEntity.block.name
}
window()
}
}Content copied to clipboard