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<out Any>, @NotNull bones: Array<@NotNull RenderedBone>)
Creates a new render pipeline.
Functions
Link copied to clipboard
open fun addGlobalRotModifier(@NotNull predicate: @NotNull BonePredicate, @NotNull mapper: @NotNull (Quaternionf) -> Quaternionf): Boolean
Adds a global rotation modifier to matching bones.
Link copied to clipboard
open fun addLocalRotModifier(@NotNull predicate: @NotNull BonePredicate, @NotNull mapper: @NotNull (Quaternionf) -> Quaternionf): Boolean
Adds a local rotation modifier to matching bones.
Link copied to clipboard
open fun addPositionModifier(@NotNull predicate: @NotNull BonePredicate, @NotNull mapper: @NotNull (Vector3f) -> Vector3f): Boolean
Adds a position modifier to matching bones.
Link copied to clipboard
Returns a stream of all players viewing this model.
Link copied to clipboard
Retrieves a bone by its name.
Link copied to clipboard
Returns a collection of all bones in this pipeline.
Link copied to clipboard
Retrieves the 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.
Link copied to clipboard
Sets the default position modifier for all bones.
Link copied to clipboard
Adds a handler for despawn packets.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Finds the first non-null result of applying a mapper to all bones.
Link copied to clipboard
Link copied to clipboard
Hides the model 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 for hide packets.
Link copied to clipboard
Checks if the model is hidden from a specific player.
Link copied to clipboard
Link copied to clipboard
open fun matchAnimation(@NotNull mapper: @NotNull BiPredicate<RenderedBone, AnimationOverrideState>): Boolean
Applies a mapper to bones matching an animation predicate.
Link copied to clipboard
Checks if any bones match a predicate.
open fun matchTree(@NotNull predicate: @NotNull BonePredicate, mapper: BiPredicate<RenderedBone, BonePredicate>): Boolean
Applies a mapper to bones matching a predicate.
Link copied to clipboard
Returns a stream of players who are not hidden and pass the view filter.
Link copied to clipboard
Returns the number of players currently viewing this model.
Link copied to clipboard
Removes the model for a player.
Link copied to clipboard
open fun rotate(@NotNull rotation: @NotNull ModelRotation, @NotNull bundler: @NotNull PacketBundler): Boolean
Rotates the model to a new orientation.
Link copied to clipboard
Retrieves the currently running animation, if any.
Link copied to clipboard
Scales the model.
Link copied to clipboard
Shows the model to a specific player (if previously hidden).
Link copied to clipboard
Adds a handler for show packets.
Link copied to clipboard
@ApiStatus.Internal
Spawns the model for a player.
Link copied to clipboard
Adds a handler for spawn packets.
Link copied to clipboard
Link copied to clipboard
Returns a sequential
Stream with the flattened bones as its source.Link copied to clipboard
Ticks the model, updating animations and IK.
Ticks the model for a specific player (e.g., for per-player animations).
Link copied to clipboard
Returns a stream of players who pass the view filter (regardless of hidden status).
Link copied to clipboard
Adds a filter to restrict which players can view the model.