the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 35 lines 1.0 kB view raw
1#include "stdafx.h" 2#include "SkeletonRenderer.h" 3#include "SkeletonModel.h" 4#include "../Minecraft.World/Skeleton.h" 5 6ResourceLocation SkeletonRenderer::SKELETON_LOCATION = ResourceLocation(TN_MOB_SKELETON); 7ResourceLocation SkeletonRenderer::WITHER_SKELETON_LOCATION = ResourceLocation(TN_MOB_WITHER_SKELETON); 8 9SkeletonRenderer::SkeletonRenderer() : HumanoidMobRenderer(new SkeletonModel(), .5f) 10{ 11} 12 13void SkeletonRenderer::scale(shared_ptr<LivingEntity> mob, float a) 14{ 15 if (dynamic_pointer_cast<Skeleton>(mob)->getSkeletonType() == Skeleton::TYPE_WITHER) 16 { 17 glScalef(1.2f, 1.2f, 1.2f); 18 } 19} 20 21void SkeletonRenderer::translateWeaponItem() 22{ 23 glTranslatef(1.5f / 16.0f, 3 / 16.0f, 0); 24} 25 26ResourceLocation *SkeletonRenderer::getTextureLocation(shared_ptr<Entity> entity) 27{ 28 shared_ptr<Skeleton> skeleton = dynamic_pointer_cast<Skeleton>(entity); 29 30 if (skeleton->getSkeletonType() == Skeleton::TYPE_WITHER) 31 { 32 return &WITHER_SKELETON_LOCATION; 33 } 34 return &SKELETON_LOCATION; 35}