ModelDisplay

Represents an item display entity used for rendering model parts.

This interface abstracts the NMS implementation of item displays, allowing for manipulation of position, rotation, scale, and other display properties.

Since

1.15.2

Functions

Link copied to clipboard
abstract fun billboard(@NotNull billboard: @NotNull PlatformBillboard)
Sets the billboard constraint for the display.
Link copied to clipboard
abstract fun brightness(block: Int, sky: Int)
Sets the brightness override for the display.
Link copied to clipboard
@NotNull
abstract fun createTransformer(): @NotNull DisplayTransformer
Creates a transformer for animating this display.
Link copied to clipboard
abstract fun display(@NotNull transform: @NotNull PlatformItemTransform)
Sets the item display transform type.
Link copied to clipboard
abstract fun glow(glow: Boolean)
Toggles the glowing effect.
Link copied to clipboard
abstract fun glowColor(glowColor: Int)
Sets the glow color.
Link copied to clipboard
abstract fun id(): Int
Returns the integer ID of the object (e.g., entity ID).
Link copied to clipboard
abstract fun invisible(): Boolean
Checks if this display is currently invisible.
abstract fun invisible(invisible: Boolean)
Sets the visibility of this display.
Link copied to clipboard
abstract fun item(@NotNull itemStack: @NotNull PlatformItemStack)
Sets the item stack to be displayed.
Link copied to clipboard
abstract fun moveDuration(duration: Int)
Sets the duration for position/rotation interpolation.
Link copied to clipboard
abstract fun remove(@NotNull bundler: @NotNull PacketBundler)
Removes this display.
Link copied to clipboard
abstract fun rotate(@NotNull rotation: @NotNull ModelRotation, @NotNull bundler: @NotNull PacketBundler)
Rotates this display to a specific orientation.
Link copied to clipboard
abstract fun sendDirtyEntityData(@NotNull bundler: @NotNull PacketBundler)
Sends updated entity data if it has changed.
Link copied to clipboard
abstract fun sendEntityData(showItem: Boolean, @NotNull bundler: @NotNull PacketBundler)
Sends entity data, optionally showing the item.
Link copied to clipboard
abstract fun sendPosition(@NotNull adapter: @NotNull BaseEntity, @NotNull bundler: @NotNull PacketBundler)
Sends the position of the display relative to an entity adapter.
Link copied to clipboard
abstract fun shadowRadius(radius: Float)
Sets the shadow radius of the display.
Link copied to clipboard
open fun spawn(@NotNull bundler: @NotNull PacketBundler)
Spawns this display using the provided packet bundler.
abstract fun spawn(showItem: Boolean, @NotNull bundler: @NotNull PacketBundler)
Spawns this display, optionally showing the item.
Link copied to clipboard
open fun spawnWithEntityData(@NotNull bundler: @NotNull PacketBundler)
Spawns this display and sends initial entity data.
Link copied to clipboard
abstract fun syncPosition(@NotNull location: @NotNull PlatformLocation)
Synchronizes this display's position with a location.
Link copied to clipboard
abstract fun syncPotionEffect(@NotNull entity: @NotNull BaseEntity)
Synchronizes the potion effect (glowing, etc.) from the base entity to this display.
Link copied to clipboard
abstract fun teleport(@NotNull location: @NotNull PlatformLocation, @NotNull bundler: @NotNull PacketBundler)
Teleports this display to a new location.
Link copied to clipboard
@NotNull
abstract fun uuid(): @NotNull UUID
Returns the UUID of the object.
Link copied to clipboard
abstract fun viewRange(range: Float)
Sets the view range of the display.