MinecraftComposeGui

class MinecraftComposeGui(    val blockWidth: Int,     val blockHeight: Int,     val content: @Composable BoxScope.(gui: MinecraftComposeGui) -> Unit,     val player: ServerPlayer,     val position: BlockPos) : CoroutineScope

A server-side gui making use of Compose and Compose UI. You may create this gui using displayComposable. Internally, the gui is rendered on maps, which are placed inside invisible item frames. Everything only happens through packets, therefore the gui does not really exist on the server. If you want to remove this gui, call the close function.

Constructors

Link copied to clipboard
fun MinecraftComposeGui(    blockWidth: Int,     blockHeight: Int,     content: @Composable BoxScope.(gui: MinecraftComposeGui) -> Unit,     player: ServerPlayer,     position: BlockPos)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun close()

Safely removes this gui. This function will be called automatically if the server shuts down.

Properties

Link copied to clipboard
val blockHeight: Int
Link copied to clipboard
val blockWidth: Int
Link copied to clipboard
val content: @Composable BoxScope.(gui: MinecraftComposeGui) -> Unit
Link copied to clipboard
open override val coroutineContext: ExecutorCoroutineDispatcher
Link copied to clipboard
val player: ServerPlayer
Link copied to clipboard
val position: BlockPos

Sources

Link copied to clipboard