aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/CowModel.cpp
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/CowModel.cpp
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.Client/CowModel.cpp')
-rw-r--r--Minecraft.Client/CowModel.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/Minecraft.Client/CowModel.cpp b/Minecraft.Client/CowModel.cpp
new file mode 100644
index 00000000..bf16ade9
--- /dev/null
+++ b/Minecraft.Client/CowModel.cpp
@@ -0,0 +1,32 @@
+#include "stdafx.h"
+#include "CowModel.h"
+#include "ModelPart.h"
+
+CowModel::CowModel() : QuadrupedModel(12,0)
+{
+ head = new ModelPart(this, 0, 0);
+ head->addBox(-4, -4, -6, 8, 8, 6, 0); // Head
+ head->setPos(0, 12 - 6 - 2, -8);
+ head->texOffs(22, 0)->addBox(-5, -5, -4, 1, 3, 1, 0); // Horn1
+ head->texOffs(22, 0)->addBox(+4, -5, -4, 1, 3, 1, 0); // Horn1
+
+ body = new ModelPart(this, 18, 4);
+ body->addBox(-6, -10, -7, 12, 18, 10, 0); // Body
+ body->setPos(0, 11 + 6 - 12, 2);
+ body->texOffs(52, 0)->addBox(-2, 2, -8, 4, 6, 1);
+
+ leg0->x -= 1;
+ leg1->x += 1;
+ leg0->z += 0;
+ leg1->z += 0;
+ leg2->x -= 1;
+ leg3->x += 1;
+ leg2->z -= 1;
+ leg3->z -= 1;
+
+ this->zHeadOffs += 2;
+
+ // 4J added - compile now to avoid random performance hit first time cubes are rendered
+ head->compile(1.0f/16.0f);
+ body->compile(1.0f/16.0f);
+}