aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/HumanoidModel.h
diff options
context:
space:
mode:
authordaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
committerdaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
commitb691c43c44ff180d10e7d4a9afc83b98551ff586 (patch)
tree3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/HumanoidModel.h
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.Client/HumanoidModel.h')
-rw-r--r--Minecraft.Client/HumanoidModel.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/Minecraft.Client/HumanoidModel.h b/Minecraft.Client/HumanoidModel.h
new file mode 100644
index 00000000..0ca10f4b
--- /dev/null
+++ b/Minecraft.Client/HumanoidModel.h
@@ -0,0 +1,65 @@
+#pragma once
+#include "Model.h"
+
+class HumanoidModel : public Model
+{
+public:
+ ModelPart *head, *hair, *body, *arm0, *arm1, *leg0, *leg1, *ear, *cloak;
+ //ModelPart *hat;
+
+ int holdingLeftHand;
+ int holdingRightHand;
+ bool idle;
+ bool sneaking;
+ bool bowAndArrow;
+ bool eating; // 4J added
+ float eating_t; // 4J added
+ float eating_swing; // 4J added
+ unsigned int m_uiAnimOverrideBitmask; // 4J added
+ float m_fYOffset; // 4J added
+ enum animbits
+ {
+ eAnim_ArmsDown =0,
+ eAnim_ArmsOutFront,
+ eAnim_NoLegAnim,
+ eAnim_HasIdle,
+ eAnim_ForceAnim, // Claptrap looks bad if the user turns off custom skin anim
+ // 4J-PB - DaveK wants Fish characters to move both legs in the same way
+ eAnim_SingleLegs,
+ eAnim_SingleArms,
+ eAnim_StatueOfLiberty, // Dr Who Weeping Angel
+ eAnim_DontRenderArmour, // Dr Who Daleks
+ eAnim_NoBobbing, // Dr Who Daleks
+ eAnim_DisableRenderHead,
+ eAnim_DisableRenderArm0,
+ eAnim_DisableRenderArm1,
+ eAnim_DisableRenderTorso,
+ eAnim_DisableRenderLeg0,
+ eAnim_DisableRenderLeg1,
+ eAnim_DisableRenderHair
+
+ };
+
+ static const unsigned int m_staticBitmaskIgnorePlayerCustomAnimSetting= (1<<HumanoidModel::eAnim_ForceAnim) |
+ (1<<HumanoidModel::eAnim_DisableRenderArm0) |
+ (1<<HumanoidModel::eAnim_DisableRenderArm1) |
+ (1<<HumanoidModel::eAnim_DisableRenderTorso) |
+ (1<<HumanoidModel::eAnim_DisableRenderLeg0) |
+ (1<<HumanoidModel::eAnim_DisableRenderLeg1) |
+ (1<<HumanoidModel::eAnim_DisableRenderHair);
+
+
+ void _init(float g, float yOffset, int texWidth, int texHeight); // 4J added
+ HumanoidModel();
+ HumanoidModel(float g);
+ HumanoidModel(float g, float yOffset, int texWidth, int texHeight);
+ virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled);
+ virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, unsigned int uiBitmaskOverrideAnim=0);
+ void renderHair(float scale, bool usecompiled);
+ void renderEars(float scale, bool usecompiled);
+ void renderCloak(float scale, bool usecompiled);
+ void render(HumanoidModel *model, float scale, bool usecompiled);
+
+// Add new bits to models
+ ModelPart * AddOrRetrievePart(SKIN_BOX *pBox);
+};