azurelib-neo-26.3-4.1.3.jar
Curse Maven Snippet
What's new
v4.1.3
Additions
- Added
AzHitboxHolder#onHitboxDamaged, called on the server once a hitbox hit's damage has been accepted (after invulnerability frames andisInvulnerableTo). Use it for per-hitbox state such as limb health, which shouldn't change on hits that vanilla rejects. - Added
AzRenderLayer#reRenderWithAnimatedBakedModel, an opt-in variant ofreRenderWithBakedModelfor overlays with bones of their own that need animating. The overlay gets its own animator per animatable and receives every command sent to the animatable. Each frame, before it animates, its controllers are aligned with the base controllers of the same name (sequence, origin side, stage, repeat count, direction and progress), so overlay-only bones stay frame-exact with the base animation, including when the overlay is created mid-animation or wasn't rendered for a while. - Added
AzAnimationContext#linkedAnimators()andAzAnimationContext#attachments(), plusAzAnimator#forEachLinkedAnimator. Commands dispatched to an animatable (client, entity packet and block entity packet) are now also applied to its linked animators. - Added
AzAbstractAnimationController#currentSequence()and#currentSequenceOrigin(),AzAnimationController#mirrorSequence(plays a sequence without the server-sequence priority check, for making one controller follow another) andAzAnimationQueue#copyFrom. - Added opt-in translucency sorting for renderers:
setTranslucencySorting(true)on any renderer config builder sorts all of an animatable's translucent geometry back to front together, across the model, its render layers, re-renders and bones with their own render type. Fixes translucent parts drawn in one pass hiding translucent parts of another pass behind them, such as an inner translucent layer vanishing behind an outer translucent shell. AsetTranslucencySorting(Predicate<RenderType>)overload chooses which render types are sorted, for custom translucent render types vanilla doesn't sort. - Added
AzRenderLayer#sortsTranslucency()(defaulttrue), so layers drawn over the model's own surfaces can opt out of sorting. Opted-out layers still draw after the sorted geometry, in order. - Added
AzRendererPipelineContext#setMultiBufferSource. - Added
AzHitboxHolder#isHitboxEnabled(AzHitbox)to enable or disable individual bone hitboxes at runtime. Disabled hitboxes keep tracking their bone but are ignored by targeting, projectiles, melee and interaction checks. - Animated overlay layers (
reRenderWithAnimatedBakedModel) now work on items. Commands sent withsendForItemalso reach the overlay animators of the views they target, and each item view (default, first person) keeps its own overlay animator - Molang: strings (
'minecraft:zombie'), compared with f==and!=. String contents keep their case. - Molang: arrays and indexing (
array.skins[v.variant]) with Bedrock's index rules: floored, negative reads the first element, past the end wraps around. Registerarray.*names withMolangParser#registerArray. - Molang:
for_each(variable, array, { ... }), withbreakandcontinue. - Molang: the arrow operator (
t.pig->q.health) for reading another entity's queries andvariable.*values. - Molang:
this, which in a keyframe is the value the bone channel currently holds, somath.lerp(this, 45, 0.2)eases a bone toward a pose. - Molang:
variable.*andtemp.*can hold strings, arrays and entity references. Code can set them withMolangScope#setObject. - Added Molang queries
query.has_target,query.target_x_rotationandquery.target_y_rotation. ImplementAzMolangTargetProvideron your entity to supply the target on the client. - Added Molang queries
query.get_nearby_entities,query.get_nearby_entities_except_self,query.count,query.get_equipped_item_name,query.is_item_name_any,query.equipped_item_any_tag,query.equipped_item_all_tagsandquery.is_name_any. query.is_item_equippednow also accepts'main_hand'and'off_hand'.- Item animations now answer entity queries for the entity holding the item, like Bedrock attachables.
- Added a procedural pose API for posing bones from code on top of the animated pose. Register modifiers in the new
AzAnimator#registerPoseModifiers, or add and remove them later throughAzAnimator#getPoseModifiers(). Modifiers run every frame after the controllers, the bone reset pass andsetCustomAnimations, in priority order, and their writes are undone before the next frame's controllers run, so additive offsets never accumulate and nothing pops when a modifier stops. - Added
AzPoseModifierRegistryandAzPoseModifierEntry. Each modifier has an id, a priority, anAzBoneMasklimiting which bones it may write, and a default weight. - Added
AzPoseContextandAzPoseBone, what a modifier works with. Bones can be read as their bind pose, their animated pose (controllers only) or their current pose (including earlier modifiers), and written additively (rotate,rotateDegrees,translate,scale) or absolutely (setRotation,setPosition,setScale,set,resetToBind,resetToAnimated). Every write is scaled by the modifier's weight. The context also givesdeltaTicks,isDiscontinuousand per-animatable modifier state throughstate(Supplier). - Added
AzAnimationContext#poseLayer(), which controls pose modifiers per animatable:setWeight,fadeWeight,getWeight,resetStateandresetAllState. - Added built-in pose modifiers in
AzPoseModifiers:headLook(split across several bones such as neck and head, with limits andinvertYaw/invertPitch),sway,followRotationandspring(frame-rate independent secondary motion for tails, ears and antennae). - Added
AzBoneTransform, a reusable position/rotation/scale value for saving, restoring, blending and copying bone poses, andAzTransformMathwith the blend rules shared by controllers and pose modifiers. - Added
AzBone#setTransformUnmarked, which sets a bone's transform without marking its channels as changed. - Added
AzProfileStage.POSE_MODIFIERS, reported around the pose modifier pass. - Added inverse kinematics as pose modifiers, so feet, hands and heads adapt to their surroundings after the authored animation.
AzIkChainsolves a chain of bones towards anAzIkTargetevery frame and blends the result in by the modifier's weight.AzIkSolvers.twoBone()is an analytic solver for legs and arms that keeps the animated bend plane, with an optionalpole;AzIkSolvers.ccd(iterations, tolerance)handles chains of any length, such as tails and tentacles. - Added
AzIkTargets: fixed model-space points (model), world positions (world), another entity's eyes (entityEyes) and foot placement (ground), which keeps each foot's animated height but measures it from the ground under that foot, so feet step onto slopes, stairs and ledges. - Added
AzLookAt, which turns a chain of bones such as spine, neck and head to face a target, spreading the turn along the chain. - Added bone constraints:
AzBoneConstraint, withAzBoneConstraints.limitandhingeX/hingeY/hingeZin Blockbench degrees relative to the bind pose. IK solvers apply them after every step, andAzBoneConstraints.modifierruns them as a pose modifier on their own. - Added
AzBoneChain, the skeleton solver underneath IK, look-at and spring chains: model-space joint positions, points and directions on bones,aimandrotateAroundin model space, and a single weightedapply(). Custom solvers can use it directly. - Added
AzSpringBone, procedural secondary motion for tails, antennae, ears and cloth-like bone chains. Each joint is a damped particle pulled towards its animated position and held at its segment length, with optional gravity and atipso the last bone swings too. For entities it simulates in world axes, so chains trail and swing when the entity moves or turns, not only when its animation does. - Added
AzEntityModelSpacefor converting between an entity's model space and the world the way the default entity renderer places the model, withscaledfor renderers that scale the model. - Added bone sockets:
AzBoneSocketnames an attachment point on a bone (with an offset and rotation) or at a Blockbench locator, andAzBoneSockets.resolvereturns its world position and axes as anAzSocketTransform, e.g. to spawn a projectile from an animated muzzle. On the server, sockets resolve through a synced anchor hitbox;AzBoneSocket#toAnchorHitboxbuilds a matching one. - Added
AzAttachmentLayerandAzAttachment, a render layer that draws items, block states or custom rendering at sockets, so accessories and props follow animated bones without being part of the model. - Blockbench locators are now baked onto their bones:
AzBone#getLocators()returns eachAzBoneLocator's offset from the bone's pivot and its rotation. - Added 1D and 2D blend spaces.
AzBlendSpace1DandAzBlendSpace2Dplace looping animations at points in an input space and blend them from per-frame inputs such as movement speed, strafing direction or aim pitch, with optional input smoothing. Each sample plays on its own controller, weighted so their layered result is exactly the weighted blend, and phase sync (on by default) keeps all samples on one shared cycle so blended walks and runs stay in step. The whole blend can be weighted or faded withsetWeightandfadeWeight. - Added
AzBlendWeightswith the 1D, 2D (gradient band) and layered-controller weight math used by blend spaces. - Added
AzAnimator#addUpdateHookandAzAnimatorUpdateHook, which run every frame just before the controllers update.
Fixes
- Fixed hitboxes (including anchors) never activating on entities with a render layer that calls
reRenderWithBakedModel. The layer swapped the bone cache's model and restored it with a fresh deep copy every frame, which dropped bone matrix tracking. - Fixed render layers resetting the base model's bone snapshots every frame, which broke animation transitions and easing back to the bind pose.
- Fixed render layers deep-copying two models per entity per frame and running the animator a second time.
AzBone#deepCopynow preserves matrix tracking, so model swaps no longer drop hitbox tracking for a frame.- Molang: fixed item and block animations reading entity query values left over from the last entity animated.
- Molang: fixed
query.is_movingandquery.vertical_speedreading 0 or stale values for other entities on the client. - Molang: fixed
query.is_swimmingnever being true for mobs swimming in water. - Molang: fixed
query.is_first_personfor items held in a first-person hand. - Molang: fixed
query.anyandquery.alltreating every string as equal.
Changes
AzRenderLayer#reRenderWithBakedModelno longer touches the animatable's bone cache. The overlay model is a per-animatable copy whose bones copy the pose (relative to each model's bind pose) and visibility of same-named base bones. Bones that only exist in the overlay keep their bind pose relative to their parent.- Molang:
query.ground_speedis now in blocks per second, as in Bedrock, and works for every entity rather than only living ones. It was blocks per tick before, so animations scaled around the old value need dividing by 20. - Molang:
query.item_in_use_durationis now smoothed between ticks and stops at the item's use duration. - Molang: invalid Molang such as
'a' + 1or assigning to an array element is rejected and evaluates to 0 instead of being retried with the legacy parser. AzBoneAnimationUpdateUtilnow usesAzTransformMathfor weighted and additive controller blending. Results are unchanged.
Developer Notes
- Overlays that relied on
reRenderWithBakedModelanimating overlay-only bones should switch toreRenderWithAnimatedBakedModel. Don't register sound, particle or custom keyframe handlers on the overlay animator unless they should fire twice. - Overlay cubes that duplicate base cubes are now posed from identical bone values, so their vertices match exactly and the overlay wins the depth test by drawing second. A polygon-offset render type is no longer needed for them; it can pull buried overlay edges through the base model. Use a regular entity render type such as
RenderType.entityCutoutNoCull. - Translucency sorting is off by default. It copies the translucent vertices of each render and adds a draw call wherever the sorted order switches render type.
- Sorting only orders one animatable's own geometry; separate entities still draw in the order the game renders them. Geometry written to a
VertexConsumerpassed straight into the pipeline (item and armor base models, which carry their glint) isn't sorted, and render types backed by one of the game's fixed buffers can't be reordered. AzAutoGlowingLayeropts out of sorting, since its glow is drawn over the model's own surfaces and interleaving it with the model would cost a draw call per switch for no visual gain.AzRendererConfigsubclasses with their own builders should callcopyBaseOptions(baseConfig)on the config they build, so options like translucency sorting carry over.- Vanilla doesn't sync a mob's attack target to the client, so
query.has_targetand the target rotations read 0 unless the entity implementsAzMolangTargetProvider(or the target is otherwise set client-side). - The entity queries that
AzEntityAnimatorused to bind itself now live inAzEntityMolangQueriesand readAzMolangQueryContext, so the arrow operator can point them at another entity. Subclasses that callsuper.applyMolangQueriesneed no changes. - Query functions can take string arguments and return strings, arrays or entities: see
ContextQueryFunction#stringArg,#handArgandMolangObjectValue. MolangQueryContexthas new default methods (isEntity,pushEntity,popEntity,thisValue), so existing implementations keep compiling.- String, array,
for_eachand arrow evaluation allocates nothing per frame. Compiled expressions drop entity references once they finish, so cached animations never keep an entity or level alive. setCustomAnimationsbehaves as before, but its writes still become part of the animated pose, so additive changes accumulate on bones no controller animated that frame. New procedural posing should use pose modifiers instead.- Pose modifiers write bones without marking them changed, so bones at rest stay at rest and overlays, hitboxes and bone matrices see the final pose. If other code writes a posed bone after the modifiers ran, the pose layer leaves that write in place instead of restoring over it.
- Pose modifier definitions are shared by every animatable of an animator; weights, fades and modifier state are per animatable. State is dropped when the animatable's model changes.
AzPoseBoneandAzPoseContextinstances are reused every frame and must not be kept outsideAzPoseModifier#apply. The pose modifier pass allocates nothing per frame once each bone has been looked up.headLookfollows GeckoLib's sign convention (positive pitch on X, net head yaw on Y). UseinvertYaw()orinvertPitch()for rigs that turn the wrong way.springreacts to the bone's own animated rotation, not to the parent bone or the entity moving through the world.AzProfileStage.POSE_MODIFIERSis appended afterLOD_UPDATE, so existing stage ordinals are unchanged.- IK, look-at and spring chains are pose modifiers, so they run after the controllers and
setCustomAnimations, can be weighted, masked, ordered and faded per animatable, and never leak into the next frame. Give them priorities that put them after any modifiers whose result they should build on. - Chain bones must each be a descendant of the one before it, but don't have to be direct children. A chain whose bones are missing or out of order is skipped for that model without retrying every frame.
- Model space for IK and sockets is the model's own space in blocks with X mirrored the way AzureLib mirrors it at load. Offsets on effectors, tips, sockets and IK model targets are in Blockbench pixels; rotations and constraint limits are in Blockbench degrees, matching keyframes.
- Solved rotations assume ancestors have uniform, positive scale; non-uniform or mirrored scale on an ancestor makes them approximate.
AzIkTargets.groundraycasts once per foot per frame on the client. It only adjusts feet; lowering the body for a foot below the entity's feet is left to the mod.- Entity model-space conversions follow the default renderer's placement (position, body yaw, native scale). Special render poses such as dying or sleeping aren't accounted for, and renderers that scale the model need
AzEntityModelSpace.scaledwith the same values. - On the client, sockets follow the bone's pose from the last rendered frame. A bone starts tracking its matrices the first time a socket asks, so the first
resolvereturnsfalse. Off-screen entities keep their last on-screen pose unless they have hitboxes, which pose them off-screen. - Sockets resolve on the server only through their
serverHitbox, since bone poses are client-side. That hitbox must be in the entity's hitbox set with server sync enabled. - Blend space samples should animate the same bones; a sample that doesn't animate a bone contributes that bone's underlying pose instead. All samples keep updating while their weight is 0 so they stay in phase, which costs keyframe evaluation for every sample, and their sound, particle and custom keyframes still fire at weight 0.
- Blend space controllers are named
name/animationand are driven client-side; don't dispatch commands to them.
All Relations
- All Relations
- Embedded Library
- Optional Dependency
- Required Dependency
- Tool
- Incompatible
- Include
This mod has no related projects

