Companion
Functions
fun cachedWindow(texture: RegistryEntry.Nova<GuiTexture>? = null, bounds: AABBdc = tileEntity.block.toAABBd(), expireAfterClose: Duration = 1.minutes, 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 and is cached with expireAfterClose. Any window opened under the menu will be automatically closed once the viewer is out of the interaction range with bounds.
fun <T : WindowDsl> cachedWindow(windowDsl: (Player, T.() -> Unit) -> Window, texture: RegistryEntry.Nova<GuiTexture>? = null, bounds: AABBdc = tileEntity.block.toAABBd(), expireAfterClose: Duration = 1.minutes, 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 and is cached with expireAfterClose. Any window opened under the menu will be automatically closed once the viewer is out of the interaction range with bounds.
fun from(bounds: AABBdc = tileEntity.block.toAABBd(), getWindow: (Player) -> Window): TileEntityMenu
Create a new TileEntityMenu that uses getWindow to get the main window for the given Player. getWindow may create a new window each time or re-use existing windows. Any window opened under the menu will be automatically closed once the viewer is out of the interaction range with bounds.
fun none(bounds: AABBdc = tileEntity.block.toAABBd()): TileEntityMenu
Creates a new TileEntityMenu that has no main window, but can still track other windows. The open function of the returned container will never open a window and always return false. Any window opened under the menu will be automatically closed once the viewer is out of the interaction range with bounds.
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.
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.