RenderPipeline
Represents the rendering pipeline for a specific model instance.
This class manages the hierarchy of RenderedBones, handles player visibility and packet bundling, and coordinates animation updates and inverse kinematics (IK) solving.
Since
1.15.2
Constructors
Link copied to clipboard
constructor(@NotNull parent: @NotNull ModelRenderer, @NotNull source: @NotNull RenderSource<*>, @NotNull bones: Array<@NotNull RenderedBone>)
Creates a new render pipeline for a model renderer and root bones.
Functions
Link copied to clipboard
open fun addGlobalRotModifier(@NotNull predicate: @NotNull BonePredicate, @NotNull mapper: @NotNull (Quaternionf) -> Quaternionf): Boolean
Adds a global rotation modifier to bones matching the given predicate.
Link copied to clipboard
open fun addLocalRotModifier(@NotNull predicate: @NotNull BonePredicate, @NotNull mapper: @NotNull (Quaternionf) -> Quaternionf): Boolean
Adds a local rotation modifier to bones matching the given predicate.
Link copied to clipboard
open fun addPositionModifier(@NotNull predicate: @NotNull BonePredicate, @NotNull mapper: @NotNull (Vector3f) -> Vector3f): Boolean
Adds a position modifier to bones matching the given predicate.
Link copied to clipboard
Returns a stream of channel handlers for all players for whom the model is spawned.
Link copied to clipboard
Retrieves a rendered bone by its name.
Link copied to clipboard
Returns an unmodifiable collection of all rendered bones in this pipeline.
Link copied to clipboard
Retrieves the network channel handler for a specific player.
Link copied to clipboard
Creates an animation packet bundler based on configuration.
Link copied to clipboard
Creates a packet bundler for this pipeline sized to hold all display entities.
Link copied to clipboard
Sets the default position modifier for all bones in the pipeline.
Link copied to clipboard
Adds a handler invoked when despawn packets are bundled.
Link copied to clipboard
Returns the bone event dispatcher used to register and trigger bone lifecycle events.
Link copied to clipboard
Link copied to clipboard
Finds the first non-null result of applying a mapping function across all flattened bones.
Link copied to clipboard
Performs the given action for each rendered bone in this pipeline.
Link copied to clipboard
Performs the given action for each player channel handler for whom the model is spawned.
Link copied to clipboard
Performs the given action for each player channel handler who has finished initial load and is not hidden.
Link copied to clipboard
Performs the given action for each player channel handler who passes the view filter.
Link copied to clipboard
Hides the model and its hitboxes from a specific player.
Link copied to clipboard
Adds a filter to determine if a player should be hidden from the model.
Link copied to clipboard
Adds a handler invoked when hide packets are bundled for a player.
Link copied to clipboard
Checks if the model is hidden from a specific player.
Link copied to clipboard
Returns an iterator over the rendered bones in this pipeline.
Link copied to clipboard
open fun matchAnimation(@NotNull mapper: @NotNull BiPredicate<RenderedBone, AnimationOverrideState>): Boolean
Applies an animation override evaluation to all bone hierarchies.
Link copied to clipboard
Checks if any bone in the flattened hierarchy matches the given predicate.
open fun matchTree(@NotNull predicate: @NotNull BonePredicate, @NotNull mapper: @NotNull BiPredicate<RenderedBone, BonePredicate>): Boolean
Applies a matching predicate function to bones matching the given bone predicate.
Link copied to clipboard
Returns a stream of players who have finished initial load and are not hidden.
Link copied to clipboard
Returns the number of players for whom the model is currently spawned.
Link copied to clipboard
Removes the model for a player and sends despawn packets immediately.
Link copied to clipboard
open fun rotate(@NotNull rotation: @NotNull ModelRotation, @NotNull bundler: @NotNull PacketBundler): Boolean
Rotates the model to a new orientation and bundles transformation packets.
Link copied to clipboard
Retrieves the currently running animation across bones, if any.
Link copied to clipboard
Sets the scale supplier for all bones in the pipeline.
Link copied to clipboard
open fun send(@NotNull context: @NotNull KeyframeRuntimeContext, @NotNull bundler: @NotNull AnimationBundler)
Solves inverse kinematics (IK) and bundles the current bone transformations into the given bundler.
Link copied to clipboard
Shows the model and its hitboxes to a specific player if previously hidden.
Link copied to clipboard
Adds a handler invoked when show packets are bundled for a player.
Link copied to clipboard
@ApiStatus.Internal
Spawns the model for a player and bundles initial packets.
Link copied to clipboard
Adds a handler invoked when spawn packets are bundled.
Link copied to clipboard
Returns a spliterator over the flattened rendered bones in this pipeline.
Link copied to clipboard
Returns a sequential
Stream with the flattened bones as its source.Link copied to clipboard
open fun tick(@NotNull context: @NotNull KeyframeRuntimeContext, @NotNull uuid: @NotNull UUID, @NotNull bundler: @NotNull AnimationBundler): Boolean
Ticks the model for a specific player, updating per-player animations, solving IK, and bundling transformations.
Link copied to clipboard
Returns a stream of player channel handlers who pass the view filter (regardless of hidden status).
Link copied to clipboard
Adds a filter to restrict which players can view the model.