From fe100ae8643e0f8a640935845e639b35dca2a99b Mon Sep 17 00:00:00 2001 From: Joseph Burton Date: Fri, 28 Feb 2025 11:56:01 +0000 Subject: [PATCH] Entity model renames (#4139) * Entity model renames * Fix parameter javadocs --- .../net/minecraft/client/model/Model.mapping | 4 +-- .../minecraft/client/model/ModelPart.mapping | 14 ++++----- .../client/model/ModelTransform.mapping | 10 +++--- .../state/LivingEntityRenderState.mapping | 7 +++-- .../net/minecraft/entity/LimbAnimator.mapping | 31 ++++++++++++++----- 5 files changed, 41 insertions(+), 25 deletions(-) diff --git a/mappings/net/minecraft/client/model/Model.mapping b/mappings/net/minecraft/client/model/Model.mapping index 88934a245d..6767732f15 100644 --- a/mappings/net/minecraft/client/model/Model.mapping +++ b/mappings/net/minecraft/client/model/Model.mapping @@ -35,8 +35,8 @@ CLASS net/minecraft/class_3879 net/minecraft/client/model/Model ARG 1 animation METHOD method_62102 animateWalking (Lnet/minecraft/class_7184;FFFF)V ARG 1 animation - ARG 2 limbFrequency - ARG 3 limbAmplitudeModifier + ARG 2 limbSwingAnimationProgress + ARG 3 limbSwingAmplitude METHOD method_62103 (Lnet/minecraft/class_7184;FFLnet/minecraft/class_7094;)V ARG 4 state METHOD method_62104 getPart (Ljava/lang/String;)Ljava/util/Optional; diff --git a/mappings/net/minecraft/client/model/ModelPart.mapping b/mappings/net/minecraft/client/model/ModelPart.mapping index 453ae15ff2..6d405f1bdb 100644 --- a/mappings/net/minecraft/client/model/ModelPart.mapping +++ b/mappings/net/minecraft/client/model/ModelPart.mapping @@ -1,8 +1,8 @@ CLASS net/minecraft/class_630 net/minecraft/client/model/ModelPart FIELD field_3654 pitch F - FIELD field_3655 pivotZ F - FIELD field_3656 pivotY F - FIELD field_3657 pivotX F + FIELD field_3655 originZ F + FIELD field_3656 originY F + FIELD field_3657 originX F FIELD field_3661 children Ljava/util/Map; FIELD field_3663 cuboids Ljava/util/List; FIELD field_3665 visible Z @@ -37,15 +37,15 @@ CLASS net/minecraft/class_630 net/minecraft/client/model/ModelPart ARG 3 light ARG 4 overlay ARG 5 color - METHOD method_22703 rotate (Lnet/minecraft/class_4587;)V + METHOD method_22703 applyTransform (Lnet/minecraft/class_4587;)V ARG 1 matrices - METHOD method_2851 setPivot (FFF)V + METHOD method_2851 setOrigin (FFF)V ARG 1 x ARG 2 y ARG 3 z METHOD method_32084 getTransform ()Lnet/minecraft/class_5603; METHOD method_32085 setTransform (Lnet/minecraft/class_5603;)V - ARG 1 rotationData + ARG 1 transform METHOD method_32086 getChild (Ljava/lang/String;)Lnet/minecraft/class_630; ARG 1 name METHOD method_32087 isEmpty ()Z @@ -68,7 +68,7 @@ CLASS net/minecraft/class_630 net/minecraft/client/model/ModelPart ARG 1 transform METHOD method_41919 hasChild (Ljava/lang/String;)Z ARG 1 child - METHOD method_41920 translate (Lorg/joml/Vector3f;)V + METHOD method_41920 moveOrigin (Lorg/joml/Vector3f;)V ARG 1 vec3f METHOD method_41921 getDefaultTransform ()Lnet/minecraft/class_5603; METHOD method_41922 rotate (Lorg/joml/Vector3f;)V diff --git a/mappings/net/minecraft/client/model/ModelTransform.mapping b/mappings/net/minecraft/client/model/ModelTransform.mapping index fae9b17a64..e99a7714fd 100644 --- a/mappings/net/minecraft/client/model/ModelTransform.mapping +++ b/mappings/net/minecraft/client/model/ModelTransform.mapping @@ -11,14 +11,14 @@ CLASS net/minecraft/class_5603 net/minecraft/client/model/ModelTransform METHOD comp_3000 pitch ()F METHOD comp_3001 yaw ()F METHOD comp_3002 roll ()F - METHOD method_32090 anchor (FFF)Lnet/minecraft/class_5603; + METHOD method_32090 origin (FFF)Lnet/minecraft/class_5603; ARG 0 x ARG 1 y ARG 2 z METHOD method_32091 of (FFFFFF)Lnet/minecraft/class_5603; - ARG 0 pivotX - ARG 1 pivotY - ARG 2 pivotZ + ARG 0 originX + ARG 1 originY + ARG 2 originZ ARG 3 pitch ARG 4 yaw ARG 5 roll @@ -30,7 +30,7 @@ CLASS net/minecraft/class_5603 net/minecraft/client/model/ModelTransform ARG 1 scale METHOD method_62134 scaled (F)Lnet/minecraft/class_5603; ARG 1 scale - METHOD method_62135 offset (FFF)Lnet/minecraft/class_5603; + METHOD method_62135 moveOrigin (FFF)Lnet/minecraft/class_5603; ARG 1 x ARG 2 y ARG 3 z diff --git a/mappings/net/minecraft/client/render/entity/state/LivingEntityRenderState.mapping b/mappings/net/minecraft/client/render/entity/state/LivingEntityRenderState.mapping index b668a82a43..010a198ad4 100644 --- a/mappings/net/minecraft/client/render/entity/state/LivingEntityRenderState.mapping +++ b/mappings/net/minecraft/client/render/entity/state/LivingEntityRenderState.mapping @@ -1,10 +1,11 @@ CLASS net/minecraft/class_10042 net/minecraft/client/render/entity/state/LivingEntityRenderState FIELD field_53446 bodyYaw F - FIELD field_53447 yawDegrees F + FIELD field_53447 relativeHeadYaw F + COMMENT The entity's head yaw relative to its body yaw. For example, if the entity is facing straight ahead, this value is 0. FIELD field_53448 pitch F FIELD field_53449 deathTime F - FIELD field_53450 limbFrequency F - FIELD field_53451 limbAmplitudeMultiplier F + FIELD field_53450 limbSwingAnimationProgress F + FIELD field_53451 limbSwingAmplitude F FIELD field_53452 headItemAnimationProgress F FIELD field_53453 baseScale F FIELD field_53454 ageScale F diff --git a/mappings/net/minecraft/entity/LimbAnimator.mapping b/mappings/net/minecraft/entity/LimbAnimator.mapping index 6a00d5964b..b2fa1200c5 100644 --- a/mappings/net/minecraft/entity/LimbAnimator.mapping +++ b/mappings/net/minecraft/entity/LimbAnimator.mapping @@ -1,19 +1,34 @@ CLASS net/minecraft/class_8080 net/minecraft/entity/LimbAnimator FIELD field_42109 lastSpeed F FIELD field_42110 speed F - FIELD field_42111 pos F - FIELD field_52449 scale F + COMMENT The speed of the limb movement, also affects the amplitude of their swing. + FIELD field_42111 animationProgress F + COMMENT How far the limbs have progressed in swinging over time. + COMMENT + COMMENT

This value is uncapped. It's in arbitrary units and is scaled differently by different entity models + COMMENT (shorter legs need to swing faster to make the entity appear to be running at the same speed). + FIELD field_52449 timeScale F + COMMENT Like {@link #speed}, affects the speed of the limb movement, but without affecting the amplitude of the limb swings. + COMMENT Used by baby zombies etc. METHOD method_48566 getSpeed ()F METHOD method_48567 setSpeed (F)V ARG 1 speed METHOD method_48568 updateLimbs (FFF)V - ARG 1 speed - ARG 2 multiplier - ARG 3 scale - METHOD method_48569 getPos ()F - METHOD method_48570 getSpeed (F)F + COMMENT Called every tick to update limbs. + ARG 1 targetSpeed + COMMENT the target limb speed, that may be reached over multiple ticks. + COMMENT Limb speed affects the amplitude of the limb swings as well as how fast they move + ARG 2 speedChangeRate + COMMENT the rate that the current speed will be updated to the target speed, from 0 to 1. + COMMENT A value of 1 means the target speed will be reached immediately. + COMMENT A value of 0.5 means that the speed will be updated half way towards the target speed each time this method is called. + COMMENT Used to smooth out changes in amplitude + ARG 3 timeScale + COMMENT affects the speed of the limb movement, but without affecting the amplitude of the limb swings + METHOD method_48569 getAnimationProgress ()F + METHOD method_48570 getAmplitude (F)F ARG 1 tickProgress METHOD method_48571 isLimbMoving ()Z - METHOD method_48572 getPos (F)F + METHOD method_48572 getAnimationProgress (F)F ARG 1 tickProgress METHOD method_61433 reset ()V