the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 37 lines 1.2 kB view raw
1#include "stdafx.h" 2#include "..\Minecraft.World\net.minecraft.world.entity.animal.h" 3#include "SheepModel.h" 4#include "ModelPart.h" 5 6SheepModel::SheepModel() : QuadrupedModel(12, 0) 7{ 8 headXRot = 0.0f; 9 10 head = new ModelPart(this, 0, 0); 11 head->addBox(-3, -4, -6, 6, 6, 8, 0); // Head 12 head->setPos(0, 12-6, -8); 13 14 body = new ModelPart(this, 28, 8); 15 body->addBox(-4, -10, -7, 8, 16, 6, 0); // Body 16 body->setPos(0, 11+6-12, 2); 17 18 // 4J added - compile now to avoid random performance hit first time cubes are rendered 19 head->compile(1.0f/16.0f); 20 body->compile(1.0f/16.0f); 21} 22 23void SheepModel::prepareMobModel(shared_ptr<LivingEntity> mob, float time, float r, float a) 24{ 25 QuadrupedModel::prepareMobModel(mob, time, r, a); 26 27 shared_ptr<Sheep> sheep = dynamic_pointer_cast<Sheep>(mob); 28 head->y = 6 + sheep->getHeadEatPositionScale(a) * 9.0f; 29 headXRot = sheep->getHeadEatAngleScale(a); 30} 31 32void SheepModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, shared_ptr<Entity> entity, unsigned int uiBitmaskOverrideAnim) 33{ 34 QuadrupedModel::setupAnim(time, r, bob, yRot, xRot, scale, entity); 35 36 head->xRot = headXRot; 37}